active_interaction 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ba88eafd8b605090eafd610e1b9b4e41638e5b8
|
4
|
+
data.tar.gz: 44de977111bd36c6348864c0024ff886d71022c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1befd803a782dfe60b5c058f49b3e670e2f4b8d4d5434b15e81acdb7564ab803812dcce8172c615fe0bc04f7a8be7576615f02b9183d8d3a9c8776f77f2c6a92
|
7
|
+
data.tar.gz: ced6bb16015b351c6d4555feb91d84f82ed4e62f3cb9ca650c9ac7c3be9d2f7edcf29f94a84aef6e24fe58572b41de52565bf4c436d3db534e48758cfc39f286
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# [Master][]
|
2
2
|
|
3
|
+
# [1.2.3][] (2014-05-12)
|
4
|
+
|
5
|
+
- Fix a bug that raised `ActiveRecord::Rollback` when composing even when not
|
6
|
+
in a transaction.
|
7
|
+
|
3
8
|
# [1.2.2][] (2014-05-07)
|
4
9
|
|
5
10
|
- Fix a bug that raised `NameError`s when there were invalid nested hash
|
@@ -205,7 +210,8 @@
|
|
205
210
|
|
206
211
|
- Initial release.
|
207
212
|
|
208
|
-
[master]: https://github.com/orgsync/active_interaction/compare/v1.2.
|
213
|
+
[master]: https://github.com/orgsync/active_interaction/compare/v1.2.3...master
|
214
|
+
[1.2.3]: https://github.com/orgsync/active_interaction/compare/v1.2.2...v1.2.3
|
209
215
|
[1.2.2]: https://github.com/orgsync/active_interaction/compare/v1.2.1...v1.2.2
|
210
216
|
[1.2.1]: https://github.com/orgsync/active_interaction/compare/v1.2.0...v1.2.1
|
211
217
|
[1.2.0]: https://github.com/orgsync/active_interaction/compare/v1.1.7...v1.2.0
|
data/lib/active_interaction.rb
CHANGED
@@ -179,12 +179,11 @@ describe ActiveInteraction::Runnable do
|
|
179
179
|
|
180
180
|
context 'with an execute where composition fails' do
|
181
181
|
before do
|
182
|
-
|
182
|
+
interaction = Class.new(TestInteraction) do
|
183
183
|
validate { errors.add(:base) }
|
184
|
-
def execute; end
|
185
184
|
end
|
186
185
|
|
187
|
-
klass.send(:define_method, :execute) { compose(
|
186
|
+
klass.send(:define_method, :execute) { compose(interaction) }
|
188
187
|
end
|
189
188
|
|
190
189
|
it 'rolls back the transaction' do
|
@@ -195,6 +194,19 @@ describe ActiveInteraction::Runnable do
|
|
195
194
|
expect(instance).to have_received(:raise)
|
196
195
|
.with(ActiveRecord::Rollback)
|
197
196
|
end
|
197
|
+
|
198
|
+
context 'without a transaction' do
|
199
|
+
before { klass.transaction(false) }
|
200
|
+
|
201
|
+
it 'does not roll back' do
|
202
|
+
instance = klass.new
|
203
|
+
|
204
|
+
allow(instance).to receive(:raise)
|
205
|
+
instance.send(:run)
|
206
|
+
expect(instance).to_not have_received(:raise)
|
207
|
+
.with(ActiveRecord::Rollback)
|
208
|
+
end
|
209
|
+
end
|
198
210
|
end
|
199
211
|
|
200
212
|
context 'with invalid post-execution state' do
|
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: 1.2.
|
4
|
+
version: 1.2.3
|
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: 2014-05-
|
12
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|