rack-app 3.2.1 → 3.3.0

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: e81d69d4232df5dc2cf8b2b5461bf89055502b23
4
- data.tar.gz: 7260522a23cd1cb462df33b6056c77494e4669c5
3
+ metadata.gz: 66b57de8ba87782de7ea0b68c7daa6e7581071cf
4
+ data.tar.gz: 41db5aef1bc376e061ca7b7299156417b5b8fc30
5
5
  SHA512:
6
- metadata.gz: b7a7924188fd13e34a082a4d3d4f315e7badb23a7a14ee9395a94feede3da32138bb25db02bb1d577268362f73551139db315b564af2c98bbf9ac665c6422ba0
7
- data.tar.gz: 7b2043952a7a021e15a8b7907b90b402f4b33a25b84c9c7cdd4a9a150f23f1548e05b61eb70a87647517606ec9c0c8dacfb04f802d009e6459ce6bcce3233c2c
6
+ metadata.gz: 1217911ce39dd6e590f4b9939b6ef7a1ea124401341eefab33992ef3c5ee875db8971f9108052fab8ab912fbc04763a4a9fe580f92f908761d1d3adbdbfaaf58
7
+ data.tar.gz: cc560b180786f192a3a7d60f99c925da377d23326cacaf3ec97182067e81916da17c77bacb6d55f808e13a8d2e41a17e603311ab7040b9a78efa9e813a12243f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.1
1
+ 3.3.0
data/lib/rack/app/test.rb CHANGED
@@ -25,10 +25,16 @@ module Rack::App::Test
25
25
  end
26
26
 
27
27
  def rack_app(&block)
28
- app_class = defined?(__rack_app_class__) ? __rack_app_class__ : nil
29
- constructors = []
30
- constructors << __rack_app_constructor__ if defined?(__rack_app_constructor__) and __rack_app_constructor__.is_a?(Proc)
31
- Rack::App::Test::Utils.rack_app_by(app_class, constructors, &block)
28
+
29
+ @app ||= lambda do
30
+ app_class = defined?(__rack_app_class__) ? __rack_app_class__ : nil
31
+ constructors = []
32
+ constructors << __rack_app_constructor__ if defined?(__rack_app_constructor__) and __rack_app_constructor__.is_a?(Proc)
33
+ Rack::App::Test::Utils.rack_app_by(app_class, constructors)
34
+ end.call
35
+
36
+ block.is_a?(Proc) ? @app.instance_exec(&block) : @app
37
+
32
38
  end
33
39
 
34
40
  end
@@ -16,7 +16,7 @@ module Rack::App::Test::Utils
16
16
  app = Rack::App::Utils.deep_dup(app_class)
17
17
  constructors.each { |constructor| app.class_eval(&constructor) }
18
18
 
19
- block.is_a?(Proc) ? app.instance_exec(&block) : app
19
+ return app
20
20
  end
21
21
 
22
22
  def env_by(properties)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler