course 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 42b93dcd580bb0523ecdab134c05b492f61e4801
4
- data.tar.gz: 3d8210ab14b6e2dd573c6535ba589d0dd862f489
3
+ metadata.gz: ad44f95dc208533bb7e0c4dc183c9070e7773462
4
+ data.tar.gz: b0156df1ac01ccd9e49caedcc34824a5209a43fa
5
5
  SHA512:
6
- metadata.gz: 431a3ca4c25d0a76513866532f52b56850717ac24e00cdd0ced638ecd5676a951726d2a11cc001ef7f8461d47be5c38ea150ff591d84952e6825c9514f284f90
7
- data.tar.gz: 10b86c99bdf4d84b921e1d6e5e178aea406cd92efcefbe782c30ba42eb889d1c34617fc202da17af6dc1d73f81621f5865849fef0fd55cdf1989caa07415d608
6
+ metadata.gz: 263b7fad2e80335b7683743da255a102619ece21d024569963ac397bec4e67d22ae9471a979881c1de41171948ea8242089b8722a08e77c877d44fe2391968d6
7
+ data.tar.gz: a7eab10d41e43aa1f0f5246a6d01b8f321b02dafe00c7bcb0b59bf8e81e66816d60a0d41933380414f250d611d019afec03b789109d801638ce91da2ee4fe366
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ['lib']
26
26
 
27
27
  spec.add_development_dependency 'awesome_print', '~> 1.7'
28
- spec.add_development_dependency 'byebug', '~> 9.0'
28
+ spec.add_development_dependency 'pry', '~> 0.11.3'
29
29
  spec.add_development_dependency 'codecov', '~> 0'
30
30
  spec.add_development_dependency 'bundler', '~> 1.14'
31
31
  spec.add_development_dependency 'guard', '~> 2.14'
@@ -21,7 +21,7 @@ module Course
21
21
  end
22
22
 
23
23
  def call(*input, &block)
24
- execute_steps(input, &block)
24
+ execute_steps(*input, &block)
25
25
  return yield result if block_given?
26
26
  result
27
27
  end
@@ -37,22 +37,22 @@ module Course
37
37
  end
38
38
 
39
39
  def execute_steps(*input)
40
- @output = self.class.steps.inject(*input, &method(:execute))
40
+ @output = self.class.steps.inject(input, &method(:execute))
41
41
  rescue FailureError => e
42
42
  @failure = e.failure
43
43
  end
44
44
 
45
45
  def execute(next_input, step)
46
46
  if step.method?
47
- execute_step(method(step.target), next_input)
47
+ execute_step(method(step.target), *next_input)
48
48
  elsif step.block?
49
- execute_step(step.block, next_input)
49
+ execute_step(step.block, *next_input)
50
50
  else
51
51
  execute_operation(step.target, *next_input)
52
52
  end
53
53
  end
54
54
 
55
- def execute_step(next_step, input)
55
+ def execute_step(next_step, *input)
56
56
  if input.is_a?(Array) && (next_step.arity == input.count || next_step.arity == -1)
57
57
  next_step.call(*input)
58
58
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Course
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: course
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arturo Guzman
@@ -26,19 +26,19 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.7'
28
28
  - !ruby/object:Gem::Dependency
29
- name: byebug
29
+ name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '9.0'
34
+ version: 0.11.3
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '9.0'
41
+ version: 0.11.3
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: codecov
44
44
  requirement: !ruby/object:Gem::Requirement