roar-rails 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.travis.yml CHANGED
@@ -4,3 +4,4 @@ rvm:
4
4
  gemfile:
5
5
  - Gemfile
6
6
  - gemfiles/Gemfile.rails3-0
7
+ - gemfiles/Gemfile.rails3-2
data/CHANGES.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ h2. 0.0.9
2
+
3
+ * Changed `request.body.string` to `read` to make it work with Unicorn.
4
+
1
5
  h2. 0.0.8
2
6
 
3
7
  * Added `#represents` to configure consuming and rendering on controller class layer. This also calls `respond_to`.
data/README.markdown CHANGED
@@ -142,6 +142,8 @@ To get the hyperlinks up and running, please make sure to set the right _host na
142
142
  config.representer.default_url_options = {:host => "127.0.0.1:3000"}
143
143
  ```
144
144
 
145
+ Attention: If you are using representers from a gem your Rails URL helpers might not work in these modules. This is due to a [loading order problem](https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/5tG5unZ8jDQ) in Rails. As a workaround, don't require the representers in the gem but load them as lately as possible, usually it works when you require in the controller. We are working on fixing that problem.
146
+
145
147
  ## Testing
146
148
 
147
149
  ## Autoloading
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in roar-rails.gemspec
4
+ gemspec path: '../'
5
+
6
+ gem 'railties', '~> 3.2.0'
@@ -37,7 +37,7 @@ module Roar::Rails
37
37
  format = formats.first # FIXME: i expected request.content_mime_type to do the job. copied from responder.rb. this will return the wrong format when the controller responds to :json and :xml and the Content-type is :xml (?)
38
38
  representer = representer_for(format, model, options)
39
39
  extend_with!(model, representer)
40
- model.send(compute_parsing_method(format), request.body.string) # e.g. from_json("...")
40
+ model.send(compute_parsing_method(format), request.body.read) # e.g. from_json("...")
41
41
  model
42
42
  end
43
43
 
@@ -1,5 +1,5 @@
1
1
  module Roar
2
2
  module Rails
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roar-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-26 00:00:00.000000000 Z
12
+ date: 2012-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: roar
@@ -121,6 +121,7 @@ files:
121
121
  - README.markdown
122
122
  - Rakefile
123
123
  - gemfiles/Gemfile.rails3-0
124
+ - gemfiles/Gemfile.rails3-2
124
125
  - lib/roar-rails.rb
125
126
  - lib/roar/rails/controller_additions.rb
126
127
  - lib/roar/rails/railtie.rb