transaction 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG.MD +12 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/transaction.rb +4 -4
- data/lib/transaction/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe1a80b5e33a5409fde10ec7fc5820b79ec8102789326a9ac8bbf8b4b8a3ec1
|
4
|
+
data.tar.gz: de004f228488f2b36c58c9028e427787bf5d03bff8d676226186729ec52a1aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47be2f17326d9520819bed175dc04c7f9913eb45b2820442c144645d1322bd27013727ed5cb81f2692769d231736b907611db837216e5d1bf465afbc2db6dd2
|
7
|
+
data.tar.gz: b87d4532392b8e955299a35fb43be6655a4de2d922ffeb80ae74feb43ab1d6c20743686797d2cd872f7ada9507f1a60006464a36f5fd8347867c12d7805e477b
|
data/.travis.yml
CHANGED
data/CHANGELOG.MD
CHANGED
@@ -4,11 +4,23 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.1.2] - 2019-07-18
|
8
|
+
|
9
|
+
### Added
|
10
|
+
- Travis configuration.
|
11
|
+
- Unit tests for methods.
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- Status is now always returned as a string (not a sym)
|
15
|
+
|
7
16
|
## [0.1.1] - 2019-07-18
|
8
17
|
|
9
18
|
### Added
|
10
19
|
- Changelog to track version changes.
|
11
20
|
|
21
|
+
### Removed
|
22
|
+
- Removed redis from gemfile. Use it as a runtime dependency.
|
23
|
+
|
12
24
|
### Changed
|
13
25
|
- Default attributes
|
14
26
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/transaction.rb
CHANGED
@@ -39,13 +39,13 @@ module Transaction
|
|
39
39
|
@attributes = parsed_attributes || {}
|
40
40
|
update_attributes(options) if @attributes.empty?
|
41
41
|
|
42
|
-
@status = @attributes[:status]
|
42
|
+
@status = @attributes[:status].to_s
|
43
43
|
end
|
44
44
|
|
45
45
|
def update_attributes(options)
|
46
46
|
@attributes = symbolize_keys!(@attributes.merge!(options))
|
47
47
|
redis_set(@transaction_id, @attributes.to_json)
|
48
|
-
@status = @attributes[:status]
|
48
|
+
@status = @attributes[:status].to_s
|
49
49
|
end
|
50
50
|
|
51
51
|
def update_status(status)
|
@@ -59,7 +59,7 @@ module Transaction
|
|
59
59
|
update_status(:processing)
|
60
60
|
end
|
61
61
|
|
62
|
-
def finish!
|
62
|
+
def finish!(status, clear = false)
|
63
63
|
update_status(status)
|
64
64
|
|
65
65
|
redis_delete if clear
|
@@ -74,7 +74,7 @@ module Transaction
|
|
74
74
|
@attributes = parsed_attributes
|
75
75
|
raise 'Transaction expired' if @attributes.nil?
|
76
76
|
|
77
|
-
@status = @attributes[:status]
|
77
|
+
@status = @attributes[:status].to_s
|
78
78
|
end
|
79
79
|
|
80
80
|
private
|
data/lib/transaction/version.rb
CHANGED