This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails" | |
gem "puma" | |
gem "twitter" | |
gem "omniauth-twitter" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w(⠾ ⠷ ⠯ ⠟ ⠻ ⠽).cycle { |dot| print "\b#{dot}"; sleep 0.1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails" | |
gem "pg" | |
end | |
require "active_record" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use it like so: | |
# > bundle exec {rubocop, standardrb} --require ./lib/github_actions_formatter.rb --format GithubActionsFormatter | |
class GithubActionsFormatter < RuboCop::Formatter::BaseFormatter | |
def file_finished(file, offenses) | |
return unless (uncorrected_offenses = offenses.reject(&:corrected?)).any? | |
uncorrected_offenses.each do |o| | |
output.printf("::error file=%s,line=%d,col=%d::%s\n", path_to(file), o.line, o.real_column, o.message.tr("\n", " ")) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/schema_matcher.rb | |
class Schema | |
@definitions = {} | |
def self.define(name, &block) | |
@definitions[name] = block.call | |
end | |
def self.defined?(name) | |
@definitions.key?(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'bson_ext' | |
gem 'mongo_mapper', '0.13.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -X GET http://localhost:5984/_stats | echo "[$(cat -), { \"datetime\": \"$(date -u +"%Y-%m-%dT%H:%M:%SZ")\" }]" | jq '.[0] + .[1]' | curl -X POST -H "Content-Type: application/json" -d @- http://localhost:5984/stats |
NewerOlder