update_values_all 1.0.2 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85a13e35a594f137fea9231a1b0b38130c412487ae0b3c9934488de419022113
4
- data.tar.gz: 00ff2728e7fd0505cb767d20d4a29357abfc596b88736475baf1e35bb06bbb2d
3
+ metadata.gz: f71e64cbaa8a9deadadfcc8ee812e3625e955eeff998b55871bf1bde85c66a6c
4
+ data.tar.gz: dfbff95794c8ad1ce0c7b9231baa132a695599cc3351ed0c31b6961b0a1e4ec1
5
5
  SHA512:
6
- metadata.gz: 53f2254a4a3eb2ecfa1ba86de54d5bd3c20efd6e02b4b752dda8f0bac8b5fc6f54b2894118ad8cd43bcbaed6963b9f272ad8dd0370c603c904ef4d8cb0006819
7
- data.tar.gz: 16e08bb8ea4b8d73373c6a4013154b7b19aa7d1d27295e2ced90db2abe37d2534e5af4546e077a5585ed02af8906ca1e21e191ae5585bd1e9b80bfe466014eba
6
+ metadata.gz: 3423fdcaa0d005e2abc4af2eb8d0645a77aebc6e423b70ba316e5bba7a4c49f1f1a7db200e8bad00e3b688a34df0b8c4b6001f6e550881f10ba9d00e8fca6260
7
+ data.tar.gz: c79f7b4bc6e0e60b74557ea53cc4fbec6f576af63f2d42dde2ace760c7f2098dda162ca3860848dda119be33a06f4e0561555555d70b9e89e3b4962aa0dd3d98
data/.rubocop.yml CHANGED
@@ -3,4 +3,7 @@ inherit_gem:
3
3
  - ./config/default.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.7
6
+ TargetRubyVersion: 3.1
7
+
8
+ Gp/OptArgParameters:
9
+ Enabled: false
data/Appraisals ADDED
@@ -0,0 +1,7 @@
1
+ appraise "activerecord-6.1" do
2
+ gem "activerecord", "~> 6.1"
3
+ end
4
+
5
+ appraise "activerecord-7.1" do
6
+ gem "activerecord", ">= 7.1"
7
+ end
data/Gemfile.lock CHANGED
@@ -1,150 +1,234 @@
1
1
  GIT
2
2
  remote: https://github.com/corp-gp/rubocop-gp.git
3
- revision: 8002f0236b97e26586218f6cc677761d13affbdb
3
+ revision: 1039b83ebd2f8334df6175d410f9a1b025d97384
4
4
  specs:
5
- rubocop-gp (0.0.3)
5
+ rubocop-gp (0.0.4)
6
6
  rubocop
7
+ rubocop-capybara
8
+ rubocop-factory_bot
7
9
  rubocop-performance
8
10
  rubocop-rails
9
11
  rubocop-rspec
12
+ rubocop-rspec_rails
10
13
 
11
14
  PATH
12
15
  remote: .
13
16
  specs:
14
- update_values_all (1.0.2)
15
- activerecord (>= 4.2)
17
+ update_values_all (1.1.0)
16
18
 
17
19
  GEM
18
20
  remote: https://rubygems.org/
19
21
  specs:
20
- actionpack (7.0.4.3)
21
- actionview (= 7.0.4.3)
22
- activesupport (= 7.0.4.3)
23
- rack (~> 2.0, >= 2.2.0)
22
+ actionpack (7.2.2.1)
23
+ actionview (= 7.2.2.1)
24
+ activesupport (= 7.2.2.1)
25
+ nokogiri (>= 1.8.5)
26
+ racc
27
+ rack (>= 2.2.4, < 3.2)
28
+ rack-session (>= 1.0.1)
24
29
  rack-test (>= 0.6.3)
25
- rails-dom-testing (~> 2.0)
26
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
27
- actionview (7.0.4.3)
28
- activesupport (= 7.0.4.3)
30
+ rails-dom-testing (~> 2.2)
31
+ rails-html-sanitizer (~> 1.6)
32
+ useragent (~> 0.16)
33
+ actionview (7.2.2.1)
34
+ activesupport (= 7.2.2.1)
29
35
  builder (~> 3.1)
30
- erubi (~> 1.4)
31
- rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
33
- activemodel (7.0.4.3)
34
- activesupport (= 7.0.4.3)
35
- activerecord (7.0.4.3)
36
- activemodel (= 7.0.4.3)
37
- activesupport (= 7.0.4.3)
38
- activesupport (7.0.4.3)
39
- concurrent-ruby (~> 1.0, >= 1.0.2)
36
+ erubi (~> 1.11)
37
+ rails-dom-testing (~> 2.2)
38
+ rails-html-sanitizer (~> 1.6)
39
+ activesupport (7.2.2.1)
40
+ base64
41
+ benchmark (>= 0.3)
42
+ bigdecimal
43
+ concurrent-ruby (~> 1.0, >= 1.3.1)
44
+ connection_pool (>= 2.2.5)
45
+ drb
40
46
  i18n (>= 1.6, < 2)
47
+ logger (>= 1.4.2)
41
48
  minitest (>= 5.1)
42
- tzinfo (~> 2.0)
43
- ast (2.4.2)
44
- builder (3.2.4)
45
- combustion (1.3.7)
49
+ securerandom (>= 0.3)
50
+ tzinfo (~> 2.0, >= 2.0.5)
51
+ appraisal (2.5.0)
52
+ bundler
53
+ rake
54
+ thor (>= 0.14.0)
55
+ ast (2.4.3)
56
+ base64 (0.2.0)
57
+ benchmark (0.4.0)
58
+ bigdecimal (3.1.9)
59
+ builder (3.3.0)
60
+ combustion (1.5.0)
46
61
  activesupport (>= 3.0.0)
47
62
  railties (>= 3.0.0)
48
63
  thor (>= 0.14.6)
49
- concurrent-ruby (1.2.2)
64
+ concurrent-ruby (1.3.5)
65
+ connection_pool (2.5.0)
50
66
  crass (1.0.6)
51
- diff-lcs (1.5.0)
52
- dotenv (2.8.1)
53
- dotenv-rails (2.8.1)
54
- dotenv (= 2.8.1)
55
- railties (>= 3.2)
56
- erubi (1.12.0)
57
- i18n (1.12.0)
67
+ date (3.4.1)
68
+ diff-lcs (1.6.1)
69
+ dotenv (3.1.7)
70
+ dotenv-rails (3.1.7)
71
+ dotenv (= 3.1.7)
72
+ railties (>= 6.1)
73
+ drb (2.2.1)
74
+ erubi (1.13.1)
75
+ i18n (1.14.7)
58
76
  concurrent-ruby (~> 1.0)
59
- json (2.6.3)
60
- lefthook (1.3.8)
61
- loofah (2.19.1)
77
+ io-console (0.8.0)
78
+ irb (1.15.2)
79
+ pp (>= 0.6.0)
80
+ rdoc (>= 4.0.0)
81
+ reline (>= 0.4.2)
82
+ json (2.10.2)
83
+ language_server-protocol (3.17.0.4)
84
+ lefthook (1.11.8)
85
+ lint_roller (1.1.0)
86
+ logger (1.7.0)
87
+ loofah (2.24.0)
62
88
  crass (~> 1.0.2)
63
- nokogiri (>= 1.5.9)
64
- method_source (1.0.0)
65
- minitest (5.18.0)
66
- nokogiri (1.14.2-x86_64-linux)
89
+ nokogiri (>= 1.12.0)
90
+ minitest (5.25.5)
91
+ nokogiri (1.18.7-aarch64-linux-gnu)
92
+ racc (~> 1.4)
93
+ nokogiri (1.18.7-aarch64-linux-musl)
94
+ racc (~> 1.4)
95
+ nokogiri (1.18.7-arm-linux-gnu)
96
+ racc (~> 1.4)
97
+ nokogiri (1.18.7-arm-linux-musl)
98
+ racc (~> 1.4)
99
+ nokogiri (1.18.7-arm64-darwin)
67
100
  racc (~> 1.4)
68
- parallel (1.22.1)
69
- parser (3.2.1.1)
101
+ nokogiri (1.18.7-x86_64-darwin)
102
+ racc (~> 1.4)
103
+ nokogiri (1.18.7-x86_64-linux-gnu)
104
+ racc (~> 1.4)
105
+ nokogiri (1.18.7-x86_64-linux-musl)
106
+ racc (~> 1.4)
107
+ parallel (1.26.3)
108
+ parser (3.3.7.4)
70
109
  ast (~> 2.4.1)
