use_case 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- use_case (0.11.0)
15
+ use_case (0.12.0)
16
16
 
17
17
  GEM
18
18
  remote: http://rubygems.org/
@@ -98,7 +98,7 @@ module UseCase
98
98
  def validate_params(input, validators)
99
99
  validators.each do |validator|
100
100
  result = validator.call(input)
101
- return FailedOutcome.new(result, input) if !result.valid?
101
+ return FailedOutcome.new(result) if !result.valid?
102
102
  end
103
103
  nil
104
104
  end
@@ -97,13 +97,12 @@ module UseCase
97
97
  class FailedOutcome < Outcome
98
98
  attr_reader :input
99
99
 
100
- def initialize(errors = nil, input = nil)
100
+ def initialize(errors = nil)
101
101
  @errors = errors
102
- @input = input
103
102
  end
104
103
 
105
104
  def failure
106
- yield @errors, @input if block_given?
105
+ yield @errors if block_given?
107
106
  @errors
108
107
  end
109
108
 
@@ -24,5 +24,5 @@
24
24
  #++
25
25
 
26
26
  module UseCase
27
- VERSION = "0.11.0"
27
+ VERSION = "0.12.0"
28
28
  end
@@ -14,6 +14,4 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_development_dependency "minitest", "~> 4"
16
16
  s.add_development_dependency "rake"
17
-
18
- s.required_ruby_version = ">= 1.9.2"
19
17
  end
metadata CHANGED
@@ -1,54 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: use_case
3
- version: !ruby/object:Gem::Version
4
- version: 0.11.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 47
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 12
9
+ - 0
10
+ version: 0.12.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Christian Johansen
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-04-09 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: minitest
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '4'
22
- type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
- requirements:
26
+ requirements:
27
27
  - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '4'
30
- - !ruby/object:Gem::Dependency
31
- name: rake
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
28
+ - !ruby/object:Gem::Version
29
+ hash: 11
30
+ segments:
31
+ - 4
32
+ version: "4"
38
33
  type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rake
39
37
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- description: ''
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ description: ""
47
50
  email: christian@gitorious.com
48
51
  executables: []
52
+
49
53
  extensions: []
54
+
50
55
  extra_rdoc_files: []
51
- files:
56
+
57
+ files:
52
58
  - Gemfile
53
59
  - Gemfile.lock
54
60
  - LICENSE
@@ -65,31 +71,41 @@ files:
65
71
  - test/use_case/validator_test.rb
66
72
  - test/use_case_test.rb
67
73
  - use_case.gemspec
74
+ has_rdoc: true
68
75
  homepage: http://gitorious.org/gitorious/use_case
69
76
  licenses: []
77
+
70
78
  post_install_message:
71
79
  rdoc_options: []
72
- require_paths:
80
+
81
+ require_paths:
73
82
  - lib
74
- required_ruby_version: !ruby/object:Gem::Requirement
83
+ required_ruby_version: !ruby/object:Gem::Requirement
75
84
  none: false
76
- requirements:
77
- - - ! '>='
78
- - !ruby/object:Gem::Version
79
- version: 1.9.2
80
- required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
93
  none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
86
101
  requirements: []
102
+
87
103
  rubyforge_project:
88
- rubygems_version: 1.8.24
104
+ rubygems_version: 1.4.2
89
105
  signing_key:
90
106
  specification_version: 3
91
- summary: ''
92
- test_files:
107
+ summary: ""
108
+ test_files:
93
109
  - test/sample_use_case.rb
94
110
  - test/test_helper.rb
95
111
  - test/use_case/outcome_test.rb