db_backup_rails 1.0.3 → 1.0.4

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: 5043fefd4c6803e20947086c26997a9c877e3fdc
4
- data.tar.gz: 32dbee8fcd57f1a5413da6973fc8e5bea13cba7a
3
+ metadata.gz: 824f972af34732a477cb194e863f35e9a6fa954b
4
+ data.tar.gz: 34018f5cb9df4d807de7f52b7269c9dac143e2e1
5
5
  SHA512:
6
- metadata.gz: 65ed5f0c5be50a3d08ab1901d554fec5656743c8d7b400e095495f86d12e55bed79aeb615b0299b55bc0328fcc920e00ee38180ea7662a7ef8563a5b03d147d7
7
- data.tar.gz: cc1f9e7d015ec1e78abbe60cc32b7a8a81c69f5b5c1ed6fff2c1d1e044ef6b69db1301b5c4384d800389825f94626a753e1819a71dd3c15c8eb0affd685c9e01
6
+ metadata.gz: 8a632eb459bcefe970c4ec9fcdb26ad2af46cc72e7bce06a0ce9e6ae02212c39d09dfb0564fc24e2be2674e3c4e8e4a03d591dc18bdd455d5457a99740e2e1c7
7
+ data.tar.gz: 1bef178b9c50737975c5c91922a100346255fab5bdf23835e63c582d074ba542b5b317ac062565a7eae32c08b72c1293d889fbcb9e646c2dc7b51a896eebdca5
@@ -50,7 +50,7 @@ namespace :backup do
50
50
  namespace :db do
51
51
  desc "Prune database backups"
52
52
  task :prune => [:environment] do
53
- files = Dir.glob("#{output_file_prefix}-*")
53
+ files = Dir.glob("#{output_file_prefix}-*").sort
54
54
 
55
55
  r_index = (-1 * num_to_keep) - 1
56
56
 
@@ -68,7 +68,8 @@ namespace :backup do
68
68
  end
69
69
 
70
70
  def output_file
71
- File.expand_path("#{output_file_prefix}-#{Time.now.strftime('%Y%m%d')}.dump", Rails.root)
71
+ # Memoized so that it stays the same even if a task runs into the next day
72
+ @output_file ||= File.expand_path("#{output_file_prefix}-#{Time.now.strftime('%Y%m%d')}.dump", Rails.root)
72
73
  end
73
74
 
74
75
  def output_file_prefix
@@ -1,3 +1,3 @@
1
1
  module DbBackupRails
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_backup_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon Miller-Out
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-24 00:00:00.000000000 Z
11
+ date: 2013-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails