glacier_on_rails 0.9.6 → 0.9.7

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: 4b787edca23f9db4ca73cbf890c3cbd953cbdd22
4
- data.tar.gz: b72bc1553df28d0006b6d8716fdffd5c1d4feec2
3
+ metadata.gz: 397705dc6efe43d9ed3454bacb8a9613cdc3d090
4
+ data.tar.gz: 8e118eec61222575a76ae842a9f65733f375e688
5
5
  SHA512:
6
- metadata.gz: fbe7502e6960ad4486f06678410c0fa2c6ad0f2f6dd5157bf45c7c67b4dfa32b1cccf7e9de12b0ec3dc456597ba8a07316bb7d8c71ee833b6745c899e765c45a
7
- data.tar.gz: b7eefdc7c7d81cff6ba92bc423d80053fc17247fd7d1f559eb61b1e257ef71d28792058080e077d433bce011f02e09750469beadf9fe44972dac15f494468ea9
6
+ metadata.gz: c6ceaa5e5a35b6da7a7c6aa6150a5ddb06699d1738583e4941e2821c73b3c5e98de3ff6f9c8556b98ec089d82695b9a9755810629fad8985c97da1590a49f58c
7
+ data.tar.gz: 1eec174eda0f9252144efd8860d23ddee6e8c1c06ed7928f9f9d170e5e2fe11644b0131aa820f9088113d7504d08ccff60f9e23a357766272c087d0fa8ca4f73
data/Gemfile.lock CHANGED
@@ -57,7 +57,7 @@ GIT
57
57
  PATH
58
58
  remote: .
59
59
  specs:
60
- glacier_on_rails (0.9.5)
60
+ glacier_on_rails (0.9.6)
61
61
  httparty (~> 0.15.5)
62
62
  rails (~> 5.1)
63
63
 
@@ -4,7 +4,7 @@ class ApplicationDatabase::PostgresAdapter < ApplicationDatabase::BaseAdapter
4
4
  class PgRestoreFileMissing < StandardError; end
5
5
  class PgPassFileMissing < StandardError
6
6
  def initialize
7
- message = "~/.pgpass file not found, cannot dump database contents"
7
+ message = "#{File.expand_path("~/.pgpass")} file not found, cannot dump database contents"
8
8
  AwsLog.error "ApplicationDatabase::PostgresAdapter::PgPassFileMissing exception: #{message}"
9
9
  super(message)
10
10
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "glacier_on_rails"
6
- s.version = "0.9.6"
6
+ s.version = "0.9.7"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Les Nightingill"]
@@ -178,16 +178,21 @@ feature "backup_now", :js => true do
178
178
 
179
179
  context "when there is a missing database password file" do
180
180
  before do
181
+ @config = ActiveRecord::Base.configurations[Rails.env].dup
181
182
  ActiveRecord::Base.configurations[Rails.env].merge!({"password" => "sekret"})
182
183
  allow(File).to receive(:exists?)
183
184
  allow(File).to receive(:exists?).with("~/.pgpass").and_return(false)
184
185
  end
185
186
 
187
+ after do
188
+ ActiveRecord::Base.configurations[Rails.env] = @config
189
+ end
190
+
186
191
  it "should not create a new application_data_backup" do
187
192
  expect{page.find('#backup_now').click; wait_for_ajax}.not_to change{ApplicationDataBackup.count}
188
193
  expect(page).not_to have_selector("#application_data_backups .application_data_backup")
189
194
  expect(flash_message).to eq "failed to create backup"
190
- expect(aws_log).to match /ApplicationDatabase::PostgresAdapter::PgPassFileMissing exception: ~\/.pgpass file not found, cannot dump database contents/
195
+ expect(aws_log).to match /ApplicationDatabase::PostgresAdapter::PgPassFileMissing exception: #{File.expand_path("~/.pgpass")} file not found, cannot dump database contents/
191
196
  end
192
197
  end
193
198
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glacier_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Nightingill