rack-when 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +10 -0
- data/lib/rack/when/builder.rb +1 -1
- data/lib/rack/when/version.rb +1 -1
- data/spec/rack/when/builder_spec.rb +8 -8
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ced1acc516b045e072e95a29bf2f424be8543510
|
4
|
+
data.tar.gz: 4e93b0e986a57f1b7e9f288fd53a7d6a9b0c820a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b19f7823cb0da59df873f10de8e73d3815ee1deadfbace4d6f95159a171ba62bd8306273db39f31a93ee564b08ceed48d0c42c0d013310c8ed2c3490cf78f3e6
|
7
|
+
data.tar.gz: e7b34801c85c176b1a6e0243c501bdeda702dfa9a71f3a25a0b45e6e47d6e16bc357d638e3bba6c395320daff58602dca4f720f81c44396a6695713b2e97a9a3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
data/lib/rack/when/builder.rb
CHANGED
data/lib/rack/when/version.rb
CHANGED
@@ -3,8 +3,8 @@ require 'rack/when/builder'
|
|
3
3
|
describe 'An environment sensitive rack builder' do
|
4
4
|
|
5
5
|
describe '#mount rack_up' do
|
6
|
-
let(:builder) { Rack::When::Builder.new @env,
|
7
|
-
let(:block) {
|
6
|
+
let(:builder) { Rack::When::Builder.new @env, block }
|
7
|
+
let(:block) { double "block" }
|
8
8
|
let(:mount_builder) { builder.mount }
|
9
9
|
|
10
10
|
it 'will run the block when enviroment matches' do
|
@@ -34,18 +34,18 @@ describe 'An environment sensitive rack builder' do
|
|
34
34
|
describe '#current_env_matches?' do
|
35
35
|
shared_examples_for 'matching environment' do
|
36
36
|
it 'is true when matched' do
|
37
|
-
expect(Rack::When::Builder.new :development ).to have_matching_env
|
38
|
-
expect(Rack::When::Builder.new 'development').to have_matching_env
|
39
|
-
expect(Rack::When::Builder.new 'DeVelopment').to have_matching_env
|
37
|
+
expect(Rack::When::Builder.new :development, double ).to have_matching_env
|
38
|
+
expect(Rack::When::Builder.new 'development', double ).to have_matching_env
|
39
|
+
expect(Rack::When::Builder.new 'DeVelopment', double ).to have_matching_env
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'is true when matched as partial' do
|
43
|
-
expect(Rack::When::Builder.new :dev ).to have_matching_env
|
44
|
-
expect(Rack::When::Builder.new 'dev').to have_matching_env
|
43
|
+
expect(Rack::When::Builder.new :dev, double ).to have_matching_env
|
44
|
+
expect(Rack::When::Builder.new 'dev', double ).to have_matching_env
|
45
45
|
end
|
46
46
|
|
47
47
|
it 'is false when mismatched' do
|
48
|
-
expect(Rack::When::Builder.new :staging).to_not have_matching_env
|
48
|
+
expect(Rack::When::Builder.new :staging, double ).to_not have_matching_env
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|