piko_transaction 1.1.0 → 2.0.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/piko_transaction/transaction.rb +4 -4
- data/lib/piko_transaction/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06472962146b076955c5c0131923f2e0395598c2
|
4
|
+
data.tar.gz: 19668ac71181d29ddb5cebf6a1175ec0e665c951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6136443b54f0286ef78f5a1f2e1272a0740a6c402849652d5aa96efdb7baa5f6a2403258e773103cab6b195c9bdfe2363dfa44729ce42dcb3421c209cef5b896
|
7
|
+
data.tar.gz: e13a8171c0c626f368dfe0e2412934b0eb865cb0197514a1673b8de917ac23bc5028ff852a4d5d1d40a1b1c2f901f7043ad9a1f02b10dbbe6317847598b812c1
|
data/CHANGELOG.md
CHANGED
@@ -34,20 +34,20 @@ module PikoTransaction
|
|
34
34
|
@commands << command
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def do
|
38
38
|
logger.info { format "Start transaction with commands: %s", @commands.count }
|
39
39
|
return true if run_commands
|
40
|
-
|
40
|
+
terminate_and_undo
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
43
|
+
def undo
|
44
44
|
logger.info { format "Rolling back transaction with commands: %s", @done.count }
|
45
45
|
undo_done_commands
|
46
46
|
end
|
47
47
|
|
48
48
|
private
|
49
49
|
|
50
|
-
def
|
50
|
+
def terminate_and_undo
|
51
51
|
logger.error { "Could not finalize transaction!" }
|
52
52
|
undo_done_commands
|
53
53
|
false
|