rails-backup-migrate 0.0.11 → 0.0.12
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.
- data/lib/rails-backup-migrate.rb +3 -3
- data/lib/rails-backup-migrate/version.rb +1 -1
- metadata +10 -5
data/lib/rails-backup-migrate.rb
CHANGED
@@ -114,8 +114,8 @@ module RailsBackupMigrate
|
|
114
114
|
# into YAML on their own at all, let alone in a way that would be compatible with other databases
|
115
115
|
records.map! do |record|
|
116
116
|
record.inject({}) do |memo, (k,v)|
|
117
|
-
memo[k] = case v
|
118
|
-
when Mysql::Time
|
117
|
+
memo[k] = case v.class.name
|
118
|
+
when "Mysql::Time"
|
119
119
|
datetime_from_mysql_time v
|
120
120
|
else
|
121
121
|
v
|
@@ -144,7 +144,7 @@ module RailsBackupMigrate
|
|
144
144
|
|
145
145
|
puts "Loading #{tbl}..." if VERBOSE
|
146
146
|
YAML.load_file("#{tbl}.yml").each do |fixture|
|
147
|
-
ActiveRecord::Base.connection.execute "INSERT INTO #{tbl} (#{fixture.keys.join(",")}) VALUES (#{fixture.values.collect { |value| ActiveRecord::Base.connection.quote(value) }.join(",")})", 'Fixture Insert'
|
147
|
+
ActiveRecord::Base.connection.execute "INSERT INTO #{tbl} (#{fixture.keys.map{|k| "`#{k}`"}.join(",")}) VALUES (#{fixture.values.collect { |value| ActiveRecord::Base.connection.quote(value) }.join(",")})", 'Fixture Insert'
|
148
148
|
end
|
149
149
|
end
|
150
150
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-backup-migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '2.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.3'
|
25
30
|
description: ! "Creates a directory db/backup in the rails app and creates / loads
|
26
31
|
YML files from there. \n After a backup, the db/backups directory is archived
|
27
32
|
into a .tgz file and then deleted.\n When restoring, the db/backup directory
|
@@ -70,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
75
|
version: '0'
|
71
76
|
requirements: []
|
72
77
|
rubyforge_project: rails-backup-migrate
|
73
|
-
rubygems_version: 1.8.
|
78
|
+
rubygems_version: 1.8.23
|
74
79
|
signing_key:
|
75
80
|
specification_version: 3
|
76
81
|
summary: Backup and restore a rails application including database data and files
|