steppy 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 30867b1459b5e8f622fab73e25889a6fe09d208be7ffbf7cb5690ca084db7663
4
- data.tar.gz: 7be40ff6c8e140c27249ab0722b90ddcab93ab5a01a12665f00ea6caddcd6293
3
+ metadata.gz: 987fb5fa5cd7883b0604fb5c0d29ca5bb955d4d34f9d53e21406ab78fbb5f40c
4
+ data.tar.gz: c9f3778df2fd3edaf6a2b3daa12cf69deb35f876eecc8911ceebe8c488192452
5
5
  SHA512:
6
- metadata.gz: b081ebbfd0946d7a7ad50f98c52f81009cf26d8deeaf472ac41e2d96c36b8fc3bf98467d9be740bd8dac11389f512e77555e5450d6f45b3a3b2c713bba37d1e5
7
- data.tar.gz: f7bd1e7b9fedd99b7067da79bb7c0303581bbc7623874f42ce5462a3cb8e25303abdf4f66a6c012053a88cd00670ed502e5f3fb403db6219ba8c93034245b5be
6
+ metadata.gz: daa02f43a1ad9615b1a1508c0b7fad026786131d2d4a6dd22b572dbea4b5e6ee1c8cce0ede8ea06a805a25d56c96e408c9d82d45d5e9be53bb4323e671274e37
7
+ data.tar.gz: 1cc10dee46a0c168e8a42923cc3f5322bc892ce62ac0f443b4231ce843a390f611f6ab2eda47d608db781f0d3222ba84ff4d1a6f69ad0c6458d5d1d1760bd2ce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- steppy (1.0.0)
4
+ steppy (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/steppy.rb CHANGED
@@ -144,6 +144,24 @@ module Steppy
144
144
 
145
145
  alias step_return step
146
146
 
147
+ def step_if_else(condition_block, step_steps, args = {})
148
+ if_step, else_step = step_steps
149
+
150
+ steppy_run_step Steppy.parse_step(
151
+ method: if_step,
152
+ args: {
153
+ if: condition_block,
154
+ }.merge(args)
155
+ )
156
+
157
+ steppy_run_step Steppy.parse_step(
158
+ method: else_step,
159
+ args: {
160
+ unless: condition_block,
161
+ }.merge(args)
162
+ )
163
+ end
164
+
147
165
  def step_if(condition, &block)
148
166
  steppy_run_condition_block condition, block
149
167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Steppy
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steppy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj