lhm-shopify 3.5.5 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +6 -6
  3. data/Appraisals +8 -13
  4. data/CHANGELOG.md +10 -0
  5. data/Gemfile.lock +22 -20
  6. data/README.md +14 -7
  7. data/dev.yml +9 -8
  8. data/docker-compose.yml +2 -0
  9. data/gemfiles/activerecord_6.0.gemfile +1 -1
  10. data/gemfiles/activerecord_6.0.gemfile.lock +25 -21
  11. data/gemfiles/activerecord_6.1.gemfile.lock +17 -13
  12. data/gemfiles/{activerecord_7.0.0.alpha2.gemfile → activerecord_7.0.gemfile} +1 -1
  13. data/gemfiles/{activerecord_7.0.0.alpha2.gemfile.lock → activerecord_7.0.gemfile.lock} +23 -19
  14. data/gemfiles/{activerecord_5.2.gemfile → activerecord_7.1.0.beta1.gemfile} +1 -3
  15. data/gemfiles/activerecord_7.1.0.beta1.gemfile.lock +81 -0
  16. data/lhm.gemspec +1 -1
  17. data/lib/lhm/sql_helper.rb +1 -1
  18. data/lib/lhm/throttler/replica_lag.rb +162 -0
  19. data/lib/lhm/throttler/slave_lag.rb +5 -155
  20. data/lib/lhm/throttler/threads_running.rb +3 -1
  21. data/lib/lhm/throttler.rb +7 -3
  22. data/lib/lhm/version.rb +1 -1
  23. data/spec/.lhm.example +1 -1
  24. data/spec/README.md +8 -9
  25. data/spec/integration/atomic_switcher_spec.rb +2 -2
  26. data/spec/integration/chunk_insert_spec.rb +2 -2
  27. data/spec/integration/chunker_spec.rb +33 -38
  28. data/spec/integration/database.yml +1 -1
  29. data/spec/integration/entangler_spec.rb +4 -4
  30. data/spec/integration/integration_helper.rb +12 -12
  31. data/spec/integration/lhm_spec.rb +41 -31
  32. data/spec/integration/locked_switcher_spec.rb +2 -2
  33. data/spec/integration/toxiproxy_helper.rb +1 -1
  34. data/spec/unit/printer_spec.rb +2 -6
  35. data/spec/unit/sql_helper_spec.rb +2 -2
  36. data/spec/unit/throttler/{slave_lag_spec.rb → replica_lag_spec.rb} +79 -79
  37. data/spec/unit/throttler/threads_running_spec.rb +18 -0
  38. data/spec/unit/throttler_spec.rb +8 -8
  39. metadata +10 -9
  40. data/gemfiles/activerecord_5.2.gemfile.lock +0 -65
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3893b743c675e62933e58a4f56c0ac2dba1b1081afabc779dc1d899406e7c42
4
- data.tar.gz: 569175938b8069e0036f881400b9427180283ec61c29ca5d509a7090a7f8a9ba
3
+ metadata.gz: 34c64cb93bda1fe53758ea181451438890d8460e167784dfff3255aba7ccf662
4
+ data.tar.gz: 14e18340ed78985984b93c8d36328ccb9a29d1318639e190ad98f5ceecdf828c
5
5
  SHA512:
6
- metadata.gz: ba3ebf953f97cd793c52cb83fee77dd4436877ca01a51ee6d718c7937916e391a32c659b9f403b62f65cf0a326dc755e6221e3311760738c9c6fb442746e1617
7
- data.tar.gz: 2e617329a895d00a2541539526e941fc94dfda8285083d46d4179587a31786cbbb1062bd8dbdfffcc4d046801944ac96aa700c32618a4db9f4346345e9105c7c
6
+ metadata.gz: 4f83e952632a11d868a75da5d9b2e64b7326090ed0b37f74d221f8b86a1345bef783c5d56ca82691d13067b410cf0926d2e88be0939c9cb925b66f418e4fcb9e
7
+ data.tar.gz: 6aefea0808ed1ba537d550464492784f9b2cc504858a2524cf7c74bde16123c4be0eb0965c206f8f3cb0c2cceca48bc17651d111e8d9401a7f3c762efbcef7a3
@@ -15,14 +15,14 @@ jobs:
15
15
  fail-fast: false
