active_interaction 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/active_interaction.rb +1 -1
- data/lib/active_interaction/base.rb +1 -1
- data/lib/active_interaction/version.rb +1 -1
- data/spec/active_interaction/base_spec.rb +4 -4
- data/spec/active_interaction/concerns/active_recordable_spec.rb +1 -1
- data/spec/active_interaction/i18n_spec.rb +1 -1
- data/spec/active_interaction/integration/array_interaction_spec.rb +1 -1
- data/spec/active_interaction/integration/file_interaction_spec.rb +1 -1
- data/spec/active_interaction/integration/hash_interaction_spec.rb +1 -1
- data/spec/active_interaction/integration/interface_interaction_spec.rb +1 -1
- data/spec/active_interaction/integration/object_interaction_spec.rb +1 -1
- data/spec/active_interaction/integration/time_interaction_spec.rb +1 -1
- data/spec/support/interactions.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1a6360b50ccffdcd40231df37ef50ba71e0513
|
4
|
+
data.tar.gz: 053934f4e4c53b81cf72e4843d3c00a4023890e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b08e4252eaed06870d0fb1c7f3993830a9a939e10f69357d0fcda7f02d0965e52e3fae6e99632077217176475c90d04526caa196d489c5618b5df4c33899f0
|
7
|
+
data.tar.gz: 21ba7fdaa0139290a77a85e4617cbeccd1194b25fa6fec02574a185866c8a93b5758953bee8db769216818f7987afd42fea34d3a264a6aa01a25f45e8bfc1c03
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [2.1.1][] (2015-08-04)
|
2
|
+
|
3
|
+
## Fixed
|
4
|
+
|
5
|
+
- [#296][]: Fixed a bug that silently converted invalid lazy default values to
|
6
|
+
`nil` instead of raising an `InvalidDefaultError`.
|
7
|
+
|
1
8
|
# [2.1.0][] (2015-07-30)
|
2
9
|
|
3
10
|
## Added
|
@@ -430,6 +437,7 @@ For help upgrading to version 2, please read [the announcement post][].
|
|
430
437
|
|
431
438
|
- Initial release.
|
432
439
|
|
440
|
+
[2.1.1]: https://github.com/orgsync/active_interaction/compare/v2.1.0...v2.1.1
|
433
441
|
[2.1.0]: https://github.com/orgsync/active_interaction/compare/v2.0.1...v2.1.0
|
434
442
|
[2.0.1]: https://github.com/orgsync/active_interaction/compare/v2.0.0...v2.0.1
|
435
443
|
[2.0.0]: https://github.com/orgsync/active_interaction/compare/v1.6.0...v2.0.0
|
@@ -565,5 +573,6 @@ For help upgrading to version 2, please read [the announcement post][].
|
|
565
573
|
[#286]: https://github.com/orgsync/active_interaction/issues/286
|
566
574
|
[#289]: https://github.com/orgsync/active_interaction/issues/289
|
567
575
|
[#295]: https://github.com/orgsync/active_interaction/issues/295
|
576
|
+
[#296]: https://github.com/orgsync/active_interaction/issues/296
|
568
577
|
|
569
578
|
[the announcement post]: http://devblog.orgsync.com/2015/05/06/announcing-active-interaction-2/
|
data/lib/active_interaction.rb
CHANGED
@@ -248,7 +248,7 @@ module ActiveInteraction
|
|
248
248
|
self.class.filters.each do |name, filter|
|
249
249
|
begin
|
250
250
|
public_send("#{name}=", filter.clean(inputs[name]))
|
251
|
-
rescue
|
251
|
+
rescue InvalidValueError, MissingValueError, NoDefaultError
|
252
252
|
# #type_check will add errors if appropriate.
|
253
253
|
end
|
254
254
|
end
|
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
|
5
|
+
InteractionWithFilter = Class.new(TestInteraction) do
|
6
6
|
float :thing
|
7
7
|
end
|
8
8
|
|
9
|
-
|
9
|
+
InteractionWithDateFilter = Class.new(TestInteraction) do
|
10
10
|
date :thing
|
11
11
|
end
|
12
12
|
|
13
|
-
|
13
|
+
AddInteraction = Class.new(TestInteraction) do
|
14
14
|
float :x, :y
|
15
15
|
|
16
16
|
def execute
|
@@ -18,7 +18,7 @@ class AddInteraction < TestInteraction
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
21
|
+
InterruptInteraction = Class.new(TestInteraction) do
|
22
22
|
object :x, :y,
|
23
23
|
class: Object,
|
24
24
|
default: nil
|
@@ -30,6 +30,19 @@ shared_examples_for 'an interaction' do |type, generator, filter_options = {}|
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
context 'with an invalid lazy default' do
|
34
|
+
let(:described_class) do
|
35
|
+
Class.new(TestInteraction) do
|
36
|
+
public_send(type, :default,
|
37
|
+
filter_options.merge(default: -> { Object.new }))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'raises an error' do
|
42
|
+
expect { outcome }.to raise_error ActiveInteraction::InvalidDefaultError
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
33
46
|
context 'without required inputs' do
|
34
47
|
it 'is invalid' do
|
35
48
|
expect(outcome).to be_invalid
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_interaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lasseigne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|