data_resurrection 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/data_resurrection/adapters.rb +8 -0
- data/lib/data_resurrection/reserved_words +3 -1
- data/lib/data_resurrection.rb +1 -0
- metadata +11 -11
@@ -31,6 +31,7 @@ module DataResurrection
|
|
31
31
|
table.columns.map {|c| generated_field_name(c.name.downcase, reserved_words) })
|
32
32
|
replace_table_name(schema, table_name)
|
33
33
|
replace_types(schema, field_types) if field_types
|
34
|
+
no_id(schema)
|
34
35
|
eval(schema)
|
35
36
|
end
|
36
37
|
|
@@ -100,6 +101,13 @@ module DataResurrection
|
|
100
101
|
end
|
101
102
|
end
|
102
103
|
|
104
|
+
def no_id(schema)
|
105
|
+
schema =~ /create_table "(.+)"/
|
106
|
+
table_name = $1
|
107
|
+
schema['create_table "%s"' % table_name] =
|
108
|
+
'create_table "%s", :id => false' % table_name
|
109
|
+
end
|
110
|
+
|
103
111
|
def all_valid?(string)
|
104
112
|
string.chars.all? {|c| VALID_CHARS.include? c }
|
105
113
|
end
|
data/lib/data_resurrection.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_resurrection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-09-02 00:00:00.000000000 -03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
17
|
-
requirement: &
|
17
|
+
requirement: &10113780 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,21 +22,21 @@ dependencies:
|
|
22
22
|
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *10113780
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: dbf
|
28
|
-
requirement: &
|
28
|
+
requirement: &10113320 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *10113320
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: sqlite3
|
39
|
-
requirement: &
|
39
|
+
requirement: &10112860 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 1.3.0
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *10112860
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
|
-
requirement: &
|
50
|
+
requirement: &10112400 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 2.6.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *10112400
|
59
59
|
description: Converts DBF to modern formats.
|
60
60
|
email: rmanhaes@gmail.com
|
61
61
|
executables: []
|