atomically 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +2 -0
- data/lib/atomically/query_service.rb +1 -1
- data/lib/atomically/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 920b276434066c1fd3d0172fe14ef28d818d17aaf8f7c4c5c12bff0554631daf
|
4
|
+
data.tar.gz: b89ddf56fbe003a5d54a085b66c46e854462eae6f40c28843b5c19f835bb7127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15edd248d731a80e0e2797cc32fd046f224d0e094691ee3e3740923fb4372877b3041d7436c8685e658476959a5da7022519d2a83eb39c56345e491f14395221
|
7
|
+
data.tar.gz: aee6b53ff12ccf5424073746812b84f269f94e08bda83998f7b2ca60d7672b5a6c54e5053388b1ab14eca36b3041e7d3c2b90282c411caaa664e4b736810d75c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## Change Log
|
2
2
|
|
3
|
+
### [v1.0.5](https://github.com/khiav223577/atomically/compare/v1.0.4...v1.0.5) 2019/01/28
|
4
|
+
- [#9](https://github.com/khiav223577/atomically/pull/9) Implement `decrement_unsigned_counters` (@khiav223577)
|
5
|
+
- [#8](https://github.com/khiav223577/atomically/pull/8) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
|
6
|
+
|
3
7
|
### [v1.0.4](https://github.com/khiav223577/atomically/compare/v1.0.3...v1.0.4) 2018/12/21
|
4
8
|
- [#7](https://github.com/khiav223577/atomically/pull/7) Implement `update_all_and_get_ids` (@khiav223577)
|
5
9
|
- [#6](https://github.com/khiav223577/atomically/pull/6) Add warning (@kakas)
|
@@ -11,6 +15,6 @@
|
|
11
15
|
### [v1.0.2](https://github.com/khiav223577/atomically/compare/v1.0.1...v1.0.2) 2018/11/27
|
12
16
|
- [#3](https://github.com/khiav223577/atomically/pull/3) Implement `update` (@khiav223577)
|
13
17
|
|
14
|
-
### v1.0.1 2018/11/22
|
18
|
+
### [v1.0.1](https://github.com/khiav223577/atomically/compare/v1.0.0...v1.0.1) 2018/11/22
|
15
19
|
- [#2](https://github.com/khiav223577/atomically/pull/2) Implement `pay_all` (@khiav223577)
|
16
20
|
- [#1](https://github.com/khiav223577/atomically/pull/1) Implement `create_or_plus` (@khiav223577)
|
data/README.md
CHANGED
@@ -55,7 +55,7 @@ class Atomically::QueryService
|
|
55
55
|
def decrement_unsigned_counters(counters)
|
56
56
|
result = open_update_all_scope do
|
57
57
|
counters.each do |field, amount|
|
58
|
-
where("#{field}
|
58
|
+
where("#{field} >= ?", amount).update("#{field} = #{field} - ?", amount) if amount > 0
|
59
59
|
end
|
60
60
|
end
|
61
61
|
return (result == 1)
|
data/lib/atomically/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomically
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khiav reoy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|