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 +4 -4
- data/.github/workflows/main.yml +2 -2
- data/lib/seed/mysql.rb +2 -2
- data/lib/seed/snapshot.rb +2 -2
- data/lib/seed_snapshot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c704444bcf7dfebb43e99ce273bc4d75c8593002407defa8cc3ed9b113767c89
|
|
4
|
+
data.tar.gz: f02a0ec909ca1da82bd6d0971b512f703bd2df09ba72104900fd413ef7640315
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfc9b0201540a7bdbad254a72159e3b4852335bc762a5f348d47e79ae233159cf7133af9499f0e7c4343796f713ca7d0202516d8e72c928d7ac40f989621ad17
|
|
7
|
+
data.tar.gz: 117aa3b725b47e77fe13e89d226c57e23b2780f952c69e2f0e657d767eb4348e7437b39e1f62712f63f261e354ee81ee0ecd06ffcf5e916abee78c64db738eab
|
data/.github/workflows/main.yml
CHANGED
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
|
|
19
19
|
services:
|
|
20
20
|
mysql:
|
|
21
|
-
image: mysql:
|
|
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: ['
|
|
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
|
|
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.
|
|
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:
|
|
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.
|
|
70
|
+
rubygems_version: 3.4.10
|
|
71
71
|
signing_key:
|
|
72
72
|
specification_version: 4
|
|
73
73
|
summary: Easy dump/restore tool for ActiveRecord.
|