simple_action 1.3.0 → 1.3.1
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 +23 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDgwMTZiMzVkZmFiYjI5NjkzMGFjY2U2NmYxZmY2MTM1M2VjNmNlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTc2MmJlYTg2MmNmMzk5NWI5YWJjMTkwMDcwY2Y2ZjkxNjYzN2ViMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWIxMzA2NjhkMWQ5M2NmYzMyNDE5NTU3MzNkYmNiNmIzMzY4ZmNjYTE0MTY1
|
10
|
+
MjUwZWRlNjJkOTc3Y2FkMjIwNzg3MGM0YmQxMjEwNzY3N2JhNTc3YmZkMWYz
|
11
|
+
ZDQ4ZmNkMDVlM2ZjNzNiOGY5OTdhOTNkODMzYTE5YTM3MzMwZTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTRkZDRkNzQzOWE0OGRmYTgxMGM5YmVkZGY2ZjlhYzg1YmE0NWE2MjJiOTFm
|
14
|
+
MzgzYmE1MzNmMjJjNzcwNzBjZjllZDE2MjNiYmYzMzRlZGFjYzcyZjgyMTk4
|
15
|
+
ZTQ4YzEwNGZiNGVhY2MwMjdmNWE5MmRjZDk4ZjczNzlhNzgxNmM=
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_action (1.
|
5
|
-
simple_params (>= 1.3, < 2.0)
|
4
|
+
simple_action (1.3.0)
|
5
|
+
simple_params (>= 1.3.1, < 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.3.
|
51
|
+
simple_params (1.3.1)
|
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.3", "< 2.0"
|
21
|
+
spec.add_dependency "simple_params", ">= 1.3.1", "< 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
@@ -7,11 +7,14 @@ describe "SimpleAction acceptance spec" do
|
|
7
7
|
param :date_of_birth, type: :date, optional: true
|
8
8
|
validate :name_has_vowels, if: :name
|
9
9
|
|
10
|
-
|
11
|
-
nested_hash :address, default: {} do
|
10
|
+
nested_hash :address, optional: true do
|
12
11
|
param :street, optional: true
|
13
12
|
end
|
14
13
|
|
14
|
+
nested_array :phones, with_ids: true do
|
15
|
+
param :phone_number
|
16
|
+
end
|
17
|
+
|
15
18
|
def name_has_vowels
|
16
19
|
unless name.scan(/[aeiou]/).count >= 1
|
17
20
|
errors.add(:name, "must contain at least one vowel")
|
@@ -144,7 +147,12 @@ describe "SimpleAction acceptance spec" do
|
|
144
147
|
|
145
148
|
let(:params) do
|
146
149
|
{
|
147
|
-
name: name
|
150
|
+
name: name,
|
151
|
+
phones: [
|
152
|
+
"0" => {
|
153
|
+
phone_number: "8005551212"
|
154
|
+
}
|
155
|
+
]
|
148
156
|
}
|
149
157
|
end
|
150
158
|
|
@@ -177,7 +185,12 @@ describe "SimpleAction acceptance spec" do
|
|
177
185
|
name: name,
|
178
186
|
"date_of_birth(3i)" => "5",
|
179
187
|
"date_of_birth(2i)" => "6",
|
180
|
-
"date_of_birth(1i)" => "1984"
|
188
|
+
"date_of_birth(1i)" => "1984",
|
189
|
+
phones: [
|
190
|
+
"0" => {
|
191
|
+
phone_number: "8005551212"
|
192
|
+
}
|
193
|
+
]
|
181
194
|
}
|
182
195
|
end
|
183
196
|
|
@@ -207,7 +220,12 @@ describe "SimpleAction acceptance spec" do
|
|
207
220
|
|
208
221
|
let(:params) do
|
209
222
|
{
|
210
|
-
name: name
|
223
|
+
name: name,
|
224
|
+
phones: [
|
225
|
+
"0" => {
|
226
|
+
phone_number: "8005551212"
|
227
|
+
}
|
228
|
+
]
|
211
229
|
}
|
212
230
|
end
|
213
231
|
|
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.3.
|
4
|
+
version: 1.3.1
|
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:
|
19
|
+
version: 1.3.1
|
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:
|
29
|
+
version: 1.3.1
|
30
30
|
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.0'
|