remiprev/her — pull request #106 by chytreg (2013-04-22 09:47:52+00:00)
Title: ruby 1.8.7 compatibility request

Could you fix the lib to be compatible with ruby 1.8.7?

```bash
/Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/bin/ruby -S rspec spec/api_spec.rb spec/collection_spec.rb spec/middleware/accept_json_spec.rb spec/middleware/first_level_parse_json_spec.rb spec/middleware/second_level_parse_json_spec.rb spec/model/associations_spec.rb spec/model/attributes_spec.rb spec/model/callbacks_spec.rb spec/model/dirty_spec.rb spec/model/http_spec.rb spec/model/introspection_spec.rb spec/model/nested_attributes_spec.rb spec/model/orm_spec.rb spec/model/parse_spec.rb spec/model/paths_spec.rb spec/model/relation_spec.rb spec/model/validations_spec.rb spec/model_spec.rb
Faraday: you may want to install system_timer for reliable timeouts
/Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /Volumes/code/monterail/her/spec/../lib/her/model/http.rb:41: syntax error, unexpected '=', expecting '|' (SyntaxError)
define_method method do |path, attrs={}|
^
/Volumes/code/monterail/her/spec/../lib/her/model/http.rb:52: syntax error, unexpected '=', expecting '|'
define_method :"#{method}_raw" do |path, attrs={}, &block|
^
/Volumes/code/monterail/her/spec/../lib/her/model/http.rb:57: syntax error, unexpected '=', expecting '|'
...{method}_collection" do |path=nil, attrs={}|
^
/Volumes/code/monterail/her/spec/../lib/her/model/http.rb:57: Can't assign to nil
...hod}_collection" do |path=nil, attrs={}|
^
/Volumes/code/monterail/her/spec/../lib/her/model/http.rb:64: syntax error, unexpected '=', expecting '|'
define_method :"#{method}_resource" do |path, attrs={}|
^
/Volumes/code/monterail/her/spec/../lib/her/model/http.rb:83: syntax error, unexpected kEND, expecting $end
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Volumes/code/monterail/her/spec/../lib/her/model.rb:2
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Volumes/code/monterail/her/spec/../lib/her.rb:9
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Volumes/code/monterail/her/spec/spec_helper.rb:4
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Volumes/code/monterail/her/spec/api_spec.rb:2
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/lib/ruby/gems/1.8/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `autorun'
from /Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/bin/rspec:19
rake aborted!
/Users/chytreg/.rbenv/versions/ree-1.8.7-2012.02/bin/ruby -S rspec spec/api_spec.rb spec/collection_spec.rb spec/middleware/accept_json_spec.rb spec/middleware/first_level_parse_json_spec.rb spec/middleware/second_level_parse_json_spec.rb spec/model/associations_spec.rb spec/model/attributes_spec.rb spec/model/callbacks_spec.rb spec/model/dirty_spec.rb spec/model/http_spec.rb spec/model/introspection_spec.rb spec/model/nested_attributes_spec.rb spec/model/orm_spec.rb spec/model/parse_spec.rb spec/model/paths_spec.rb spec/model/relation_spec.rb spec/model/validations_spec.rb spec/model_spec.rb failed

Tasks: TOP => default => spec
(See full trace by running task with --trace)
```