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
# Get collection | |
# vars: resource, respond_with | |
shared_examples_for :get_collection_request do |name:| | |
before { resource } | |
before { do_request } | |
let(:respond_with) { {} } | |
it "has status :ok" do | |
expect(response).to have_http_status :ok | |
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
# ~/.profile: executed by the command interpreter for login shells. | |
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |
# exists. | |
# see /usr/share/doc/bash/examples/startup-files for examples. | |
# the files are located in the bash-doc package. | |
# the default umask is set in /etc/profile; for setting the umask | |
# for ssh logins, install and configure the libpam-umask package. | |
#umask 022 |
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
class Organization | |
def to_param | |
"42" | |
end | |
def saved? | |
rand > 0.5 | |
end | |
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
require "delegate" | |
class A < SimpleDelegator | |
def ex(foo) | |
end | |
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
#!/usr/bin/env ruby | |
require "rubygems" # ruby1.9 doesn't "require" it though | |
require "facets/string/unindent" | |
require "thor" | |
class Migrate < Thor | |
class Logger | |
def initialize(color, console) | |
@color = color | |
@console = console |
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
class Q | |
def add | |
puts "added to Q" | |
end | |
end | |
queue = Q.new | |
notifier = Module.new do | |
def add(*args) |
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
$ metrical | |
/home/ap/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/racc/parser.rb:349:in `on_error': (Racc::ParseError) | |
parse error on value "=>" (tASSOC) | |
from /home/ap/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/racc/parser.rb:99:in `_racc_do_parse_c' | |
from /home/ap/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/racc/parser.rb:99:in `do_parse' | |
from /home/ap/.rvm/gems/ruby-1.9.2-p136/gems/ruby_parser-2.0.5/lib/ruby_parser_extras.rb:749:in `process' | |
from /home/ap/.rvm/gems/ruby-1.9.2-p136/gems/flog-2.5.0/lib/flog.rb:241:in `block in flog' | |
from /home/ap/.rvm/gems/ruby-1.9.2-p136/gems/flog-2.5.0/lib/flog.rb:235:in `each' | |
from /home/ap/.rvm/gems/ruby-1.9.2-p136/gems/flog-2.5.0/lib/flog.rb:235:in `flog' | |
from /home/ap/.rvm/gems/ruby-1.9.2-p136/gems/metric_fu-2.0.1/lib/generators/flog.rb:20:in `emit' |