71
- pg (1.4.6)
72
- racc (1.6.2)
73
- rack (2.2.6.4)
74
- rack-test (2.1.0)
110
+ racc
111
+ pg (1.5.9)
112
+ pp (0.6.2)
113
+ prettyprint
114
+ prettyprint (0.2.0)
115
+ prism (1.4.0)
116
+ psych (5.2.3)
117
+ date
118
+ stringio
119
+ racc (1.8.1)
120
+ rack (3.1.12)
121
+ rack-session (2.1.0)
122
+ base64 (>= 0.1.0)
123
+ rack (>= 3.0.0)
124
+ rack-test (2.2.0)
75
125
  rack (>= 1.3)
76
- rails-dom-testing (2.0.3)
77
- activesupport (>= 4.2.0)
126
+ rackup (2.2.1)
127
+ rack (>= 3)
128
+ rails-dom-testing (2.2.0)
129
+ activesupport (>= 5.0.0)
130
+ minitest
78
131
  nokogiri (>= 1.6)
79
- rails-html-sanitizer (1.5.0)
80
- loofah (~> 2.19, >= 2.19.1)
81
- railties (7.0.4.3)
82
- actionpack (= 7.0.4.3)
83
- activesupport (= 7.0.4.3)
84
- method_source
132
+ rails-html-sanitizer (1.6.2)
133
+ loofah (~> 2.21)
134
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
135
+ railties (7.2.2.1)
136
+ actionpack (= 7.2.2.1)
137
+ activesupport (= 7.2.2.1)
138
+ irb (~> 1.13)
139
+ rackup (>= 1.0.0)
85
140
  rake (>= 12.2)
86
- thor (~> 1.0)
87
- zeitwerk (~> 2.5)
141
+ thor (~> 1.0, >= 1.2.2)
142
+ zeitwerk (~> 2.6)
88
143
  rainbow (3.1.1)
89
- rake (13.0.6)
90
- regexp_parser (2.7.0)
91
- rexml (3.2.5)
92
- rspec (3.11.0)
93
- rspec-core (~> 3.11.0)
94
- rspec-expectations (~> 3.11.0)
95
- rspec-mocks (~> 3.11.0)
96
- rspec-core (3.11.0)
97
- rspec-support (~> 3.11.0)
98
- rspec-expectations (3.11.0)
144
+ rake (13.2.1)
145
+ rdoc (6.13.1)
146
+ psych (>= 4.0.0)
147
+ regexp_parser (2.10.0)
148
+ reline (0.6.1)
149
+ io-console (~> 0.5)
150
+ rspec (3.13.0)
151
+ rspec-core (~> 3.13.0)
152
+ rspec-expectations (~> 3.13.0)
153
+ rspec-mocks (~> 3.13.0)
154
+ rspec-core (3.13.3)
155
+ rspec-support (~> 3.13.0)
156
+ rspec-expectations (3.13.3)
99
157
  diff-lcs (>= 1.2.0, < 2.0)
100
- rspec-support (~> 3.11.0)
101
- rspec-mocks (3.11.1)
158
+ rspec-support (~> 3.13.0)
159
+ rspec-mocks (3.13.2)
102
160
  diff-lcs (>= 1.2.0, < 2.0)
103
- rspec-support (~> 3.11.0)
104
- rspec-rails (6.0.1)
105
- actionpack (>= 6.1)
106
- activesupport (>= 6.1)
107
- railties (>= 6.1)
108
- rspec-core (~> 3.11)
109
- rspec-expectations (~> 3.11)
110
- rspec-mocks (~> 3.11)
111
- rspec-support (~> 3.11)
112
- rspec-support (3.11.0)
113
- rubocop (1.48.1)
161
+ rspec-support (~> 3.13.0)
162
+ rspec-rails (7.1.1)
163
+ actionpack (>= 7.0)
164
+ activesupport (>= 7.0)
165
+ railties (>= 7.0)
166
+ rspec-core (~> 3.13)
167
+ rspec-expectations (~> 3.13)
168
+ rspec-mocks (~> 3.13)
169
+ rspec-support (~> 3.13)
170
+ rspec-support (3.13.2)
171
+ rubocop (1.75.2)
114
172
  json (~> 2.3)
