schema_plus 0.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +25 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +25 -0
- data/README.rdoc +147 -0
- data/Rakefile +70 -0
- data/init.rb +1 -0
- data/lib/schema_plus/active_record/associations.rb +211 -0
- data/lib/schema_plus/active_record/base.rb +81 -0
- data/lib/schema_plus/active_record/connection_adapters/abstract_adapter.rb +96 -0
- data/lib/schema_plus/active_record/connection_adapters/column.rb +55 -0
- data/lib/schema_plus/active_record/connection_adapters/foreign_key_definition.rb +115 -0
- data/lib/schema_plus/active_record/connection_adapters/index_definition.rb +51 -0
- data/lib/schema_plus/active_record/connection_adapters/mysql_adapter.rb +111 -0
- data/lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb +163 -0
- data/lib/schema_plus/active_record/connection_adapters/schema_statements.rb +39 -0
- data/lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb +78 -0
- data/lib/schema_plus/active_record/connection_adapters/table_definition.rb +130 -0
- data/lib/schema_plus/active_record/migration.rb +220 -0
- data/lib/schema_plus/active_record/schema.rb +27 -0
- data/lib/schema_plus/active_record/schema_dumper.rb +122 -0
- data/lib/schema_plus/active_record/validations.rb +139 -0
- data/lib/schema_plus/railtie.rb +12 -0
- data/lib/schema_plus/version.rb +3 -0
- data/lib/schema_plus.rb +248 -0
- data/schema_plus.gemspec +37 -0
- data/schema_plus.gemspec.rails3.0 +36 -0
- data/schema_plus.gemspec.rails3.1 +36 -0
- data/spec/association_spec.rb +529 -0
- data/spec/connections/mysql/connection.rb +18 -0
- data/spec/connections/mysql2/connection.rb +18 -0
- data/spec/connections/postgresql/connection.rb +15 -0
- data/spec/connections/sqlite3/connection.rb +14 -0
- data/spec/foreign_key_definition_spec.rb +23 -0
- data/spec/foreign_key_spec.rb +142 -0
- data/spec/index_definition_spec.rb +139 -0
- data/spec/index_spec.rb +71 -0
- data/spec/migration_spec.rb +405 -0
- data/spec/models/comment.rb +2 -0
- data/spec/models/post.rb +2 -0
- data/spec/models/user.rb +2 -0
- data/spec/references_spec.rb +78 -0
- data/spec/schema/auto_schema.rb +23 -0
- data/spec/schema/core_schema.rb +21 -0
- data/spec/schema_dumper_spec.rb +167 -0
- data/spec/schema_spec.rb +71 -0
- data/spec/spec_helper.rb +59 -0
- data/spec/support/extensions/active_model.rb +13 -0
- data/spec/support/helpers.rb +16 -0
- data/spec/support/matchers/automatic_foreign_key_matchers.rb +2 -0
- data/spec/support/matchers/have_index.rb +52 -0
- data/spec/support/matchers/reference.rb +66 -0
- data/spec/support/reference.rb +66 -0
- data/spec/validations_spec.rb +294 -0
- data/spec/views_spec.rb +140 -0
- metadata +269 -0
metadata
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: schema_plus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: 6
|
5
|
+
version: 0.1.0.pre1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ronen Barzel
|
9
|
+
- "Micha\xC5\x82 \xC5\x81omnicki"
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
|
14
|
+
date: 2011-07-11 00:00:00 -07:00
|
15
|
+
default_executable:
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: rails
|
19
|
+
prerelease: false
|
20
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: "0"
|
26
|
+
type: :runtime
|
27
|
+
version_requirements: *id001
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: valuable
|
30
|
+
prerelease: false
|
31
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
32
|
+
none: false
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: "0"
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id002
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: rake
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.8.7
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id003
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rails
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 3.1.0.rc1
|
59
|
+
type: :development
|
60
|
+
version_requirements: *id004
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
prerelease: false
|
64
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: "0"
|
70
|
+
type: :development
|
71
|
+
version_requirements: *id005
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: pg
|
74
|
+
prerelease: false
|
75
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "0"
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id006
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mysql
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
92
|
+
type: :development
|
93
|
+
version_requirements: *id007
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: mysql2
|
96
|
+
prerelease: false
|
97
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: "0"
|
103
|
+
type: :development
|
104
|
+
version_requirements: *id008
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: sqlite3
|
107
|
+
prerelease: false
|
108
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: "0"
|
114
|
+
type: :development
|
115
|
+
version_requirements: *id009
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: simplecov
|
118
|
+
prerelease: false
|
119
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: "0"
|
125
|
+
type: :development
|
126
|
+
version_requirements: *id010
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: simplecov-gem-adapter
|
129
|
+
prerelease: false
|
130
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: "0"
|
136
|
+
type: :development
|
137
|
+
version_requirements: *id011
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: ruby-debug19
|
140
|
+
prerelease: false
|
141
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: "0"
|
147
|
+
type: :development
|
148
|
+
version_requirements: *id012
|
149
|
+
description: "SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views."
|
150
|
+
email:
|
151
|
+
- ronen@barzel.org
|
152
|
+
- michal.lomnicki@gmail.com
|
153
|
+
executables: []
|
154
|
+
|
155
|
+
extensions: []
|
156
|
+
|
157
|
+
extra_rdoc_files: []
|
158
|
+
|
159
|
+
files:
|
160
|
+
- .gitignore
|
161
|
+
- Gemfile
|
162
|
+
- MIT-LICENSE
|
163
|
+
- README.rdoc
|
164
|
+
- Rakefile
|
165
|
+
- init.rb
|
166
|
+
- lib/schema_plus.rb
|
167
|
+
- lib/schema_plus/active_record/associations.rb
|
168
|
+
- lib/schema_plus/active_record/base.rb
|
169
|
+
- lib/schema_plus/active_record/connection_adapters/abstract_adapter.rb
|
170
|
+
- lib/schema_plus/active_record/connection_adapters/column.rb
|
171
|
+
- lib/schema_plus/active_record/connection_adapters/foreign_key_definition.rb
|
172
|
+
- lib/schema_plus/active_record/connection_adapters/index_definition.rb
|
173
|
+
- lib/schema_plus/active_record/connection_adapters/mysql_adapter.rb
|
174
|
+
- lib/schema_plus/active_record/connection_adapters/postgresql_adapter.rb
|
175
|
+
- lib/schema_plus/active_record/connection_adapters/schema_statements.rb
|
176
|
+
- lib/schema_plus/active_record/connection_adapters/sqlite3_adapter.rb
|
177
|
+
- lib/schema_plus/active_record/connection_adapters/table_definition.rb
|
178
|
+
- lib/schema_plus/active_record/migration.rb
|
179
|
+
- lib/schema_plus/active_record/schema.rb
|
180
|
+
- lib/schema_plus/active_record/schema_dumper.rb
|
181
|
+
- lib/schema_plus/active_record/validations.rb
|
182
|
+
- lib/schema_plus/railtie.rb
|
183
|
+
- lib/schema_plus/version.rb
|
184
|
+
- schema_plus.gemspec
|
185
|
+
- schema_plus.gemspec.rails3.0
|
186
|
+
- schema_plus.gemspec.rails3.1
|
187
|
+
- spec/association_spec.rb
|
188
|
+
- spec/connections/mysql/connection.rb
|
189
|
+
- spec/connections/mysql2/connection.rb
|
190
|
+
- spec/connections/postgresql/connection.rb
|
191
|
+
- spec/connections/sqlite3/connection.rb
|
192
|
+
- spec/foreign_key_definition_spec.rb
|
193
|
+
- spec/foreign_key_spec.rb
|
194
|
+
- spec/index_definition_spec.rb
|
195
|
+
- spec/index_spec.rb
|
196
|
+
- spec/migration_spec.rb
|
197
|
+
- spec/models/comment.rb
|
198
|
+
- spec/models/post.rb
|
199
|
+
- spec/models/user.rb
|
200
|
+
- spec/references_spec.rb
|
201
|
+
- spec/schema/auto_schema.rb
|
202
|
+
- spec/schema/core_schema.rb
|
203
|
+
- spec/schema_dumper_spec.rb
|
204
|
+
- spec/schema_spec.rb
|
205
|
+
- spec/spec_helper.rb
|
206
|
+
- spec/support/extensions/active_model.rb
|
207
|
+
- spec/support/helpers.rb
|
208
|
+
- spec/support/matchers/automatic_foreign_key_matchers.rb
|
209
|
+
- spec/support/matchers/have_index.rb
|
210
|
+
- spec/support/matchers/reference.rb
|
211
|
+
- spec/support/reference.rb
|
212
|
+
- spec/validations_spec.rb
|
213
|
+
- spec/views_spec.rb
|
214
|
+
has_rdoc: true
|
215
|
+
homepage: https://github.com/lomba/schema_plus
|
216
|
+
licenses: []
|
217
|
+
|
218
|
+
post_install_message:
|
219
|
+
rdoc_options: []
|
220
|
+
|
221
|
+
require_paths:
|
222
|
+
- lib
|
223
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
none: false
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: "0"
|
229
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
|
+
none: false
|
231
|
+
requirements:
|
232
|
+
- - ">"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: 1.3.1
|
235
|
+
requirements: []
|
236
|
+
|
237
|
+
rubyforge_project: schema_plus
|
238
|
+
rubygems_version: 1.6.2
|
239
|
+
signing_key:
|
240
|
+
specification_version: 3
|
241
|
+
summary: Enhances ActiveRecord schema mechanism, including more DRY index creation and support for foreign key constraints and views.
|
242
|
+
test_files:
|
243
|
+
- spec/association_spec.rb
|
244
|
+
- spec/connections/mysql/connection.rb
|
245
|
+
- spec/connections/mysql2/connection.rb
|
246
|
+
- spec/connections/postgresql/connection.rb
|
247
|
+
- spec/connections/sqlite3/connection.rb
|
248
|
+
- spec/foreign_key_definition_spec.rb
|
249
|
+
- spec/foreign_key_spec.rb
|
250
|
+
- spec/index_definition_spec.rb
|
251
|
+
- spec/index_spec.rb
|
252
|
+
- spec/migration_spec.rb
|
253
|
+
- spec/models/comment.rb
|
254
|
+
- spec/models/post.rb
|
255
|
+
- spec/models/user.rb
|
256
|
+
- spec/references_spec.rb
|
257
|
+
- spec/schema/auto_schema.rb
|
258
|
+
- spec/schema/core_schema.rb
|
259
|
+
- spec/schema_dumper_spec.rb
|
260
|
+
- spec/schema_spec.rb
|
261
|
+
- spec/spec_helper.rb
|
262
|
+
- spec/support/extensions/active_model.rb
|
263
|
+
- spec/support/helpers.rb
|
264
|
+
- spec/support/matchers/automatic_foreign_key_matchers.rb
|
265
|
+
- spec/support/matchers/have_index.rb
|
266
|
+
- spec/support/matchers/reference.rb
|
267
|
+
- spec/support/reference.rb
|
268
|
+
- spec/validations_spec.rb
|
269
|
+
- spec/views_spec.rb
|