16
16
  matrix:
17
17
  include:
18
- - ruby-version: "2.4"
19
- activerecord-version: "5.2"
20
- - ruby-version: "2.5"
18
+ - ruby-version: "3.0"
21
19
  activerecord-version: "6.0"
22
- - ruby-version: "2.7.5"
20
+ - ruby-version: "3.1"
23
21
  activerecord-version: "6.1"
24
- - ruby-version: "3.0"
25
- activerecord-version: "7.0.0.alpha2"
22
+ - ruby-version: "3.2"
23
+ activerecord-version: "7.0"
24
+ - ruby-version: "3.2"
25
+ activerecord-version: "7.1.0.beta1"
26
26
  steps:
27
27
  - uses: actions/checkout@v2
28
28
  - name: Set up Ruby
data/Appraisals CHANGED
@@ -1,16 +1,6 @@
1
- # Oldest supported Rails version
2
- appraise "activerecord-5.2" do
3
- gem "activerecord", "5.2.6"
4
-
5
- # This gemfile will be ran against ruby 2.4 and some gems might require 2.4+. The following list are the gems
6
- # and their respective versions that work with ruby <= 2.4
7
- gem "simplecov", "0.18.5"
8
- gem "docile", "1.3.5"
9
- end
10
-
11
1
  # First conflicted version
12
2
  appraise "activerecord-6.0" do
13
- gem "activerecord", "6.0.0"
3
+ gem "activerecord", "6.0.3"
14
4
  end
15
5
 
16
6
  # Second conflicted version
@@ -19,6 +9,11 @@ appraise "activerecord-6.1" do
19
9
  end
20
10
 
21
11
  # Latest version at the moment