173
+ language_server-protocol (~> 3.17.0.2)
174
+ lint_roller (~> 1.1.0)
115
175
  parallel (~> 1.10)
116
- parser (>= 3.2.0.0)
176
+ parser (>= 3.3.0.2)
117
177
  rainbow (>= 2.2.2, < 4.0)
118
- regexp_parser (>= 1.8, < 3.0)
119
- rexml (>= 3.2.5, < 4.0)
120
- rubocop-ast (>= 1.26.0, < 2.0)
178
+ regexp_parser (>= 2.9.3, < 3.0)
179
+ rubocop-ast (>= 1.44.0, < 2.0)
121
180
  ruby-progressbar (~> 1.7)
122
- unicode-display_width (>= 2.4.0, < 3.0)
123
- rubocop-ast (1.28.0)
124
- parser (>= 3.2.1.0)
125
- rubocop-capybara (2.17.1)
126
- rubocop (~> 1.41)
127
- rubocop-performance (1.16.0)
128
- rubocop (>= 1.7.0, < 2.0)
129
- rubocop-ast (>= 0.4.0)
130
- rubocop-rails (2.18.0)
181
+ unicode-display_width (>= 2.4.0, < 4.0)
182
+ rubocop-ast (1.44.0)
183
+ parser (>= 3.3.7.2)
184
+ prism (~> 1.4)
185
+ rubocop-capybara (2.22.1)
186
+ lint_roller (~> 1.1)
187
+ rubocop (~> 1.72, >= 1.72.1)
188
+ rubocop-factory_bot (2.27.1)
189
+ lint_roller (~> 1.1)
190
+ rubocop (~> 1.72, >= 1.72.1)
191
+ rubocop-performance (1.25.0)
192
+ lint_roller (~> 1.1)
193
+ rubocop (>= 1.75.0, < 2.0)
194
+ rubocop-ast (>= 1.38.0, < 2.0)
195
+ rubocop-rails (2.31.0)
131
196
  activesupport (>= 4.2.0)
197
+ lint_roller (~> 1.1)
132
198
  rack (>= 1.1)
133
- rubocop (>= 1.33.0, < 2.0)
134
- rubocop-rspec (2.19.0)
135
- rubocop (~> 1.33)
136
- rubocop-capybara (~> 2.17)
199
+ rubocop (>= 1.75.0, < 2.0)
200
+ rubocop-ast (>= 1.38.0, < 2.0)
201
+ rubocop-rspec (3.5.0)
202
+ lint_roller (~> 1.1)
203
+ rubocop (~> 1.72, >= 1.72.1)
204
+ rubocop-rspec_rails (2.31.0)
205
+ lint_roller (~> 1.1)
206
+ rubocop (~> 1.72, >= 1.72.1)
207
+ rubocop-rspec (~> 3.5)
137
208
  ruby-progressbar (1.13.0)
138
- thor (1.2.1)
209
+ securerandom (0.4.1)
210
+ stringio (3.1.6)
211
+ thor (1.3.2)
139
212
  tzinfo (2.0.6)
140
213
  concurrent-ruby (~> 1.0)
141
- unicode-display_width (2.4.2)
142
- zeitwerk (2.6.7)
214
+ unicode-display_width (3.1.4)
215
+ unicode-emoji (~> 4.0, >= 4.0.4)
216
+ unicode-emoji (4.0.4)
217
+ useragent (0.16.11)
218
+ zeitwerk (2.6.18)
143
219
 
144
220
  PLATFORMS
145
- x86_64-linux
221
+ aarch64-linux-gnu
222
+ aarch64-linux-musl
223
+ arm-linux-gnu
224
+ arm-linux-musl
225
+ arm64-darwin
226
+ x86_64-darwin
227
+ x86_64-linux-gnu
228
+ x86_64-linux-musl
146
229
 
147
230
  DEPENDENCIES
231
+ appraisal
148
232
  combustion
149
233
  dotenv-rails
150
234
  lefthook
@@ -155,4 +239,4 @@ DEPENDENCIES
155
239
  update_values_all!
156
240
 
157
241
  BUNDLED WITH
158
- 2.4.6
242
+ 2.5.7
data/README.md CHANGED
@@ -38,7 +38,7 @@ changed_ids =
38
38
  { id: 1, address: { city: 'Berlin' }, name: 'Hanz' },
