grape_ape_rails 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c38d5143f2dfadcec3a305dd4c2eafe3b4ed2e2
4
- data.tar.gz: 9c9652e751f91aa44806c9a0774c2ca0384b3449
3
+ metadata.gz: f8d75a716417af26b6ee509a1a7af2fce19b096b
4
+ data.tar.gz: e03bf4bca31988ff294232f51fc4be7afb938f1a
5
5
  SHA512:
6
- metadata.gz: 83ae7387d5b330dc57a23380f5ffec25b87a0b6ddddac1da4e3d40cdfdc2f574dd030a1a95ba2bc74ebca9809fffb179c2cf3fb0ce27a3f90f780c252e5a78f7
7
- data.tar.gz: 5220334028cd94d2fd7f4ba424862fc588fe510bc36cc58aeec77fc1525b837cf874785058a6ed8522cb477db060f892c45e40262680d7e946a8d8ce5245bda6
6
+ metadata.gz: e56880d0534ba6b3885867b04b2903a68a14a922afb9e16133d40edd3ded0819c596675bde5d37ec5f25bcfae18ad15b82ed7ffccfadc6251923b158ae3dad80
7
+ data.tar.gz: cc9a9e3b5fce7262a366e9d6ac7808ef8e629ad1796808a4d83f8c7ef64dd46ae31f26e1fab57428e5fa59ead077078f1591023ad01a1d72d73f22b26be8bc5f
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'activesupport'
22
22
  spec.add_dependency 'multi_json'
23
23
  spec.add_dependency 'oj'
24
- spec.add_dependency "grape", "0.9.0"
24
+ spec.add_dependency "grape", "~> 0.11.0"
25
25
  spec.add_dependency 'grape-rabl'
26
26
  spec.add_dependency 'grape-kaminari'
27
27
  spec.add_dependency 'grape-rails-cache'
@@ -1,3 +1,3 @@
1
1
  module GrapeApeRails
2
- VERSION = "0.9.7"
2
+ VERSION = "0.9.8"
3
3
  end
@@ -29,8 +29,14 @@ module Grape
29
29
 
30
30
  def combine_namespaces(app)
31
31
  app.endpoints.each do |endpoint|
32
- ns = endpoint.settings.stack.last[:namespace]
33
- @combined_namespaces[ns.space] = ns if ns
32
+ ns = if endpoint.respond_to?(:namespace_stackable)
33
+ endpoint.namespace_stackable(:namespace).last
34
+ else
35
+ endpoint.settings.stack.last[:namespace]
36
+ end
37
+ # use the full namespace here (not the latest level only)
38
+ # and strip leading slash
39
+ @combined_namespaces[endpoint.namespace.sub(/^\//, '')] = ns if ns
34
40
 
35
41
  combine_namespaces(endpoint.options[:app]) if endpoint.options[:app]
36
42
  end
@@ -87,7 +93,6 @@ module Grape
87
93
  end
88
94
 
89
95
  desc api_doc.delete(:desc), params: api_doc.delete(:params)
90
- @last_description.merge!(api_doc)
91
96
  get @@mount_path do
92
97
  header['Access-Control-Allow-Origin'] = '*'
93
98
  header['Access-Control-Request-Method'] = '*'
@@ -133,7 +138,6 @@ module Grape
133
138
  required: true
134
139
  }
135
140
  }.merge(specific_api_doc.delete(:params) || {})
136
- @last_description.merge!(specific_api_doc)
137
141
  get "#{@@mount_path}/:name" do
138
142
  header['Access-Control-Allow-Origin'] = '*'
139
143
  header['Access-Control-Request-Method'] = '*'
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_ape_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt E. Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-27 00:00:00.000000000 Z
11
+ date: 2015-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: grape
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.0
61
+ version: 0.11.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.9.0
68
+ version: 0.11.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: grape-rabl
71
71
  requirement: !ruby/object:Gem::Requirement