22
- appraise "activerecord-7.0.0.alpha2" do
23
- gem "activerecord", "7.0.0.alpha2"
12
+ appraise "activerecord-7.0" do
13
+ gem "activerecord", "7.0.8"
14
+ end
15
+
16
+ # Next release
17
+ appraise "activerecord-7.1.0.beta1" do
18
+ gem "activerecord", "7.1.0.beta1"
24
19
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # Unreleased
2
+
3
+ # 4.0.0 (Sep, 2023)
4
+ * Deprecate `SlaveLag` throttler class name. Use `ReplicaLag` instead (https://github.com/Shopify/lhm/pull/144)
5
+ * Deprecate `slave_lag_throttler` throttler config value. Use `replica_lag_throttler` instead (https://github.com/Shopify/lhm/pull/144)
6
+ * Fix errors when creating indexes with whitespace between column names and sizes. (https://github.com/Shopify/lhm/pull/145)
7
+ * Test against Ruby 3.2 and Rails 7.1.0.beta1. (https://github.com/Shopify/lhm/pull/146)
8
+ * Drop support for Ruby 2 and Rails 5. (https://github.com/Shopify/lhm/pull/148)
9
+ * Fix thread throttler #stride API. (https://github.com/Shopify/lhm/pull/131)
10
+
1
11
  # 3.5.5 (Jan, 2022)
2
12
  * Fix error where from Config shadowing which would cause LHM to abort on reconnect (https://github.com/Shopify/lhm/pull/128)
3
13
 
data/Gemfile.lock CHANGED
@@ -1,51 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lhm-shopify (3.5.5)
4
+ lhm-shopify (4.0.0)
5
5
  retriable (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.1.4.1)
11
- activesupport (= 6.1.4.1)
12
- activerecord (6.1.4.1)
13
- activemodel (= 6.1.4.1)
14
- activesupport (= 6.1.4.1)
15
- activesupport (6.1.4.1)
10
+ activemodel (7.0.8)
11
+ activesupport (= 7.0.8)
12
+ activerecord (7.0.8)
13
+ activemodel (= 7.0.8)
14
+ activesupport (= 7.0.8)
15
+ activesupport (7.0.8)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
- zeitwerk (~> 2.3)
21
20
  after_do (0.4.0)
22
- appraisal (2.4.1)
21
+ appraisal (2.5.0)
23
22
  bundler
24
23
  rake
25
24
  thor (>= 0.14.0)
26
25
  byebug (11.1.3)
27
- concurrent-ruby (1.1.9)
26
+ concurrent-ruby (1.2.2)
28
27
  docile (1.4.0)
29
- i18n (1.8.11)
28
+ i18n (1.14.1)
30
29
  concurrent-ruby (~> 1.0)
31
- minitest (5.14.4)
32
- mocha (1.13.0)
33
- mysql2 (0.5.3)
30
+ minitest (5.20.0)
31
+ mocha (2.1.0)
32
+ ruby2_keywords (>= 0.0.5)
33
+ mysql2 (0.5.5)
34
34
  rake (13.0.6)
35
35
  retriable (3.1.2)
36
- simplecov (0.21.2)
36
+ ruby2_keywords (0.0.5)
37
+ simplecov (0.22.0)
37
38
  docile (~> 1.1)
38
39
  simplecov-html (~> 0.11)
39
40
  simplecov_json_formatter (~> 0.1)
40
41
  simplecov-html (0.12.3)
41
- simplecov_json_formatter (0.1.3)
42
- thor (1.1.0)
43
- toxiproxy (2.0.0)
44
- tzinfo (2.0.4)
42
+ simplecov_json_formatter (0.1.4)
43
+ thor (1.2.2)
44
+ toxiproxy (2.0.2)
45
+ tzinfo (2.0.6)
45
46
  concurrent-ruby (~> 1.0)
46
- zeitwerk (2.5.1)
47
47
 
48
48
  PLATFORMS
49
+ arm64-darwin-21
50
+ arm64-darwin-22
49
51
  x86_64-darwin-20
50
52
  x86_64-linux
51
53
 
data/README.md CHANGED
@@ -57,7 +57,7 @@ a single integer numeric key column named `id`.
57
57
 
58
58
  ## Installation
59
59
 
60
- Install it via `gem install lhm` or by adding `gem "lhm"` to your `Gemfile`.
60
+ Install it via `gem install lhm-shopify` or by adding `gem "lhm-shopify"` to your `Gemfile`.
61
61
 
62
62
  ## Usage
63
63
 
@@ -165,13 +165,13 @@ Lhm.change_table :users, throttler: my_throttler do |m|
165
165
  end
166
166
  ```
167
167
 
168
- ### SlaveLag Throttler
168
+ ### ReplicaLag Throttler
169
169
 
170
170
  Lhm uses by default the time throttler, however a better solution is to throttle the copy of the data
171
- depending on the time that the slaves are behind. To use the SlaveLag throttler:
171
+ depending on the time that the replicas are behind. To use the ReplicaLag throttler:
172
172
 
173
173
  ```ruby
174
- Lhm.change_table :users, throttler: :slave_lag_throttler do |m|
174
+ Lhm.change_table :users, throttler: :replica_lag_throttler do |m|
175
175
  ...
176
176
  end
177
177
  ```
@@ -179,7 +179,7 @@ end
179
179
  Or to set that as default throttler, use the following (for instance in a Rails initializer):
180
180
 
181
181
  ```ruby
182
- Lhm.setup_throttler(:slave_lag_throttler)
182
+ Lhm.setup_throttler(:replica_lag_throttler)
183
183
  ```
184
184
 
185
185
  ### ThreadsRunning Throttler
@@ -189,6 +189,13 @@ throttle based on the number of threads running in MySQL, as a proxy for "is
189
189
  this operation causing excessive load":
190
190
 
191
191
  ```ruby
192
+ my_throttler = Lhm::Throttler::ThreadsRunning.new(stride: 100_000)
193
+
194
+ Lhm.change_table :users, throttler: my_throttler do |m|
195
+ ...
196
+ end
197
+
198
+ # or use default settings:
192
199
  Lhm.change_table :users, throttler: :threads_running_throttler do |m|
193
200
  ...
194
201
  end
@@ -312,7 +319,7 @@ bundle update
312
319
  bundle exec appraisals install
313
320
  ```
314
321
 
315
- ### Docker Compose
322
+ ### Podman Compose
316
323
  The integration tests rely on a replication configuration for MySQL which is being proxied by an instance of ProxySQL.
317
324
  It is important that every container is running to execute the integration test suite.
318
325
 
@@ -327,7 +334,7 @@ The license is included as [LICENSE](LICENSE) in this directory.
327
334
  * [Twitter][2]
328
335
  * [pt-online-schema-change][3]
329
336
 
330
- [0]: http://openarkkit.googlecode.com
337
+ [0]: https://shlomi-noach.github.io/openarkkit/introduction.html
331
338
  [1]: http://www.facebook.com/note.php?note\_id=430801045932
332
339
  [2]: https://github.com/freels/table_migrator
333
340
  [3]: http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html
data/dev.yml CHANGED
@@ -5,17 +5,17 @@ up:
5
5
  or: [mysql@5.7]
6
6
  conflicts: [shopify/shopify/mysql-client, mysql-connector-c, mysql, mysql-client]
7
7
  - wget
8
- - ruby: 2.7.5
8
+ - ruby: 3.2.2
9
9
  - bundler
10
+ - podman
10
11
  - custom:
11
12
  name: Get Appraisal gems
12
13
  met?: bundle exec appraisal install
13
14
  meet: ":"
14
- - docker
15
15
  - custom:
16
- name: Docker Compose
17
- met?: docker compose ls | grep -ioE -q "lhm.*running\(4\)"
18
- meet: docker compose up -d
16
+ name: Podman compose
17
+ met?: podman-compose ls | grep -ioE -q "lhm.*running\(4\)"
18
+ meet: podman-compose up -d
19
19
  - custom:
20
20
  name: Waiting for DBs to be operational
21
21
  met?: ./scripts/helpers/wait-for-dbs.sh
@@ -25,7 +25,8 @@ commands:
25
25
  unit: bundle exec rake unit
26
26
  int: bundle exec rake integration
27
27
  test:
28
- optional: file
28
+ syntax:
29
+ optional: file
29
30
  aliases: [ t ]
30
31
  run: |
31
32
  if [[ $# -eq 0 ]]; then
@@ -37,9 +38,9 @@ commands:
37
38
  cov: rm -rf coverage; COV=1 bundle exec rake unit && bundle exec rake integration; open coverage/index.html
38
39
  logs:
39
40
  desc: "See the DB logs (ctrl-c + ctrl-c to exit)"
40
- run: docker-compose logs -f
41
+ run: podman-compose logs -f
41
42
  clear:
42
- run: docker-compose rm -v -s -f && docker-compose up -d && ./scripts/helpers/wait-for-dbs.sh
43
+ run: podman-compose down -v && podman-compose up -d && ./scripts/helpers/wait-for-dbs.sh
43
44
  pre-publish:
44
45
  # Ensures all Gemfile.lock are sync with the new version in `lhm/version.rb` and runs appraisals
45
46
  run: bundle install && bundle exec appraisal install && bundle exec appraisal rake specs
data/docker-compose.yml CHANGED
@@ -3,6 +3,7 @@ services:
3
3
  mysql-1:
4
4
  container_name: mysql-1
5
5
  image: percona:5.7
6
+ platform: linux/amd64
6
7
  command:
7
8
  --server-id=1
8
9
  --log-bin
@@ -23,6 +24,7 @@ services:
23
24
  mysql-2:
24
25
  container_name: mysql-2
25
26
  image: percona:5.7
27
+ platform: linux/amd64
26
28
  command:
27
29
  --server-id=2
28
30
  --log-bin
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "6.0.0"
5
+ gem "activerecord", "6.0.3"
6
6
 
7
7
  gemspec path: "../"
@@ -1,57 +1,61 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- lhm-shopify (3.5.5)
4
+ lhm-shopify (4.0.0)
5
5
  retriable (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.0.0)
11
- activesupport (= 6.0.0)
12
- activerecord (6.0.0)
13
- activemodel (= 6.0.0)
14
- activesupport (= 6.0.0)
15
- activesupport (6.0.0)
10
+ activemodel (6.0.3)
11
+ activesupport (= 6.0.3)
12
+ activerecord (6.0.3)
13
+ activemodel (= 6.0.3)
14
+ activesupport (= 6.0.3)
15
+ activesupport (6.0.3)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 0.7, < 2)
18
18
  minitest (~> 5.1)
19
19
  tzinfo (~> 1.1)
20
- zeitwerk (~> 2.1, >= 2.1.8)
20
+ zeitwerk (~> 2.2, >= 2.2.2)
21
21
  after_do (0.4.0)
22
- appraisal (2.4.1)
22
+ appraisal (2.5.0)
23
23
  bundler
24
24
  rake
25
25
  thor (>= 0.14.0)
26
26
  byebug (11.1.3)
27
- concurrent-ruby (1.1.9)
27
+ concurrent-ruby (1.2.2)
28
28
  docile (1.4.0)
29
- i18n (1.8.11)
29
+ i18n (1.14.1)
30
30
  concurrent-ruby (~> 1.0)
31
- minitest (5.14.4)
32
- mocha (1.13.0)
33
- mysql2 (0.5.3)
31
+ minitest (5.20.0)
32
+ mocha (2.1.0)
33
+ ruby2_keywords (>= 0.0.5)
34
+ mysql2 (0.5.5)
34
35
  rake (13.0.6)
35
36
  retriable (3.1.2)
36
- simplecov (0.21.2)
37
+ ruby2_keywords (0.0.5)
38
+ simplecov (0.22.0)
37
39
  docile (~> 1.1)
38
40
  simplecov-html (~> 0.11)
39
41
  simplecov_json_formatter (~> 0.1)
40
42
  simplecov-html (0.12.3)
41
- simplecov_json_formatter (0.1.3)
42
- thor (1.1.0)
43
+ simplecov_json_formatter (0.1.4)
44
+ thor (1.2.2)
43
45
  thread_safe (0.3.6)
44
- toxiproxy (2.0.0)
45
- tzinfo (1.2.9)
46
+ toxiproxy (2.0.2)
47
+ tzinfo (1.2.11)
46
48
  thread_safe (~> 0.1)
47
- zeitwerk (2.5.1)
49
+ zeitwerk (2.6.11)
48
50
 
49
51
  PLATFORMS
52
+ arm64-darwin-21
53
+ arm64-darwin-22
50
54
  x86_64-darwin-20
51
55
  x86_64-linux
52
56
 
53
57
  DEPENDENCIES
54
- activerecord (= 6.0.0)
58
+ activerecord (= 6.0.3)
55
59
  after_do
56
60
  appraisal
57
61
  byebug
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- lhm-shopify (3.5.5)
4
+ lhm-shopify (4.0.0)
5
5
  retriable (>= 3.0.0)
6
6
 
7
7
  GEM
@@ -19,33 +19,37 @@ GEM
19
19
  tzinfo (~> 2.0)
20
20
  zeitwerk (~> 2.3)
21
21
  after_do (0.4.0)
22
- appraisal (2.4.1)
22
+ appraisal (2.5.0)
23
23
  bundler
24
24
  rake
25
25
  thor (>= 0.14.0)
26
26
  byebug (11.1.3)
27
- concurrent-ruby (1.1.9)
27
+ concurrent-ruby (1.2.2)
28
28
  docile (1.4.0)
29
- i18n (1.8.11)
29
+ i18n (1.14.1)
30
30
  concurrent-ruby (~> 1.0)
31
- minitest (5.14.4)
32
- mocha (1.13.0)
33
- mysql2 (0.5.3)
31
+ minitest (5.20.0)
32
+ mocha (2.1.0)
33
+ ruby2_keywords (>= 0.0.5)
34
+ mysql2 (0.5.5)
34
35
  rake (13.0.6)
35
36
  retriable (3.1.2)
36
- simplecov (0.21.2)
37
+ ruby2_keywords (0.0.5)
38
+ simplecov (0.22.0)
37
39
  docile (~> 1.1)
38
40
  simplecov-html (~> 0.11)
39
41
  simplecov_json_formatter (~> 0.1)
40
42
  simplecov-html (0.12.3)
41
- simplecov_json_formatter (0.1.3)
42
- thor (1.1.0)
43
- toxiproxy (2.0.0)
44
- tzinfo (2.0.4)
43
+ simplecov_json_formatter (0.1.4)
44
+ thor (1.2.2)
45
+ toxiproxy (2.0.2)
46
+ tzinfo (2.0.6)
45
47
  concurrent-ruby (~> 1.0)
46
- zeitwerk (2.5.1)
48
+ zeitwerk (2.6.11)
47
49
 
48
50
  PLATFORMS
51
+ arm64-darwin-21
52
+ arm64-darwin-22
49
53
  x86_64-darwin-20
50
54
  x86_64-linux
51
55
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "7.0.0.alpha2"
5
+ gem "activerecord", "7.0.8"
6
6
 
7
7
  gemspec path: "../"
@@ -1,54 +1,58 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- lhm-shopify (3.5.5)
4
+ lhm-shopify (4.0.0)
5
5
  retriable (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (7.0.0.alpha2)
11
- activesupport (= 7.0.0.alpha2)
12
- activerecord (7.0.0.alpha2)
13
- activemodel (= 7.0.0.alpha2)
14
- activesupport (= 7.0.0.alpha2)
15
- activesupport (7.0.0.alpha2)
10
+ activemodel (7.0.8)
11
+ activesupport (= 7.0.8)
12
+ activerecord (7.0.8)
13
+ activemodel (= 7.0.8)
14
+ activesupport (= 7.0.8)
15
+ activesupport (7.0.8)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
20
  after_do (0.4.0)
21
- appraisal (2.4.1)
21
+ appraisal (2.5.0)
22
22
  bundler
23
23
  rake
24
24
  thor (>= 0.14.0)
25
25
  byebug (11.1.3)
26
- concurrent-ruby (1.1.9)
26
+ concurrent-ruby (1.2.2)
27
27
  docile (1.4.0)
28
- i18n (1.8.11)
28
+ i18n (1.14.1)
29
29
  concurrent-ruby (~> 1.0)
30
- minitest (5.14.4)
31
- mocha (1.13.0)
32
- mysql2 (0.5.3)
30
+ minitest (5.20.0)
31
+ mocha (2.1.0)
32
+ ruby2_keywords (>= 0.0.5)
33
+ mysql2 (0.5.5)
33
34
  rake (13.0.6)
34
35
  retriable (3.1.2)
35
- simplecov (0.21.2)
36
+ ruby2_keywords (0.0.5)
37
+ simplecov (0.22.0)
36
38
  docile (~> 1.1)
37
39
  simplecov-html (~> 0.11)
38
40
  simplecov_json_formatter (~> 0.1)
39
41
  simplecov-html (0.12.3)
40
- simplecov_json_formatter (0.1.3)
41
- thor (1.1.0)
42
- toxiproxy (2.0.0)
43
- tzinfo (2.0.4)
42
+ simplecov_json_formatter (0.1.4)
43
+ thor (1.2.2)
44
+ toxiproxy (2.0.2)
45
+ tzinfo (2.0.6)
44
46
  concurrent-ruby (~> 1.0)
45
47
 
46
48
  PLATFORMS
49
+ arm64-darwin-21
50
+ arm64-darwin-22
47
51
  x86_64-darwin-20
48
52
  x86_64-linux
49
53
 
50
54
  DEPENDENCIES
51
- activerecord (= 7.0.0.alpha2)
55
+ activerecord (= 7.0.8)
52
56
  after_do
53
57
  appraisal
54
58
  byebug
@@ -2,8 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "5.2.6"
6
- gem "simplecov", "0.18.5"
7
- gem "docile", "1.3.5"
5
+ gem "activerecord", "7.1.0.beta1"
8
6
 
9
7
  gemspec path: "../"
@@ -0,0 +1,81 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ lhm-shopify (4.0.0)
5
+ retriable (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (7.1.0.beta1)
11
+ activesupport (= 7.1.0.beta1)
12
+ activerecord (7.1.0.beta1)
13
+ activemodel (= 7.1.0.beta1)
14
+ activesupport (= 7.1.0.beta1)
15
+ timeout (>= 0.4.0)
16
+ activesupport (7.1.0.beta1)
17
+ base64
18
+ bigdecimal
19
+ concurrent-ruby (~> 1.0, >= 1.0.2)
20
+ connection_pool (>= 2.2.5)
21
+ drb
22
+ i18n (>= 1.6, < 2)
23
+ minitest (>= 5.1)
24
+ mutex_m
25
+ tzinfo (~> 2.0)
26
+ after_do (0.4.0)
27
+ appraisal (2.5.0)
28
+ bundler
29
+ rake
30
+ thor (>= 0.14.0)
31
+ base64 (0.1.1)
32
+ bigdecimal (3.1.4)
33
+ byebug (11.1.3)
34
+ concurrent-ruby (1.2.2)
35
+ connection_pool (2.4.1)
36
+ docile (1.4.0)
37
+ drb (2.1.1)
38
+ ruby2_keywords
39
+ i18n (1.14.1)
40
+ concurrent-ruby (~> 1.0)
41
+ minitest (5.20.0)
42
+ mocha (2.1.0)
43
+ ruby2_keywords (>= 0.0.5)
44
+ mutex_m (0.1.2)
45
+ mysql2 (0.5.5)
46
+ rake (13.0.6)
47
+ retriable (3.1.2)
48
+ ruby2_keywords (0.0.5)
49
+ simplecov (0.22.0)
50
+ docile (~> 1.1)
51
+ simplecov-html (~> 0.11)
52
+ simplecov_json_formatter (~> 0.1)
53
+ simplecov-html (0.12.3)
54
+ simplecov_json_formatter (0.1.4)
55
+ thor (1.2.2)
56
+ timeout (0.4.0)
57
+ toxiproxy (2.0.2)
58
+ tzinfo (2.0.6)
59
+ concurrent-ruby (~> 1.0)
60
+
61
+ PLATFORMS
62
+ arm64-darwin-21
63
+ arm64-darwin-22
64
+ x86_64-darwin-20
65
+ x86_64-linux
66
+
67
+ DEPENDENCIES
68
+ activerecord (= 7.1.0.beta1)
69
+ after_do
70
+ appraisal
71
+ byebug
72
+ lhm-shopify!
73
+ minitest
74
+ mocha
75
+ mysql2
76
+ rake
77
+ simplecov
78
+ toxiproxy
79
+
80
+ BUNDLED WITH
81
+ 2.2.22
data/lhm.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.executables = []
22
22
  s.metadata['allowed_push_host'] = "https://rubygems.org"
23
23
 
24
- s.required_ruby_version = '>= 2.3.0'
24
+ s.required_ruby_version = '>= 3.0.0'
25
25
 
26
26
  s.add_dependency 'retriable', '>= 3.0.0'
27
27
 
@@ -34,7 +34,7 @@ module Lhm
34
34
 
35
35
  def column_definition(cols)
36
36
  Array(cols).map do |column|
37
- column.to_s.match(/`?([^\(]+)`?(\([^\)]+\))?/).captures
37
+ column.to_s.match(/`?([^\(\s]+)`?\s*(\([^\)]+\))?/).captures
38
38
  end
39
39
  end
40
40