39
39
  { id: 2, address: { city: 'London' }, name: 'John' }
40
40
  ],
41
- key_to_match: :id,
41
+ key_to_match: :id, # :key_to_match can be omitted if it matches primary key
42
42
  )
43
43
  ```
44
44
 
@@ -4,8 +4,9 @@ module UpdateValuesAll
4
4
  module Adapters
5
5
  module Postgres
6
6
 
7
- def pg_update_values_all(data, key_to_match:, touch: false, sql_update_expression: 'updated_at = CURRENT_TIMESTAMP')
7
+ def pg_update_values_all(data, key_to_match:, touch: false, sql_update_expression: "updated_at = CURRENT_TIMESTAMP")
8
8
  keys = data.first.keys
9
+ key_to_match = Array.wrap(key_to_match)
9
10
 
10
11
  sql_values = +''
11
12
  data.each do |hash_row|
@@ -23,26 +24,24 @@ module UpdateValuesAll
23
24
  end
24
25
  sql_values.chop!
25
26
 
26
- updated_keys = keys.join(', ')
27
+ updated_keys = keys.join(", ")
27
28
 
28
29
  sql_types = data[0].keys.index_with { |column_name| column_for_attribute(column_name).sql_type_metadata.sql_type }
29
30
  set_expr =
30
31
  if block_given?
31
32
  +yield
32
33
  else
33
- keys
34
- .reject { |key| key == key_to_match }
34
+ (keys - key_to_match)
35
35
  .map { |key| "#{key} = updated_data.#{key}::#{sql_types[key]}" }
36
- .join(', ')
36
+ .join(", ")
37
37
  end
38
38
  only_changed_expr =
39
39
  if touch
40
- 'TRUE'
40
+ "TRUE"
41
41
  else
42
- keys
43
- .reject { |key| key == key_to_match }
42
+ (keys - key_to_match)
44
43
  .map { |key| "#{table_name}.#{key} IS DISTINCT FROM updated_data.#{key}::#{sql_types[key]}" }
45
- .join(' OR ')
44
+ .join(" OR ")
46
45
  end
47
46
 
48
47
  if sql_update_expression.present?
@@ -50,12 +49,12 @@ module UpdateValuesAll
50
49
  end
51
50
 
52
51
  existing_data_sql =
53
- select("#{table_name}.#{key_to_match}") # rubocop:disable Gp/PotentialSqlInjection
54
- .where("#{key_to_match} IN (SELECT #{key_to_match} FROM updated_data)")
52
+ select(primary_keys_sql(key_to_match, table_name)) # rubocop:disable Gp/PotentialSqlInjection
53
+ .where("(#{primary_keys_sql(key_to_match, table_name)}) IN (SELECT #{primary_keys_sql(key_to_match, 'updated_data')} FROM updated_data)")
55
54
  .to_sql
56
55
 
57
56
  changed_ids =
58
- connection.query(<<~SQL).flatten # rubocop:disable Gp/PotentialSqlInjection
57
+ connection.query(<<~SQL) # rubocop:disable Gp/PotentialSqlInjection
59
58
  WITH
60
59
  updated_data(#{updated_keys}) AS (
61
60
  VALUES #{sql_values}
@@ -65,19 +64,23 @@ module UpdateValuesAll
65
64
  )
66
65
  UPDATE #{table_name}
67
66
  SET #{set_expr}
68
- FROM updated_data JOIN existing_data ON existing_data.#{key_to_match} = updated_data.#{key_to_match}
67
+ FROM updated_data JOIN existing_data ON (#{primary_keys_sql(key_to_match, 'existing_data')}) = (#{primary_keys_sql(key_to_match, 'updated_data')})
69
68
  WHERE
70
- updated_data.#{key_to_match} = #{table_name}.#{key_to_match}
71
- AND #{table_name}.#{key_to_match} = existing_data.#{key_to_match}
69
+ (#{primary_keys_sql(key_to_match, 'updated_data')}) = (#{primary_keys_sql(key_to_match, table_name)})
70
+ AND (#{primary_keys_sql(key_to_match, table_name)}) = (#{primary_keys_sql(key_to_match, 'existing_data')})
72
71
  AND (#{only_changed_expr})
73
- RETURNING #{table_name}.#{key_to_match}
72
+ RETURNING #{primary_keys_sql(key_to_match, table_name)}
74
73
  SQL
75
74
 
76
75
  connection.query_cache.clear if connection.query_cache_enabled
77
76
 
78
- changed_ids
77
+ # When the primary key is composite (multi-column), we return an array of arrays
78
+ key_to_match.size == 1 ? changed_ids.flatten : changed_ids
79
79
  end
80
80
 
81
+ private def primary_keys_sql(keys, table_name)
82
+ keys.map { |key| "#{table_name}.#{key}" }.join(", ")
83
+ end
81
84
  end
82
85
  end
83
86
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'update_values_all/adapters/postgres'
3
+ require "update_values_all/adapters/postgres"
4
4
 
5
5
  module UpdateValuesAll
6
6
  module BatchUpdate
@@ -14,6 +14,8 @@ module UpdateValuesAll
14
14
  def update_values_all(data, **keyword_args)
15
15
  return [] if data.empty?
16
16
 
17
+ keyword_args[:key_to_match] ||= primary_key
18
+
17
19
  if defined?(::PG::Connection) && connection.raw_connection.is_a?(::PG::Connection)
18
20
  pg_update_values_all(data, **keyword_args)
19
21
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module UpdateValuesAll
4
4
 
5
- VERSION = '1.0.2'
5
+ VERSION = '1.2.0'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,30 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update_values_all
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Malykh
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-29 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activerecord
14
+ name: appraisal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
20
- type: :runtime
19
+ version: '0'
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.2'
27
- description:
26
+ version: '0'
27
+ description:
28
28
  email:
29
29
  - xronos.i.am@gmail.com
30
30
  executables: []
@@ -35,6 +35,7 @@ files:
35
35
  - ".env.sample"
36
36
  - ".rspec"
37
37
  - ".rubocop.yml"
38
+ - Appraisals
38
39
  - CHANGELOG.md
39
40
  - CODE_OF_CONDUCT.md
40
41
  - Gemfile
@@ -48,7 +49,6 @@ files:
48
49
  - lib/update_values_all/batch_update.rb
49
50
  - lib/update_values_all/railtie.rb
50
51
  - lib/update_values_all/version.rb
51
- - update_values_all.gemspec
52
52
  homepage: https://github.com/corp-gp/update_values_all
53
53
  licenses:
54
54
  - MIT
@@ -58,7 +58,7 @@ metadata:
58
58
  source_code_uri: https://github.com/corp-gp/update_values_all
59
59
  changelog_uri: https://github.com/corp-gp/update_values_all/CHANGELOG.md
60
60
  rubygems_mfa_required: 'true'
61
- post_install_message:
61
+ post_install_message:
62
62
  rdoc_options: []
63
63
  require_paths:
64
64
  - lib
@@ -73,8 +73,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.4.6
77
- signing_key:
76
+ rubygems_version: 3.3.7
77
+ signing_key:
78
78
  specification_version: 4
79
79
  summary: The gem allows to update AR-records in batch
80
80
  test_files: []
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/update_values_all/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'update_values_all'
7
- spec.version = UpdateValuesAll::VERSION
8
- spec.authors = ['Sergei Malykh']
9
- spec.email = ['xronos.i.am@gmail.com']
10
-
11
- spec.summary = 'The gem allows to update AR-records in batch'
12
- spec.homepage = 'https://github.com/corp-gp/update_values_all'
13
- spec.license = 'MIT'
14
- spec.required_ruby_version = '>= 2.7.0'
15
-
16
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
17
-
18
- spec.metadata['homepage_uri'] = spec.homepage
19
- spec.metadata['source_code_uri'] = 'https://github.com/corp-gp/update_values_all'
20
- spec.metadata['changelog_uri'] = 'https://github.com/corp-gp/update_values_all/CHANGELOG.md'
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files =
25
- Dir.chdir(__dir__) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
28
- end
29
- end
30
- spec.require_paths = ['lib']
31
-
32
- spec.add_dependency 'activerecord', '>= 4.2'
33
-
34
- # For more information and examples about making a new gem, check out our
35
- # guide at: https://bundler.io/guides/creating_gem.html
36
- spec.metadata['rubygems_mfa_required'] = 'true'
37
- end