activerecord-snapshot 0.4.0 → 0.7.0

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
- SHA1:
3
- metadata.gz: 3af18e2c42bb3dd7acd4b4373e5dcdf8d199743a
4
- data.tar.gz: 758ecf4837318156514c1c1afb701ae71656e263
2
+ SHA256:
3
+ metadata.gz: aaf065d4a0ded30d3724f35647e79452b835c9c7e6cd0cda95044b4a4eb2a1c1
4
+ data.tar.gz: a5633603f87e91e20a41fb9509372c61acc8830d70ea3b1cf5e4c0b89c6ac9b6
5
5
  SHA512:
6
- metadata.gz: 56cd21383f2bd28f44ec6d2339918f02e25f7656fec1a0df64a0ae40397538d3b136a6c711924eb85e701632ab284a4f18ff5839ed7176967991b1f74d1bc05b
7
- data.tar.gz: 1fef7f3558765303c407b726a456d50e88eb1506c98889ad37f9c1b65d9ee149d155305fb6737b9d3bc699675c7e52335cd4218e974c6149c0b40987211a655e
6
+ metadata.gz: eaf3ac77d41b025605f828e2ff50cdc223486163f690f44dd230faa50e5da000610ce6f6e4904ed5dcab7452ebf390bfdf0975c35ab281bec902422a3a54d944
7
+ data.tar.gz: a8d83cb255893096bb81f7fcb6e9f0842763b1b78001b7e4d7751675b3fb3fc74b0dc060caf4a58bcd0e659e1a143e9023eb437b30622668c66a3862553d066c
@@ -52,7 +52,8 @@ module ActiveRecord
52
52
 
53
53
  steps[:import] = "Importing the snapshot into #{config.db.database}"
54
54
  steps[:save] = "Caching the new snapshot version" unless named_version? || tables.present?
55
- steps[:set_env] = "Setting database environment to #{Rails.env}"
55
+ steps[:set_env] = "Setting database environment to #{Rails.env}" if Rails::VERSION::MAJOR >= 5
56
+
56
57
  steps
57
58
  end
58
59
 
@@ -8,8 +8,8 @@ module ActiveRecord
8
8
  end
9
9
 
10
10
  def dump(tables:, output:)
11
- dump_command("--no-data #{database} > #{output}") &&
12
- dump_command("--quick #{database} #{tables.join(" ")} >> #{output}")
11
+ dump_command("--no-data --set-gtid-purged=OFF #{database} > #{output}") &&
12
+ dump_command("--quick --set-gtid-purged=OFF #{database} #{tables.join(" ")} >> #{output}")
13
13
  end
14
14
 
15
15
  def self.import(*args)
@@ -3,7 +3,7 @@ module ActiveRecord
3
3
  class OpenSSL
4
4
  def self.encrypt(input:, output:)
5
5
  system(<<-SH)
6
- nice openssl aes-256-cbc \\
6
+ nice openssl aes-256-cbc -md sha256 \\
7
7
  -in #{input} \\
8
8
  -out #{output} \\
9
9
  -kfile #{ActiveRecord::Snapshot.config.ssl_key}
@@ -12,7 +12,7 @@ module ActiveRecord
12
12
 
13
13
  def self.decrypt(input:, output:)
14
14
  system(<<-SH)
15
- nice openssl enc -d -aes-256-cbc \\
15
+ nice openssl enc -d -aes-256-cbc -md sha256 \\
16
16
  -in #{input} \\
17
17
  -out #{output} \\
18
18
  -kfile #{ActiveRecord::Snapshot.config.ssl_key}
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Snapshot
3
- VERSION = '0.4.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernardo Farah
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -173,8 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubyforge_project:
177
- rubygems_version: 2.5.2
176
+ rubygems_version: 3.0.3
178
177
  signing_key:
179
178
  specification_version: 4
180
179
  summary: Snapshots for ActiveRecord