activerecord-snapshot 0.3.4 → 0.4.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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3af18e2c42bb3dd7acd4b4373e5dcdf8d199743a
|
|
4
|
+
data.tar.gz: 758ecf4837318156514c1c1afb701ae71656e263
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56cd21383f2bd28f44ec6d2339918f02e25f7656fec1a0df64a0ae40397538d3b136a6c711924eb85e701632ab284a4f18ff5839ed7176967991b1f74d1bc05b
|
|
7
|
+
data.tar.gz: 1fef7f3558765303c407b726a456d50e88eb1506c98889ad37f9c1b65d9ee149d155305fb6737b9d3bc699675c7e52335cd4218e974c6149c0b40987211a655e
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# ActiveRecord::Snapshot
|
|
2
2
|
|
|
3
|
+
[](https://travis-ci.org/coverhound/activerecord-snapshot)
|
|
4
|
+
|
|
3
5
|
This gem provides rake tasks to create and import MySQL snapshots using S3. This
|
|
4
6
|
is pretty specialized for how CoverHound uses snapshots.
|
|
5
7
|
|
|
@@ -52,6 +52,7 @@ 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
56
|
steps
|
|
56
57
|
end
|
|
57
58
|
|
|
@@ -84,6 +85,10 @@ module ActiveRecord
|
|
|
84
85
|
Rake::Task["db:schema:dump"].invoke
|
|
85
86
|
end
|
|
86
87
|
|
|
88
|
+
def set_env
|
|
89
|
+
Rake::Task["db:environment:set"].invoke
|
|
90
|
+
end
|
|
91
|
+
|
|
87
92
|
def save
|
|
88
93
|
Version.write(version)
|
|
89
94
|
end
|
|
@@ -25,7 +25,7 @@ namespace :db do
|
|
|
25
25
|
|
|
26
26
|
desc "Import production database snapshot."
|
|
27
27
|
task :import, [:version] => [:load] do |_t, args|
|
|
28
|
-
abort "Do not run in
|
|
28
|
+
abort "Do not run in production mode!" if Rails.env.production?
|
|
29
29
|
version = args.fetch(:version, "").strip
|
|
30
30
|
ActiveRecord::Snapshot::Import.call(version: version)
|
|
31
31
|
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
|
+
version: 0.4.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:
|
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -58,6 +58,26 @@ dependencies:
|
|
|
58
58
|
- - ">="
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: 3.4.3
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: mime-types
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '1.16'
|
|
68
|
+
- - "<"
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: '4'
|
|
71
|
+
type: :runtime
|
|
72
|
+
prerelease: false
|
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - ">="
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '1.16'
|
|
78
|
+
- - "<"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '4'
|
|
61
81
|
- !ruby/object:Gem::Dependency
|
|
62
82
|
name: mocha
|
|
63
83
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -154,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
154
174
|
version: '0'
|
|
155
175
|
requirements: []
|
|
156
176
|
rubyforge_project:
|
|
157
|
-
rubygems_version: 2.
|
|
177
|
+
rubygems_version: 2.5.2
|
|
158
178
|
signing_key:
|
|
159
179
|
specification_version: 4
|
|
160
180
|
summary: Snapshots for ActiveRecord
|