atomically 1.1.3 → 1.1.4

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
  SHA256:
3
- metadata.gz: 69a564d104c51a3f2ccfe5cce450daab8c60c0882e6a937be3d0744f873452e6
4
- data.tar.gz: 3ec5557bd1fa9e1e6285075290f4d293b2873077b526ae6ed929f27ad421b9f0
3
+ metadata.gz: 109b9c9c0f457809981bf9f0ddccc0373cfc9419f5d76246100b788fd4063889
4
+ data.tar.gz: 74814d48c0e2b4d01bd9992157374e0901f7729c0ed3076d3da6587166839423
5
5
  SHA512:
6
- metadata.gz: 61e4e69f838de4a1f663d240847e2087176d9ec8c3aab017b9acdbc7eb7e6cc83b48fd06a520e3dfca9b40a202f07b3b37a77791e537431a53207a66e43f4372
7
- data.tar.gz: ed5b5ecda0f1f1ed4f36f30fdc07ca818b13249dd96063cfa57c480772587718c59fa2156b23b94d314f0e59cca061cfaf8a21dbafbab32ac26f0f5da1b64ca5
6
+ metadata.gz: 01a27991eda8e03792ef5b11b2f5d3f596e4fc2086f6a75eca848d89c3d4dd550a53b5bbc5304f4e933174e30fc27a84ded106d7bd27fd0511e1a20081f3b575
7
+ data.tar.gz: 738a6704402e6611f6c1451642f40472dc7ddc3a2f637b52924b96e3a9a2b8b7aa007b7ac23ce9a141c198aae7a6c44a4e0dd49a26ead7481f3b6a02e7d4f10c
@@ -113,7 +113,7 @@ jobs:
113
113
  - name: Run tests
114
114
  run: bundle exec rake
115
115
  - name: Publish code coverage
116
- if: ${{ success() }}
116
+ if: ${{ success() && env.CC_TEST_REPORTER_ID }}
117
117
  uses: paambaati/codeclimate-action@v2.7.5
118
118
  env:
119
119
  CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
