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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 397705dc6efe43d9ed3454bacb8a9613cdc3d090
|
4
|
+
data.tar.gz: 8e118eec61222575a76ae842a9f65733f375e688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ceaa5e5a35b6da7a7c6aa6150a5ddb06699d1738583e4941e2821c73b3c5e98de3ff6f9c8556b98ec089d82695b9a9755810629fad8985c97da1590a49f58c
|
7
|
+
data.tar.gz: 1eec174eda0f9252144efd8860d23ddee6e8c1c06ed7928f9f9d170e5e2fe11644b0131aa820f9088113d7504d08ccff60f9e23a357766272c087d0fa8ca4f73
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/glacier_on_rails.gemspec
CHANGED
@@ -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:
|
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
|