grape-app 0.6.2 → 0.6.3

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
  SHA256:
3
- metadata.gz: 9079b3fecf5f3a3b1c932516924514892eb44870dfd67ac8225a1365153688ee
4
- data.tar.gz: ecab0a13693a63e57f6a46995c7ef56913770588d73dbd111dc306d91fd27733
3
+ metadata.gz: d8e89b5c40f2e92a7b92cd7038fc0f6727bf79ad898943818c0961e76ca643ce
4
+ data.tar.gz: f26d33c3c1856f37432870fb09bad04d2a5853abd64f3f1af22ad332d2eb7e06
5
5
  SHA512:
6
- metadata.gz: 245ebdf92b8d4bde24c23abd453512894ad5d5835985ed74e67e8f6c5683e8fb76052b8f06df56c5d66a468a1ec3513616027fbfa73be394609320a3bc87a745
7
- data.tar.gz: ff7594612fe461ba1dfce6981ca274c397003d8877365311bf2f8ce86fd4560bcdb3f9bf64d25b3d40f2bd0a1021bbb168c4c1cbf07d9d45d80ebf4bd2736352
6
+ metadata.gz: 8486eb4a044081844a271179497c66bb5f4084f1ff6edc9ed01bb6772ef746a43b69f41cc7f873b6793e6c089d56c788d06c04a2cbb7b216a912d1e5d0f35b5e
7
+ data.tar.gz: 4ad12536b5049a9d6de8d33379d94dd6eb22ad77e44b9f3a4884a3001e5dba55b0f1b6a14f998cade0e17a45fc902084da1634ad16a0b74e773b253c3fff933a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-app (0.6.2)
4
+ grape-app (0.6.3)
5
5
  activesupport
6
6
  grape (>= 1.2.0)
7
7
  grape-entity
@@ -32,7 +32,7 @@ GEM
32
32
  builder (3.2.3)
33
33
  coercible (1.0.0)
34
34
  descendants_tracker (~> 0.0.1)
35
- concurrent-ruby (1.1.3)
35
+ concurrent-ruby (1.1.4)
36
36
  descendants_tracker (0.0.4)
37
37
  thread_safe (~> 0.3, >= 0.3.1)
38
38
  diff-lcs (1.3)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
2
2
  s.name = 'grape-app'
3
- s.version = '0.6.2'
3
+ s.version = '0.6.3'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(Stanalone Grape API apps)
@@ -69,7 +69,9 @@ class Grape::App < Grape::API::Instance
69
69
  @middleware ||= Rack::Builder.new do
70
70
  use Rack::Cors, &config.cors if config.cors
71
71
  use Rack::SslEnforcer if config.force_ssl
72
- instance_eval(&config.middleware) if config.middleware
72
+ config.middleware.each do |block|
73
+ instance_eval(&block)
74
+ end
73
75
 
74
76
  run Grape::App
75
77
  end
@@ -1,7 +1,8 @@
1
1
  class Grape::App::Configuration < ActiveSupport::InheritableOptions
2
2
 
3
3
  def middleware(&block)
4
- self.middleware = block if block
4
+ self[:middleware] ||= []
5
+ self[:middleware].push(block) if block
5
6
  super
6
7
  end
7
8
 
@@ -0,0 +1,2 @@
1
+ class API::Base < Grape::API::Instance
2
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Black Square Media Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2018-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -242,6 +242,7 @@ files:
242
242
  - spec/grape/app_spec.rb
243
243
  - spec/scenario/Gemfile
244
244
  - spec/scenario/app/api.rb
245
+ - spec/scenario/app/api/base.rb
245
246
  - spec/scenario/app/api/v1.rb
246
247
  - spec/scenario/config/database.yml
247
248
  - spec/scenario/config/environments/test.rb
@@ -276,6 +277,7 @@ test_files:
276
277
  - spec/grape/app_spec.rb
277
278
  - spec/scenario/Gemfile
278
279
  - spec/scenario/app/api.rb
280
+ - spec/scenario/app/api/base.rb
279
281
  - spec/scenario/app/api/v1.rb
280
282
  - spec/scenario/config/database.yml
281
283
  - spec/scenario/config/environments/test.rb