piko_transaction 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22c96f391920e4d74555e59e51ea8ed6281f4acc
4
- data.tar.gz: 70f19c75b100b5e5e89f72d6cacfb7b041052180
3
+ metadata.gz: 06472962146b076955c5c0131923f2e0395598c2
4
+ data.tar.gz: 19668ac71181d29ddb5cebf6a1175ec0e665c951
5
5
  SHA512:
6
- metadata.gz: 10153b9ef8b9d66691b9ce926570c2b24029c147546140ab58b8ec83c80ccc54b5e2e5eac6d53ee073e3b0d4cc3bd86d6883481c0567bad5fa67ee622f52796b
7
- data.tar.gz: fa98740f073eda60cd2a98b3564f033629c7b8bb72fdc7993fa6c8f464048b3ddf5a5caea23584d243d6f7d496e03c571dd39fb2ec2ca91df19b80fb1ab0c0a0
6
+ metadata.gz: 6136443b54f0286ef78f5a1f2e1272a0740a6c402849652d5aa96efdb7baa5f6a2403258e773103cab6b195c9bdfe2363dfa44729ce42dcb3421c209cef5b896
7
+ data.tar.gz: e13a8171c0c626f368dfe0e2412934b0eb865cb0197514a1673b8de917ac23bc5028ff852a4d5d1d40a1b1c2f901f7043ad9a1f02b10dbbe6317847598b812c1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 2.0.0 (2017.06.08)
2
+
3
+ * change transaction interface: run -> do, roll_back -> undo
4
+
1
5
  ### 1.1.0 (2017.06.08)
2
6
 
3
7
  * add custom command
@@ -34,20 +34,20 @@ module PikoTransaction
34
34
  @commands << command
35
35
  end
36
36
 
37
- def run
37
+ def do
38
38
  logger.info { format "Start transaction with commands: %s", @commands.count }
39
39
  return true if run_commands
40
- terminate_and_roll_back
40
+ terminate_and_undo
41
41
  end
42
42
 
43
- def roll_back
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 terminate_and_roll_back
50
+ def terminate_and_undo
51
51
  logger.error { "Could not finalize transaction!" }
52
52
  undo_done_commands
53
53
  false
@@ -18,5 +18,5 @@
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module PikoTransaction
21
- VERSION = "1.1.0"
21
+ VERSION = "2.0.0"
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piko_transaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Szymon Kopciewski