toreriklinnerud-dated_backup 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ module DatedBackup
9
9
  # and return these Directories as a BackupSet
10
10
  def find_files_in_directory(dir)
11
11
  raise InvalidDirectoryError, "A valid directory must be given." unless File.directory?(dir)
12
- new(Dir.glob("#{dir}/*"))
12
+ new(Dir.glob("#{dir}/*-*-*-*h-*m-*s"))
13
13
  end
14
14
 
15
15
  # Creates the boolean include_*? methods (include_month?, include_year? and so on).
@@ -12,10 +12,10 @@ class String
12
12
  time_array = $1.gsub(/h|m|s/, '').split '-'
13
13
  Time.gm(*time_array)
14
14
  rescue
15
- raise StringToTimeConversionError, "The string cannot be a converted to a valid time (it is out of range)"
15
+ raise StringToTimeConversionError, "The string '#{self}' cannot be a converted to a valid time (it is out of range)"
16
16
  end
17
17
  else
18
- raise StringToTimeConversionError, "The string cannot be converted to a time object"
18
+ raise StringToTimeConversionError, "The string '#{self}' cannot be converted to a time object"
19
19
  end
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toreriklinnerud-dated_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Taylor