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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb8def0e55eb1343153794f2f022fe53ff1dfb8e
4
- data.tar.gz: cbc7037c6aa72c1d22c4bb93d88f1950a8cac967
3
+ metadata.gz: 532ea3f659ce461a0d23d4bcfb89fece194a6f1a
4
+ data.tar.gz: b42a4c93370ad95a98c20f3e8b12cc4e26b38de0
5
5
  SHA512:
6
- metadata.gz: ada742cc200febf95205853d485e131d95db9153d359a73e96466cd172fcc7ff63b979303cb8290c7fa4a4f53bc09e9c9585f7052e4b3081807f857b3cb550fb
7
- data.tar.gz: 7d29a0373733bca78c7747d3bb52975a853f3fa0918847182661827314d53076745afb5d2d8a8aa806c9f72e07d705506ed215a9153b1b461626ea7257877148
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)
@@ -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
- if defined?(RSpec.current_example)
15
- example = RSpec.current_example
16
- end
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
- if defined?(RSpec.current_example)
23
- example = RSpec.current_example
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
-
@@ -1,3 +1,3 @@
1
1
  module Infrataster
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
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-12 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec