Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representable API change #21

Merged
merged 8 commits into from
Feb 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ cache: bundler

rvm:
- ruby-head
- 2.1.2
- 2.0.0
- 1.9.3
- jruby-19mode
- rbx-2.2.10
- 2.2.2
- 2.3.1
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Next
----

* [#21](https://github.com/ruby-grape/grape-roar/pull/21): Fixes serialization issue due to [representable](https://github.com/trailblazer/representable) API change - [@mach-kernel](https://github.com/mach-kernel).
* Your contribution here.

0.3.0 (12/31/2014)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
gemspec

group :development do
gem 'rake'
gem 'rake', '~> 10.5.0'
end

group :test do
Expand Down
2 changes: 1 addition & 1 deletion grape-roar.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
gem.version = Grape::Roar::VERSION

gem.add_dependency 'grape'
gem.add_dependency 'roar', '>= 1.0'
gem.add_dependency 'roar', '~> 1.1.0'
end
2 changes: 1 addition & 1 deletion lib/grape/roar/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Formatter
module Roar
class << self
def call(object, env)
object.respond_to?(:to_json) ? object.to_json(env: env) : MultiJson.dump(object)
object.respond_to?(:to_json) ? object.to_json(user_options: { env: env }) : MultiJson.dump(object)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/grape/roar/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Grape
module Roar
VERSION = '0.3.1'
VERSION = '0.4.0'
end
end
1 change: 1 addition & 0 deletions spec/support/article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class Article
include Roar::JSON
include Roar::Hypermedia
include ArticleRepresenter

attr_accessor :title, :id
Expand Down
1 change: 1 addition & 0 deletions spec/support/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class Order
include Roar::JSON
include Roar::Hypermedia
include OrderRepresenter

attr_accessor :id, :client_id, :articles
Expand Down