infrataster 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/infrataster/rspec.rb +9 -10
- data/lib/infrataster/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 532ea3f659ce461a0d23d4bcfb89fece194a6f1a
|
|
4
|
+
data.tar.gz: b42a4c93370ad95a98c20f3e8b12cc4e26b38de0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c580b635be17a2fe0da95202737089defdf87fbb1fdd7860787fabb8f7f3dff31ba97ee2982acca4d363fc1799eb1535e373ecddfdf1780cd2e2aec5650f9c11
|
|
7
|
+
data.tar.gz: 0d3efc0f9e89465c393d0467745868393c70de2c0ad895d46ba51c2768fcbb96636564449e8ad6a4b4883f44c1e560f4eae3694e5790ec997b43f89490157868
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Infrataster Changelog
|
|
2
2
|
|
|
3
|
+
## v0.2.4
|
|
4
|
+
|
|
5
|
+
* [Consider how to fetch the current example in RSpec v2.14.x (by @gongo)](https://github.com/ryotarai/infrataster/pull/56)
|
|
6
|
+
|
|
3
7
|
## v0.2.3
|
|
4
8
|
|
|
5
9
|
* [http resource supports basic auth. (by @winebarrel)](https://github.com/ryotarai/infrataster/pull/54)
|
data/lib/infrataster/rspec.rb
CHANGED
|
@@ -6,23 +6,23 @@ include Infrataster::Helpers::ResourceHelper
|
|
|
6
6
|
RSpec.configure do |config|
|
|
7
7
|
config.include Infrataster::Helpers::RSpecHelper
|
|
8
8
|
|
|
9
|
+
fetch_current_example = RSpec.respond_to?(:current_example) ?
|
|
10
|
+
proc { RSpec.current_example }
|
|
11
|
+
: proc { |context| context.example }
|
|
12
|
+
|
|
9
13
|
config.before(:all) do
|
|
10
14
|
@infrataster_context = Infrataster::Contexts.from_example(self.class)
|
|
11
15
|
end
|
|
12
16
|
|
|
13
17
|
config.before(:each) do
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@infrataster_context = Infrataster::Contexts.from_example(example)
|
|
18
|
-
@infrataster_context.before_each(example) if @infrataster_context.respond_to?(:before_each)
|
|
18
|
+
current_example = fetch_current_example.call(self)
|
|
19
|
+
@infrataster_context = Infrataster::Contexts.from_example(current_example)
|
|
20
|
+
@infrataster_context.before_each(current_example) if @infrataster_context.respond_to?(:before_each)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
config.after(:each) do
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
@infrataster_context.after_each(example) if @infrataster_context.respond_to?(:after_each)
|
|
24
|
+
current_example = fetch_current_example.call(self)
|
|
25
|
+
@infrataster_context.after_each(current_example) if @infrataster_context.respond_to?(:after_each)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
config.after(:all) do
|
|
@@ -31,4 +31,3 @@ RSpec.configure do |config|
|
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
|
-
|
data/lib/infrataster/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: infrataster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryota Arai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|