Skip to content

Commit

Permalink
Allow to support newest grape entity
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaitsev committed Nov 21, 2016
1 parent 8e074eb commit a15b000
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grape-swagger-entity.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.email = ['kirik910@gmail.com']

s.summary = 'Grape swagger adapter to support grape-entity object parsing'
s.homepage = 'https://github.com/Bugagazavr/grape-swagger-entity'
s.homepage = 'https://github.com/ruby-grape/grape-swagger-entity'
s.license = 'MIT'

s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
Expand Down
2 changes: 1 addition & 1 deletion lib/grape-swagger/entity/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def call
# TODO: this should only be a temporary hack ;)
if ::GrapeEntity::VERSION =~ /0\.4\.\d/
parameters = model.exposures ? model.exposures : model.documentation
elsif ::GrapeEntity::VERSION =~ /0\.5\.\d/
else
parameters = model.root_exposures.each_with_object({}) do |value, memo|
memo[value.attribute] = value.send(:options)
end
Expand Down

0 comments on commit a15b000

Please sign in to comment.