seed-snapshot 0.5.1 → 0.5.3

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: b174e66fd532071e7df51745f577acd7baa140d65b2bb26283e28530716fc944
4
- data.tar.gz: bd676935a076d2e018316daf05d3a6c44c434c21b3ef00aed942ec0a7de38dd7
3
+ metadata.gz: c704444bcf7dfebb43e99ce273bc4d75c8593002407defa8cc3ed9b113767c89
4
+ data.tar.gz: f02a0ec909ca1da82bd6d0971b512f703bd2df09ba72104900fd413ef7640315
5
5
  SHA512:
6
- metadata.gz: b3aff9476550d5e63adbd0a6c1c2f4c79acd0c8b92bac79efd5e0895abba89d25023a61107248feff9e0e31998183c436123245cec8d66dc238d0d5fbd123b15
7
- data.tar.gz: b3792ed4516c9f1f3a7eb7b7684ac987dd38eeeebaeb2089e6493eb95a445ae4a1503946f48ed05b57a4d261a5638c393cf0c8700526037b76a56c7c1d866828
6
+ metadata.gz: cfc9b0201540a7bdbad254a72159e3b4852335bc762a5f348d47e79ae233159cf7133af9499f0e7c4343796f713ca7d0202516d8e72c928d7ac40f989621ad17
7
+ data.tar.gz: 117aa3b725b47e77fe13e89d226c57e23b2780f952c69e2f0e657d767eb4348e7437b39e1f62712f63f261e354ee81ee0ecd06ffcf5e916abee78c64db738eab
@@ -18,7 +18,7 @@ jobs:
18
18
 
19
19
  services:
20
20
  mysql:
21
- image: mysql:5.7
21
+ image: mysql:8.0
22
22
  env:
23
23
  MYSQL_ALLOW_EMPTY_PASSWORD: yes
24
24
  MYSQL_DATABASE: 'activerecord_unittest'
@@ -28,7 +28,7 @@ jobs:
28
28
 
29
29
  strategy:
30
30
  matrix:
31
- ruby-version: ['2.6', '2.7']
31
+ ruby-version: ['3.0', '3.1']
32
32
  gemfile: ['Gemfile', 'gemfiles/ar_6_1.gemfile']
33
33
 
34
34
  env:
data/lib/seed/mysql.rb CHANGED
@@ -10,13 +10,13 @@ module Seed
10
10
  ''
11
11
  end
12
12
 
13
- cmd = "MYSQL_PWD=#{password} mysqldump -u #{username} -h #{host} #{database} -t #{allow_tables_option(tables)} #{ignore_tables_option(ignore_tables)} --no-tablespaces #{additional_options} > #{file_path}"
13
+ cmd = "MYSQL_PWD=#{password} mysqldump -u #{username} -h #{host} -P #{port} #{database} -t #{allow_tables_option(tables)} #{ignore_tables_option(ignore_tables)} --no-tablespaces #{additional_options} > #{file_path}"
14
14
  system cmd
15
15
  end
16
16
 
17
17
  def self.restore(file_path, username:, password:, host:, port:, database:)
18
18
  host = 'localhost' unless host
19
- cmd = "MYSQL_PWD=#{password} mysql -u #{username} -h #{host} #{database} < #{file_path}"
19
+ cmd = "MYSQL_PWD=#{password} mysql -u #{username} -h #{host} -P #{port} #{database} < #{file_path}"
20
20
  system cmd
21
21
  end
22
22
 
data/lib/seed/snapshot.rb CHANGED
@@ -14,7 +14,7 @@ module Seed
14
14
 
15
15
  Mysql.dump(
16
16
  @configuration.current_version_path,
17
- options.merge({
17
+ **options.merge({
18
18
  tables: tables(classes),
19
19
  ignore_tables: ignore_tables(ignore_classes),
20
20
  client_version: @configuration.client_version
@@ -32,7 +32,7 @@ module Seed
32
32
 
33
33
  Mysql.restore(
34
34
  @configuration.current_version_path,
35
- options
35
+ **options
36
36
  )
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module SeedSnapshot
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed-snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yo_waka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2024-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.0.3
70
+ rubygems_version: 3.4.10
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Easy dump/restore tool for ActiveRecord.