data/CHANGELOG.md CHANGED
@@ -1,37 +1,42 @@
1
- ## Change Log
2
-
3
- ### [v1.1.2](https://github.com/khiav223577/atomically/compare/v1.1.1...v1.1.2) 2020/09/01
4
- - [#19](https://github.com/khiav223577/atomically/pull/19) Fix: changed attributes are not updated when calling `atomically.update` (@khiav223577)
5
- - [#18](https://github.com/khiav223577/atomically/pull/18) Support Ruby 2.7 (@khiav223577)
6
- - [#17](https://github.com/khiav223577/atomically/pull/17) specify gem versions by ENV['DB'] (@khiav223577)
7
-
8
- ### [v1.1.1](https://github.com/khiav223577/atomically/compare/v1.1.0...v1.1.1) 2019/11/01
9
- - [#16](https://github.com/khiav223577/atomically/pull/16) Fix: `create_or_plus` is broken when using `makara` adapter (@khiav223577)
10
-
11
- ### [v1.1.0](https://github.com/khiav223577/atomically/compare/v1.0.6...v1.1.0) 2019/10/23
12
- - [#12](https://github.com/khiav223577/atomically/pull/12) Support PostgreSQL (@khiav223577)
13
- - [#14](https://github.com/khiav223577/atomically/pull/14) Support Rails 6.0 (@khiav223577)
14
- - [#13](https://github.com/khiav223577/atomically/pull/13) Remove deprecated codeclimate-test-reporter gem (@khiav223577)
15
- - [#11](https://github.com/khiav223577/atomically/pull/11) Fix: Non-attribute arguments will be disallowed in Rails 6.0 (@khiav223577)
16
-
17
- ### [v1.0.6](https://github.com/khiav223577/atomically/compare/v1.0.5...v1.0.6) 2019/01/28
18
- - [#10](https://github.com/khiav223577/atomically/pull/10) `decrement_unsigned_counters` should be able to decrement the field to zero (@khiav223577)
19
-
20
- ### [v1.0.5](https://github.com/khiav223577/atomically/compare/v1.0.4...v1.0.5) 2019/01/28
21
- - [#9](https://github.com/khiav223577/atomically/pull/9) Implement `decrement_unsigned_counters` (@khiav223577)
22
- - [#8](https://github.com/khiav223577/atomically/pull/8) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
23
-
24
- ### [v1.0.4](https://github.com/khiav223577/atomically/compare/v1.0.3...v1.0.4) 2018/12/21
25
- - [#7](https://github.com/khiav223577/atomically/pull/7) Implement `update_all_and_get_ids` (@khiav223577)
26
- - [#6](https://github.com/khiav223577/atomically/pull/6) Add warning (@kakas)
27
- - [#5](https://github.com/khiav223577/atomically/pull/5) fix README `pay_all` description (@kakas)
28
-
29
- ### [v1.0.3](https://github.com/khiav223577/atomically/compare/v1.0.2...v1.0.3) 2018/11/28
30
- - [#4](https://github.com/khiav223577/atomically/pull/4) Implement `update_all` (@khiav223577)
31
-
32
- ### [v1.0.2](https://github.com/khiav223577/atomically/compare/v1.0.1...v1.0.2) 2018/11/27
33
- - [#3](https://github.com/khiav223577/atomically/pull/3) Implement `update` (@khiav223577)
34
-
35
- ### [v1.0.1](https://github.com/khiav223577/atomically/compare/v1.0.0...v1.0.1) 2018/11/22
36
- - [#2](https://github.com/khiav223577/atomically/pull/2) Implement `pay_all` (@khiav223577)
37
- - [#1](https://github.com/khiav223577/atomically/pull/1) Implement `create_or_plus` (@khiav223577)
1
+ ## Change Log
2
+
3
+ ### [v1.1.3](https://github.com/khiav223577/atomically/compare/v1.1.2...v1.1.3) 2023/08/19
4
+ - [#22](https://github.com/khiav223577/atomically/pull/22) Support Ruby 3.0 (@khiav223577)
5
+ - [#21](https://github.com/khiav223577/atomically/pull/21) Migrating from Travis CI to GitHub Actions (@khiav223577)
6
+ - [#20](https://github.com/khiav223577/atomically/pull/20) Fix: test files should not be included in coverage (@khiav223577)
7
+
8
+ ### [v1.1.2](https://github.com/khiav223577/atomically/compare/v1.1.1...v1.1.2) 2020/09/01
9
+ - [#19](https://github.com/khiav223577/atomically/pull/19) Fix: changed attributes are not updated when calling `atomically.update` (@khiav223577)
10
+ - [#18](https://github.com/khiav223577/atomically/pull/18) Support Ruby 2.7 (@khiav223577)
11
+ - [#17](https://github.com/khiav223577/atomically/pull/17) specify gem versions by ENV['DB'] (@khiav223577)
12
+
13
+ ### [v1.1.1](https://github.com/khiav223577/atomically/compare/v1.1.0...v1.1.1) 2019/11/01
14
+ - [#16](https://github.com/khiav223577/atomically/pull/16) Fix: `create_or_plus` is broken when using `makara` adapter (@khiav223577)
15
+
16
+ ### [v1.1.0](https://github.com/khiav223577/atomically/compare/v1.0.6...v1.1.0) 2019/10/23
17
+ - [#12](https://github.com/khiav223577/atomically/pull/12) Support PostgreSQL (@khiav223577)
18
+ - [#14](https://github.com/khiav223577/atomically/pull/14) Support Rails 6.0 (@khiav223577)
19
+ - [#13](https://github.com/khiav223577/atomically/pull/13) Remove deprecated codeclimate-test-reporter gem (@khiav223577)
20
+ - [#11](https://github.com/khiav223577/atomically/pull/11) Fix: Non-attribute arguments will be disallowed in Rails 6.0 (@khiav223577)
21
+
22
+ ### [v1.0.6](https://github.com/khiav223577/atomically/compare/v1.0.5...v1.0.6) 2019/01/28
23
+ - [#10](https://github.com/khiav223577/atomically/pull/10) `decrement_unsigned_counters` should be able to decrement the field to zero (@khiav223577)
24
+
25
+ ### [v1.0.5](https://github.com/khiav223577/atomically/compare/v1.0.4...v1.0.5) 2019/01/28
26
+ - [#9](https://github.com/khiav223577/atomically/pull/9) Implement `decrement_unsigned_counters` (@khiav223577)
27
+ - [#8](https://github.com/khiav223577/atomically/pull/8) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
28
+
29
+ ### [v1.0.4](https://github.com/khiav223577/atomically/compare/v1.0.3...v1.0.4) 2018/12/21
30
+ - [#7](https://github.com/khiav223577/atomically/pull/7) Implement `update_all_and_get_ids` (@khiav223577)
31
+ - [#6](https://github.com/khiav223577/atomically/pull/6) Add warning (@kakas)
32
+ - [#5](https://github.com/khiav223577/atomically/pull/5) fix README `pay_all` description (@kakas)
33
+
34
+ ### [v1.0.3](https://github.com/khiav223577/atomically/compare/v1.0.2...v1.0.3) 2018/11/28
35
+ - [#4](https://github.com/khiav223577/atomically/pull/4) Implement `update_all` (@khiav223577)
36
+
37
+ ### [v1.0.2](https://github.com/khiav223577/atomically/compare/v1.0.1...v1.0.2) 2018/11/27
38
+ - [#3](https://github.com/khiav223577/atomically/pull/3) Implement `update` (@khiav223577)
39
+
40
+ ### [v1.0.1](https://github.com/khiav223577/atomically/compare/v1.0.0...v1.0.1) 2018/11/22
41
+ - [#2](https://github.com/khiav223577/atomically/pull/2) Implement `pay_all` (@khiav223577)
42
+ - [#1](https://github.com/khiav223577/atomically/pull/1) Implement `create_or_plus` (@khiav223577)
@@ -88,7 +88,7 @@ class Atomically::QueryService
88
88
  @klass.transaction do
89
89
  @relation.connection.execute('SET @ids := NULL')
90
90
  @relation.where("(SELECT @ids := CONCAT_WS(',', #{id_column}, @ids))").update_all(*args) # 撈出有真的被更新的 id,用逗號串在一起
91
- ids = @klass.from(nil).pluck(Arel.sql('@ids')).first
91
+ ids = @klass.from(Arel.sql('DUAL')).pluck(Arel.sql('@ids')).first
92
92
  end
93
93
  return ids.try{|s| s.split(',').map(&:to_i).uniq.sort } || [] # 將 id 從字串取出來 @id 的格式範例: '1,4,12'
94
94
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Atomically
4
- VERSION = '1.1.3'
4
+ VERSION = '1.1.4'
5
5
  end
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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-19 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler