activerecord-snapshot 0.3.4 → 0.4.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
2
  SHA1:
3
- metadata.gz: d26f8f2b6e2bc02546609524b2c53f4c55409147
4
- data.tar.gz: 9cdad92b18df4f187cbe87416426649fa603984d
3
+ metadata.gz: 3af18e2c42bb3dd7acd4b4373e5dcdf8d199743a
4
+ data.tar.gz: 758ecf4837318156514c1c1afb701ae71656e263
5
5
  SHA512:
6
- metadata.gz: 3afe2f09a0ac018f12ef80cf15f0eeffb3ea3730cb6084280539e5149410399d38f196f5fc90fa9e94e21628bcce6a3c1a299bc39b082333ddecdbf6b98c27d2
7
- data.tar.gz: 9aff88d0a9fad5cdff2145bc47b7a9a3ee71f67afe58be86da7e462b0b4ffc19b83382332ef2f9352c6c43a5d21ead552cac3bf479b025d9f034b411b1e53842
6
+ metadata.gz: 56cd21383f2bd28f44ec6d2339918f02e25f7656fec1a0df64a0ae40397538d3b136a6c711924eb85e701632ab284a4f18ff5839ed7176967991b1f74d1bc05b
7
+ data.tar.gz: 1fef7f3558765303c407b726a456d50e88eb1506c98889ad37f9c1b65d9ee149d155305fb6737b9d3bc699675c7e52335cd4218e974c6149c0b40987211a655e
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # ActiveRecord::Snapshot
2
2
 
3
+ [![Build Status](https://api.travis-ci.org/coverhound/activerecord-snapshot.svg?branch=master)](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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Snapshot
3
- VERSION = '0.3.4'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  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 prodution mode!" if Rails.env.production?
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.3.4
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: 2017-07-11 00:00:00.000000000 Z
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.6.12
177
+ rubygems_version: 2.5.2
158
178
  signing_key:
159
179
  specification_version: 4
160
180
  summary: Snapshots for ActiveRecord