schema_plus 0.4.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/.travis.yml +6 -9
- data/Gemfile +0 -4
- data/README.rdoc +168 -70
- data/Rakefile +58 -47
- data/gemfiles/rails-3.2/Gemfile.base +4 -0
- data/gemfiles/rails-3.2/Gemfile.mysql +4 -0
- data/gemfiles/rails-3.2/Gemfile.mysql2 +4 -0
- data/gemfiles/rails-3.2/Gemfile.postgresql +4 -0
- data/gemfiles/rails-3.2/Gemfile.sqlite3 +4 -0
- data/lib/schema_plus.rb +2 -0
- data/lib/schema_plus/active_record/column_options_handler.rb +73 -32
- data/lib/schema_plus/active_record/connection_adapters/abstract_adapter.rb +60 -31
- data/lib/schema_plus/active_record/connection_adapters/foreign_key_definition.rb +7 -2
- data/lib/schema_plus/active_record/connection_adapters/index_definition.rb +2 -1
- data/lib/schema_plus/active_record/connection_adapters/mysql_adapter.rb +19 -1
- data/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb +68 -17
- data/lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb +28 -3
- data/lib/schema_plus/active_record/connection_adapters/table_definition.rb +27 -1
- data/lib/schema_plus/active_record/db_default.rb +19 -0
- data/lib/schema_plus/active_record/foreign_keys.rb +40 -32
- data/lib/schema_plus/active_record/schema_dumper.rb +7 -3
- data/lib/schema_plus/version.rb +1 -1
- data/runspecs +5 -8
- data/schema_plus.gemspec +2 -5
- data/spec/column_definition_spec.rb +18 -1
- data/spec/column_spec.rb +39 -2
- data/spec/connection_spec.rb +1 -1
- data/spec/connections/mysql/connection.rb +1 -1
- data/spec/connections/mysql2/connection.rb +1 -1
- data/spec/connections/postgresql/connection.rb +1 -1
- data/spec/foreign_key_definition_spec.rb +0 -4
- data/spec/foreign_key_spec.rb +37 -13
- data/spec/index_definition_spec.rb +54 -2
- data/spec/index_spec.rb +59 -15
- data/spec/migration_spec.rb +336 -85
- data/spec/multiple_schemas_spec.rb +127 -0
- data/spec/schema_dumper_spec.rb +65 -25
- data/spec/schema_spec.rb +16 -18
- data/spec/spec_helper.rb +19 -18
- data/spec/support/matchers/reference.rb +7 -1
- data/spec/views_spec.rb +5 -2
- metadata +43 -54
- data/gemfiles/Gemfile.rails-2.3 +0 -6
- data/gemfiles/Gemfile.rails-2.3.lock +0 -65
- data/gemfiles/Gemfile.rails-3.0 +0 -5
- data/gemfiles/Gemfile.rails-3.0.lock +0 -113
- data/gemfiles/Gemfile.rails-3.1 +0 -5
- data/gemfiles/Gemfile.rails-3.1.lock +0 -123
- data/gemfiles/Gemfile.rails-3.2 +0 -5
- data/gemfiles/Gemfile.rails-3.2.lock +0 -121
- data/spec/models/comment.rb +0 -2
- data/spec/models/post.rb +0 -2
- data/spec/models/user.rb +0 -2
- data/spec/rails3_migration_spec.rb +0 -144
data/gemfiles/Gemfile.rails-2.3
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /Users/ronen/github/schema_plus
|
3
|
-
specs:
|
4
|
-
schema_plus (0.4.0)
|
5
|
-
rails
|
6
|
-
valuable
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
actionmailer (2.3.14)
|
12
|
-
actionpack (= 2.3.14)
|
13
|
-
actionpack (2.3.14)
|
14
|
-
activesupport (= 2.3.14)
|
15
|
-
rack (~> 1.1.0)
|
16
|
-
activerecord (2.3.14)
|
17
|
-
activesupport (= 2.3.14)
|
18
|
-
activeresource (2.3.14)
|
19
|
-
activesupport (= 2.3.14)
|
20
|
-
activesupport (2.3.14)
|
21
|
-
diff-lcs (1.1.3)
|
22
|
-
multi_json (1.3.5)
|
23
|
-
mysql (2.8.1)
|
24
|
-
mysql2 (0.2.18)
|
25
|
-
pg (0.13.2)
|
26
|
-
rack (1.1.3)
|
27
|
-
rails (2.3.14)
|
28
|
-
actionmailer (= 2.3.14)
|
29
|
-
actionpack (= 2.3.14)
|
30
|
-
activerecord (= 2.3.14)
|
31
|
-
activeresource (= 2.3.14)
|
32
|
-
activesupport (= 2.3.14)
|
33
|
-
rake (>= 0.8.3)
|
34
|
-
rake (0.8.7)
|
35
|
-
rspec (2.10.0)
|
36
|
-
rspec-core (~> 2.10.0)
|
37
|
-
rspec-expectations (~> 2.10.0)
|
38
|
-
rspec-mocks (~> 2.10.0)
|
39
|
-
rspec-core (2.10.1)
|
40
|
-
rspec-expectations (2.10.0)
|
41
|
-
diff-lcs (~> 1.1.3)
|
42
|
-
rspec-mocks (2.10.1)
|
43
|
-
simplecov (0.6.4)
|
44
|
-
multi_json (~> 1.0)
|
45
|
-
simplecov-html (~> 0.5.3)
|
46
|
-
simplecov-gem-adapter (1.0.1)
|
47
|
-
simplecov
|
48
|
-
simplecov-html (0.5.3)
|
49
|
-
sqlite3 (1.3.6)
|
50
|
-
valuable (0.9.5)
|
51
|
-
|
52
|
-
PLATFORMS
|
53
|
-
ruby
|
54
|
-
|
55
|
-
DEPENDENCIES
|
56
|
-
mysql
|
57
|
-
mysql2 (~> 0.2.7)
|
58
|
-
pg
|
59
|
-
rails (~> 2.3.0)
|
60
|
-
rake (~> 0.8.7)
|
61
|
-
rspec
|
62
|
-
schema_plus!
|
63
|
-
simplecov
|
64
|
-
simplecov-gem-adapter
|
65
|
-
sqlite3
|
data/gemfiles/Gemfile.rails-3.0
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /Users/ronen/github/schema_plus
|
3
|
-
specs:
|
4
|
-
schema_plus (0.4.0)
|
5
|
-
rails
|
6
|
-
valuable
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
abstract (1.0.0)
|
12
|
-
actionmailer (3.0.12)
|
13
|
-
actionpack (= 3.0.12)
|
14
|
-
mail (~> 2.2.19)
|
15
|
-
actionpack (3.0.12)
|
16
|
-
activemodel (= 3.0.12)
|
17
|
-
activesupport (= 3.0.12)
|
18
|
-
builder (~> 2.1.2)
|
19
|
-
erubis (~> 2.6.6)
|
20
|
-
i18n (~> 0.5.0)
|
21
|
-
rack (~> 1.2.5)
|
22
|
-
rack-mount (~> 0.6.14)
|
23
|
-
rack-test (~> 0.5.7)
|
24
|
-
tzinfo (~> 0.3.23)
|
25
|
-
activemodel (3.0.12)
|
26
|
-
activesupport (= 3.0.12)
|
27
|
-
builder (~> 2.1.2)
|
28
|
-
i18n (~> 0.5.0)
|
29
|
-
activerecord (3.0.12)
|
30
|
-
activemodel (= 3.0.12)
|
31
|
-
activesupport (= 3.0.12)
|
32
|
-
arel (~> 2.0.10)
|
33
|
-
tzinfo (~> 0.3.23)
|
34
|
-
activeresource (3.0.12)
|
35
|
-
activemodel (= 3.0.12)
|
36
|
-
activesupport (= 3.0.12)
|
37
|
-
activesupport (3.0.12)
|
38
|
-
arel (2.0.10)
|
39
|
-
builder (2.1.2)
|
40
|
-
diff-lcs (1.1.3)
|
41
|
-
erubis (2.6.6)
|
42
|
-
abstract (>= 1.0.0)
|
43
|
-
i18n (0.5.0)
|
44
|
-
json (1.7.3)
|
45
|
-
mail (2.2.19)
|
46
|
-
activesupport (>= 2.3.6)
|
47
|
-
i18n (>= 0.4.0)
|
48
|
-
mime-types (~> 1.16)
|
49
|
-
treetop (~> 1.4.8)
|
50
|
-
mime-types (1.18)
|
51
|
-
multi_json (1.3.5)
|
52
|
-
mysql (2.8.1)
|
53
|
-
mysql2 (0.2.18)
|
54
|
-
pg (0.13.2)
|
55
|
-
polyglot (0.3.3)
|
56
|
-
rack (1.2.5)
|
57
|
-
rack-mount (0.6.14)
|
58
|
-
rack (>= 1.0.0)
|
59
|
-
rack-test (0.5.7)
|
60
|
-
rack (>= 1.0)
|
61
|
-
rails (3.0.12)
|
62
|
-
actionmailer (= 3.0.12)
|
63
|
-
actionpack (= 3.0.12)
|
64
|
-
activerecord (= 3.0.12)
|
65
|
-
activeresource (= 3.0.12)
|
66
|
-
activesupport (= 3.0.12)
|
67
|
-
bundler (~> 1.0)
|
68
|
-
railties (= 3.0.12)
|
69
|
-
railties (3.0.12)
|
70
|
-
actionpack (= 3.0.12)
|
71
|
-
activesupport (= 3.0.12)
|
72
|
-
rake (>= 0.8.7)
|
73
|
-
rdoc (~> 3.4)
|
74
|
-
thor (~> 0.14.4)
|
75
|
-
rake (0.8.7)
|
76
|
-
rdoc (3.12)
|
77
|
-
json (~> 1.4)
|
78
|
-
rspec (2.10.0)
|
79
|
-
rspec-core (~> 2.10.0)
|
80
|
-
rspec-expectations (~> 2.10.0)
|
81
|
-
rspec-mocks (~> 2.10.0)
|
82
|
-
rspec-core (2.10.1)
|
83
|
-
rspec-expectations (2.10.0)
|
84
|
-
diff-lcs (~> 1.1.3)
|
85
|
-
rspec-mocks (2.10.1)
|
86
|
-
simplecov (0.6.4)
|
87
|
-
multi_json (~> 1.0)
|
88
|
-
simplecov-html (~> 0.5.3)
|
89
|
-
simplecov-gem-adapter (1.0.1)
|
90
|
-
simplecov
|
91
|
-
simplecov-html (0.5.3)
|
92
|
-
sqlite3 (1.3.6)
|
93
|
-
thor (0.14.6)
|
94
|
-
treetop (1.4.10)
|
95
|
-
polyglot
|
96
|
-
polyglot (>= 0.3.1)
|
97
|
-
tzinfo (0.3.33)
|
98
|
-
valuable (0.9.5)
|
99
|
-
|
100
|
-
PLATFORMS
|
101
|
-
ruby
|
102
|
-
|
103
|
-
DEPENDENCIES
|
104
|
-
mysql
|
105
|
-
mysql2 (~> 0.2.7)
|
106
|
-
pg
|
107
|
-
rails (~> 3.0.0)
|
108
|
-
rake (~> 0.8.7)
|
109
|
-
rspec
|
110
|
-
schema_plus!
|
111
|
-
simplecov
|
112
|
-
simplecov-gem-adapter
|
113
|
-
sqlite3
|
data/gemfiles/Gemfile.rails-3.1
DELETED
@@ -1,123 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /Users/ronen/github/schema_plus
|
3
|
-
specs:
|
4
|
-
schema_plus (0.4.0)
|
5
|
-
rails
|
6
|
-
valuable
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
actionmailer (3.1.4)
|
12
|
-
actionpack (= 3.1.4)
|
13
|
-
mail (~> 2.3.0)
|
14
|
-
actionpack (3.1.4)
|
15
|
-
activemodel (= 3.1.4)
|
16
|
-
activesupport (= 3.1.4)
|
17
|
-
builder (~> 3.0.0)
|
18
|
-
erubis (~> 2.7.0)
|
19
|
-
i18n (~> 0.6)
|
20
|
-
rack (~> 1.3.6)
|
21
|
-
rack-cache (~> 1.1)
|
22
|
-
rack-mount (~> 0.8.2)
|
23
|
-
rack-test (~> 0.6.1)
|
24
|
-
sprockets (~> 2.0.3)
|
25
|
-
activemodel (3.1.4)
|
26
|
-
activesupport (= 3.1.4)
|
27
|
-
builder (~> 3.0.0)
|
28
|
-
i18n (~> 0.6)
|
29
|
-
activerecord (3.1.4)
|
30
|
-
activemodel (= 3.1.4)
|
31
|
-
activesupport (= 3.1.4)
|
32
|
-
arel (~> 2.2.3)
|
33
|
-
tzinfo (~> 0.3.29)
|
34
|
-
activeresource (3.1.4)
|
35
|
-
activemodel (= 3.1.4)
|
36
|
-
activesupport (= 3.1.4)
|
37
|
-
activesupport (3.1.4)
|
38
|
-
multi_json (~> 1.0)
|
39
|
-
arel (2.2.3)
|
40
|
-
builder (3.0.0)
|
41
|
-
diff-lcs (1.1.3)
|
42
|
-
erubis (2.7.0)
|
43
|
-
hike (1.2.1)
|
44
|
-
i18n (0.6.0)
|
45
|
-
json (1.7.3)
|
46
|
-
mail (2.3.3)
|
47
|
-
i18n (>= 0.4.0)
|
48
|
-
mime-types (~> 1.16)
|
49
|
-
treetop (~> 1.4.8)
|
50
|
-
mime-types (1.18)
|
51
|
-
multi_json (1.3.5)
|
52
|
-
mysql (2.8.1)
|
53
|
-
mysql2 (0.3.11)
|
54
|
-
pg (0.13.2)
|
55
|
-
polyglot (0.3.3)
|
56
|
-
rack (1.3.6)
|
57
|
-
rack-cache (1.2)
|
58
|
-
rack (>= 0.4)
|
59
|
-
rack-mount (0.8.3)
|
60
|
-
rack (>= 1.0.0)
|
61
|
-
rack-ssl (1.3.2)
|
62
|
-
rack
|
63
|
-
rack-test (0.6.1)
|
64
|
-
rack (>= 1.0)
|
65
|
-
rails (3.1.4)
|
66
|
-
actionmailer (= 3.1.4)
|
67
|
-
actionpack (= 3.1.4)
|
68
|
-
activerecord (= 3.1.4)
|
69
|
-
activeresource (= 3.1.4)
|
70
|
-
activesupport (= 3.1.4)
|
71
|
-
bundler (~> 1.0)
|
72
|
-
railties (= 3.1.4)
|
73
|
-
railties (3.1.4)
|
74
|
-
actionpack (= 3.1.4)
|
75
|
-
activesupport (= 3.1.4)
|
76
|
-
rack-ssl (~> 1.3.2)
|
77
|
-
rake (>= 0.8.7)
|
78
|
-
rdoc (~> 3.4)
|
79
|
-
thor (~> 0.14.6)
|
80
|
-
rake (0.8.7)
|
81
|
-
rdoc (3.12)
|
82
|
-
json (~> 1.4)
|
83
|
-
rspec (2.10.0)
|
84
|
-
rspec-core (~> 2.10.0)
|
85
|
-
rspec-expectations (~> 2.10.0)
|
86
|
-
rspec-mocks (~> 2.10.0)
|
87
|
-
rspec-core (2.10.1)
|
88
|
-
rspec-expectations (2.10.0)
|
89
|
-
diff-lcs (~> 1.1.3)
|
90
|
-
rspec-mocks (2.10.1)
|
91
|
-
simplecov (0.6.4)
|
92
|
-
multi_json (~> 1.0)
|
93
|
-
simplecov-html (~> 0.5.3)
|
94
|
-
simplecov-gem-adapter (1.0.1)
|
95
|
-
simplecov
|
96
|
-
simplecov-html (0.5.3)
|
97
|
-
sprockets (2.0.4)
|
98
|
-
hike (~> 1.2)
|
99
|
-
rack (~> 1.0)
|
100
|
-
tilt (~> 1.1, != 1.3.0)
|
101
|
-
sqlite3 (1.3.6)
|
102
|
-
thor (0.14.6)
|
103
|
-
tilt (1.3.3)
|
104
|
-
treetop (1.4.10)
|
105
|
-
polyglot
|
106
|
-
polyglot (>= 0.3.1)
|
107
|
-
tzinfo (0.3.33)
|
108
|
-
valuable (0.9.5)
|
109
|
-
|
110
|
-
PLATFORMS
|
111
|
-
ruby
|
112
|
-
|
113
|
-
DEPENDENCIES
|
114
|
-
mysql
|
115
|
-
mysql2
|
116
|
-
pg
|
117
|
-
rails (~> 3.1.0)
|
118
|
-
rake (~> 0.8.7)
|
119
|
-
rspec
|
120
|
-
schema_plus!
|
121
|
-
simplecov
|
122
|
-
simplecov-gem-adapter
|
123
|
-
sqlite3
|
data/gemfiles/Gemfile.rails-3.2
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /Users/ronen/github/schema_plus
|
3
|
-
specs:
|
4
|
-
schema_plus (0.4.0)
|
5
|
-
rails
|
6
|
-
valuable
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
actionmailer (3.2.3)
|
12
|
-
actionpack (= 3.2.3)
|
13
|
-
mail (~> 2.4.4)
|
14
|
-
actionpack (3.2.3)
|
15
|
-
activemodel (= 3.2.3)
|
16
|
-
activesupport (= 3.2.3)
|
17
|
-
builder (~> 3.0.0)
|
18
|
-
erubis (~> 2.7.0)
|
19
|
-
journey (~> 1.0.1)
|
20
|
-
rack (~> 1.4.0)
|
21
|
-
rack-cache (~> 1.2)
|
22
|
-
rack-test (~> 0.6.1)
|
23
|
-
sprockets (~> 2.1.2)
|
24
|
-
activemodel (3.2.3)
|
25
|
-
activesupport (= 3.2.3)
|
26
|
-
builder (~> 3.0.0)
|
27
|
-
activerecord (3.2.3)
|
28
|
-
activemodel (= 3.2.3)
|
29
|
-
activesupport (= 3.2.3)
|
30
|
-
arel (~> 3.0.2)
|
31
|
-
tzinfo (~> 0.3.29)
|
32
|
-
activeresource (3.2.3)
|
33
|
-
activemodel (= 3.2.3)
|
34
|
-
activesupport (= 3.2.3)
|
35
|
-
activesupport (3.2.3)
|
36
|
-
i18n (~> 0.6)
|
37
|
-
multi_json (~> 1.0)
|
38
|
-
arel (3.0.2)
|
39
|
-
builder (3.0.0)
|
40
|
-
diff-lcs (1.1.3)
|
41
|
-
erubis (2.7.0)
|
42
|
-
hike (1.2.1)
|
43
|
-
i18n (0.6.0)
|
44
|
-
journey (1.0.3)
|
45
|
-
json (1.7.3)
|
46
|
-
mail (2.4.4)
|
47
|
-
i18n (>= 0.4.0)
|
48
|
-
mime-types (~> 1.16)
|
49
|
-
treetop (~> 1.4.8)
|
50
|
-
mime-types (1.18)
|
51
|
-
multi_json (1.3.5)
|
52
|
-
mysql (2.8.1)
|
53
|
-
mysql2 (0.3.11)
|
54
|
-
pg (0.13.2)
|
55
|
-
polyglot (0.3.3)
|
56
|
-
rack (1.4.1)
|
57
|
-
rack-cache (1.2)
|
58
|
-
rack (>= 0.4)
|
59
|
-
rack-ssl (1.3.2)
|
60
|
-
rack
|
61
|
-
rack-test (0.6.1)
|
62
|
-
rack (>= 1.0)
|
63
|
-
rails (3.2.3)
|
64
|
-
actionmailer (= 3.2.3)
|
65
|
-
actionpack (= 3.2.3)
|
66
|
-
activerecord (= 3.2.3)
|
67
|
-
activeresource (= 3.2.3)
|
68
|
-
activesupport (= 3.2.3)
|
69
|
-
bundler (~> 1.0)
|
70
|
-
railties (= 3.2.3)
|
71
|
-
railties (3.2.3)
|
72
|
-
actionpack (= 3.2.3)
|
73
|
-
activesupport (= 3.2.3)
|
74
|
-
rack-ssl (~> 1.3.2)
|
75
|
-
rake (>= 0.8.7)
|
76
|
-
rdoc (~> 3.4)
|
77
|
-
thor (~> 0.14.6)
|
78
|
-
rake (0.8.7)
|
79
|
-
rdoc (3.12)
|
80
|
-
json (~> 1.4)
|
81
|
-
rspec (2.10.0)
|
82
|
-
rspec-core (~> 2.10.0)
|
83
|
-
rspec-expectations (~> 2.10.0)
|
84
|
-
rspec-mocks (~> 2.10.0)
|
85
|
-
rspec-core (2.10.1)
|
86
|
-
rspec-expectations (2.10.0)
|
87
|
-
diff-lcs (~> 1.1.3)
|
88
|
-
rspec-mocks (2.10.1)
|
89
|
-
simplecov (0.6.4)
|
90
|
-
multi_json (~> 1.0)
|
91
|
-
simplecov-html (~> 0.5.3)
|
92
|
-
simplecov-gem-adapter (1.0.1)
|
93
|
-
simplecov
|
94
|
-
simplecov-html (0.5.3)
|
95
|
-
sprockets (2.1.3)
|
96
|
-
hike (~> 1.2)
|
97
|
-
rack (~> 1.0)
|
98
|
-
tilt (~> 1.1, != 1.3.0)
|
99
|
-
sqlite3 (1.3.6)
|
100
|
-
thor (0.14.6)
|
101
|
-
tilt (1.3.3)
|
102
|
-
treetop (1.4.10)
|
103
|
-
polyglot
|
104
|
-
polyglot (>= 0.3.1)
|
105
|
-
tzinfo (0.3.33)
|
106
|
-
valuable (0.9.5)
|
107
|
-
|
108
|
-
PLATFORMS
|
109
|
-
ruby
|
110
|
-
|
111
|
-
DEPENDENCIES
|
112
|
-
mysql
|
113
|
-
mysql2
|
114
|
-
pg
|
115
|
-
rails (~> 3.2.0)
|
116
|
-
rake (~> 0.8.7)
|
117
|
-
rspec
|
118
|
-
schema_plus!
|
119
|
-
simplecov
|
120
|
-
simplecov-gem-adapter
|
121
|
-
sqlite3
|