mysql_truck 0.5.7 → 0.5.7.1

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.
@@ -47,7 +47,7 @@ module MysqlTruck
47
47
  puts "--------------------------------"
48
48
 
49
49
  files = Dir["#{tmp_path}/*"]
50
- tables = files.map { |f| File.basename(f, File.extname(f)).to_s }.uniq
50
+ tables = files.map { |f| File.basename(f).gsub(/\..*$/, '') }.uniq
51
51
  total = tables.size
52
52
  count = 0
53
53
 
@@ -124,7 +124,7 @@ module MysqlTruck
124
124
  def import_csv_file(table, backup_date_str, file_path)
125
125
  if config[:date_suffix]
126
126
  old_file_path = file_path
127
- file_path = file_path.to_s.gsub(table, "#{table}_#{backup_date_str.gsub(/-/, "")}")
127
+ file_path = file_path.to_s.gsub("/#{table}.", "/#{table}_#{backup_date_str.gsub(/-/, "")}.")
128
128
  # move file
129
129
  `mv #{old_file_path} #{file_path}`
130
130
  end
@@ -1,3 +1,3 @@
1
1
  module MysqlTruck
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_truck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: