producer-core 0.5.6 → 0.5.7

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: 1562ccd46ac4e15cb192a45e7bac645abad868e0
4
- data.tar.gz: 432f32434041e849bd40c2216ac885af36f1c62a
3
+ metadata.gz: f750e0a3e7e1507d6ae506e7a225d36013e32a46
4
+ data.tar.gz: dd1936c1fca2cedd04e3526de0de5b6c0a20a540
5
5
  SHA512:
6
- metadata.gz: 479bee4cd4014c25bd2c1ed3c5852349801feaae7e3e7bdbfc4e89f473213503f6de92ddd13ac10bea0523b9f3742d608b1bac58fb30349cbb36a348521b6e28
7
- data.tar.gz: cf981aa48ea6f7ebfd3e17d90353dc51c208839302d5ef44499a90bbff4c97d6d141331c0531143f2dfa5cc0f808fe1fcea9d88a5ad61919664d90f30dd6def8
6
+ metadata.gz: 746ff40b2247ebaafe28ed7c1ce080a70bd079ae3ddb31fb90f38e49e19f2e9344218b0c5f1923eb392ac6f0e81b9c3bac08dbb03805abbcb6d42067965e7086
7
+ data.tar.gz: cf618dde3593f0e0da83f4c3cdce8cef3896610bea5a42cfd5c5cc04aa4229b80ce15be530482449d716c7e0581b5bd38d2a6d475da57bef8da5520dc25e956e
@@ -57,6 +57,17 @@ Feature: key/value registry
57
57
  When I successfully execute the recipe
58
58
  Then the output must contain "some_value"
59
59
 
60
+ Scenario: `set' keyword sets a value from a task
61
+ Given a recipe with:
62
+ """
63
+ task :registry_testing do
64
+ set :some_key, 'some_value'
65
+ echo get :some_key
66
+ end
67
+ """
68
+ When I successfully execute the recipe
69
+ Then the output must contain "some_value"
70
+
60
71
  Scenario: `set?' keyword tests wether given key is defined
61
72
  Given a recipe with:
62
73
  """
@@ -16,6 +16,7 @@ module Producer
16
16
  extend Forwardable
17
17
  def_delegators :@name, :to_s
18
18
  def_delegators :@env, :target
19
+ def_delegator :@env, :[]=, :set
19
20
  def_delegator :@env, :[], :get
20
21
  def_delegator :@env, :key?, :set?
21
22
  def_delegator :@env, :recipe_argv
@@ -1,5 +1,5 @@
1
1
  module Producer
2
2
  module Core
3
- VERSION = '0.5.6'.freeze
3
+ VERSION = '0.5.7'.freeze
4
4
  end
5
5
  end
@@ -152,6 +152,13 @@ module Producer::Core
152
152
  end
153
153
  end
154
154
 
155
+ describe '#set' do
156
+ it 'sets a value in the registry' do
157
+ task.set :some_key, :some_value
158
+ expect(task.get :some_key).to eq :some_value
159
+ end
160
+ end
161
+
155
162
  describe '#get' do
156
163
  before { env[:some_key] = :some_value }
157
164
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: producer-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibault Jouan