simple_action 1.3.6 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +3 -3
- data/lib/simple_action/version.rb +1 -1
- data/simple_action.gemspec +1 -1
- data/spec/acceptance_spec.rb +9 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjU0MDE2YjEyMmQ0Yjk0ZDcyN2E1NTI5ODFhYTAzMThiYTliMDJmOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTU0NTJlYTlmMzQ1MDA4MTNkNmRhNjBjNjczM2MxNDdhNDUyOGJmMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjQzMjM1NmMzMTI2Y2VkMmFiYThlMWQ3MGRhMWJkZDQzNjVhZjlhOTliMDQy
|
10
|
+
MGFmNTY3ZDAzODA2M2ZiZDIyYjZkZTkwZjZkOTU1ZGM4ZWYwNzI1YjZmN2Qy
|
11
|
+
YzRkZWFiZmI3MmI5NTdhYTQ5OGJhYmM0NjJmMjEyODQxZTQyNjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTlhNzIyYTdmMThlNzY2YmE4YjljODk5YThmZGZjZmYxNGZkMWViNjY2MzA3
|
14
|
+
MGMwNGZmNGEzOGNlNGYwYWQ5ODVlMWQxMDBmZTRhMDE4NWMyZTdjNjY4ZWFi
|
15
|
+
MjViOGIzN2VmOTc0YzM2YzYzNTg5ZTAwZjg5YjE0ZTgyZGJiODE=
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_action (1.3.
|
5
|
-
simple_params (>= 1.
|
4
|
+
simple_action (1.3.6)
|
5
|
+
simple_params (>= 1.4, < 2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -48,7 +48,7 @@ GEM
|
|
48
48
|
rspec-mocks (2.99.3)
|
49
49
|
shoulda-matchers (2.8.0)
|
50
50
|
activesupport (>= 3.0.0)
|
51
|
-
simple_params (1.
|
51
|
+
simple_params (1.4.0)
|
52
52
|
activemodel (>= 3.0, < 5.0)
|
53
53
|
shoulda-matchers (~> 2.8)
|
54
54
|
virtus (>= 1.0.0)
|
data/simple_action.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "simple_params", ">= 1.
|
21
|
+
spec.add_dependency "simple_params", ">= 1.4", "< 2.0"
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.5"
|
23
23
|
spec.add_development_dependency "rake", "~> 10.1"
|
24
24
|
spec.add_development_dependency "rspec", "~> 2.6"
|
data/spec/acceptance_spec.rb
CHANGED
@@ -24,13 +24,15 @@ describe "SimpleAction acceptance spec" do
|
|
24
24
|
|
25
25
|
def execute
|
26
26
|
name.gsub!(/[^a-zA-Z ]/,'')
|
27
|
-
if name == "outlier"
|
28
|
-
|
29
|
-
|
27
|
+
errors.add(:name, "can't be outlier") if name == "outlier"
|
28
|
+
|
29
|
+
formatted_name = if date_of_birth.present?
|
30
30
|
name.upcase + ' ' + date_of_birth.strftime("%m/%d/%Y")
|
31
31
|
else
|
32
32
|
name.upcase
|
33
33
|
end
|
34
|
+
|
35
|
+
formatted_name + " with #{phones.count} phones."
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
@@ -79,7 +81,7 @@ describe "SimpleAction acceptance spec" do
|
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
82
|
-
describe "
|
84
|
+
describe "acceptance cases" do
|
83
85
|
context "with nil params" do
|
84
86
|
let(:params) do
|
85
87
|
{
|
@@ -166,7 +168,7 @@ describe "SimpleAction acceptance spec" do
|
|
166
168
|
describe "result" do
|
167
169
|
subject { SimpleActionAcceptance.run(params).result }
|
168
170
|
|
169
|
-
it { should eq("BILLY") }
|
171
|
+
it { should eq("BILLY with 1 phones.") }
|
170
172
|
end
|
171
173
|
|
172
174
|
describe "effects" do
|
@@ -204,7 +206,7 @@ describe "SimpleAction acceptance spec" do
|
|
204
206
|
describe "result" do
|
205
207
|
subject { SimpleActionAcceptance.run(params).result }
|
206
208
|
|
207
|
-
it { should eq("BILLY 06/05/1984") }
|
209
|
+
it { should eq("BILLY 06/05/1984 with 1 phones.") }
|
208
210
|
end
|
209
211
|
|
210
212
|
describe "effects" do
|
@@ -244,7 +246,7 @@ describe "SimpleAction acceptance spec" do
|
|
244
246
|
describe "result" do
|
245
247
|
subject { SimpleActionAcceptance.run(params).result }
|
246
248
|
|
247
|
-
it { should eq("BILLY 06/05/1984") }
|
249
|
+
it { should eq("BILLY 06/05/1984 with 1 phones.") }
|
248
250
|
end
|
249
251
|
|
250
252
|
describe "effects" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_action
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brycesenz
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.4'
|
20
20
|
- - <
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: '1.4'
|
30
30
|
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.0'
|