steppy 0.5.0 → 0.5.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: b5c0018ed2b1fb27c1825a10881930b947c258e5f6d0f456d2c060488da6ce30
4
- data.tar.gz: 1e3ce8842b65d6043f46913bdb947a95f0293b6f12e782245ae0a19085e7fda6
3
+ metadata.gz: e7e6892375006e22092d3a4a3ab249d326bf46084f9d437fb18b8c271e8ecbe4
4
+ data.tar.gz: 10929d2c331facf37247f56a2f21b54eddfd400ce79297b3e67c6e0a2d4a4e38
5
5
  SHA512:
6
- metadata.gz: ab6c8040e0623533702d77bd1d560373bc0e965c5fc20250f00c5bed709482b17ae4dc962d191b9b1774b2318be2c9bc8bc7eb8f6d2cf8f44d27445404da0de4
7
- data.tar.gz: cf04255913350e155ef2929d8c352d16692488e6dc1734ca34848ba73b63a8bbcd39a09d3b3b678b30edad5e684d64040caad5e96d91a688e4cd803b98ed43c2
6
+ metadata.gz: ce420c04b8d064706448a26cd2779eea3619e8d33a749f997ffb0eea74a1561bd2deea7a6f3e61efaab7134fb9cc8dc6ad3e9b7daf10184f71aa2c1fd7ce998f
7
+ data.tar.gz: 59a2b2dc36b696d4cb52be3fb6124ed7d488887b33f3a67a48a46c53de53ee11c2ca0bb0f24f759a6f482faae561ae12b5a362c388d351bd40a7bb9cee3e5e2d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- steppy (0.5.0)
4
+ steppy (0.5.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/steppy.rb CHANGED
@@ -14,6 +14,7 @@ module Steppy
14
14
  module ClassMethods
15
15
  if !defined? step
16
16
  def step(method, **args, &block)
17
+ args[:prefix] ||= :step
17
18
  steppy_add step_method: method, step_args: args, step_block: block
18
19
  end
19
20
  end
@@ -96,9 +97,11 @@ module Steppy
96
97
  end
97
98
 
98
99
  def steppy_step(step_method:, step_args:, step_block:)
99
- method_name = "#{@steppy_prefix}_#{step_method}"
100
+ if steppy_if(step_args[:if]) || @steppy_prefix != step_args[:prefix]
101
+ return
102
+ end
100
103
 
101
- steppy_if(step_args[:if]) && return
104
+ method_name = "#{@steppy_prefix}_#{step_method}"
102
105
 
103
106
  result = if step_block
104
107
  steppy_run_block(step_block, steppy_attributes)
@@ -120,8 +123,7 @@ module Steppy
120
123
  def steppy_run_block(step_block, steppy_attributes)
121
124
  if step_block.arity > 0
122
125
  instance_exec(steppy_attributes, &step_block)
123
- else
124
- instance_exec(&step_block)
126
+ else instance_exec(&step_block)
125
127
  end
126
128
  end
127
129
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Steppy
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: steppy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-13 00:00:00.000000000 Z
11
+ date: 2018-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler