updateable_views_inheritance 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/.gitignore +6 -2
  2. data/CHANGELOG.md +28 -0
  3. data/README.rdoc +18 -12
  4. data/Rakefile +2 -0
  5. data/lib/generators/updateable_views_inheritance/install_generator.rb +20 -0
  6. data/lib/generators/{updateable_views_inheritance_migration/templates/migration.rb → updateable_views_inheritance/templates/create_updateable_views_inheritance.rb} +3 -3
  7. data/lib/updateable_views_inheritance/version.rb +2 -2
  8. data/tasks/updateable_views_inheritance_tasks.rake +0 -8
  9. data/test/content_test.rb +1 -1
  10. data/test/dummy/Rakefile +7 -0
  11. data/test/dummy/app/assets/javascripts/application.js +15 -0
  12. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  13. data/test/dummy/app/controllers/application_controller.rb +3 -0
  14. data/test/dummy/app/helpers/application_helper.rb +2 -0
  15. data/test/dummy/app/mailers/.gitkeep +0 -0
  16. data/test/dummy/app/models/bicycle.rb +3 -0
  17. data/test/dummy/app/models/boat.rb +3 -0
  18. data/test/dummy/app/models/car.rb +3 -0
  19. data/test/dummy/app/models/electric_locomotive.rb +3 -0
  20. data/test/dummy/app/models/electric_train.rb +3 -0
  21. data/test/{app → dummy/app}/models/locomotive.rb +1 -1
  22. data/test/{app → dummy/app}/models/maglev_locomotive.rb +1 -1
  23. data/test/dummy/app/models/maglev_train.rb +3 -0
  24. data/test/dummy/app/models/rack_locomotive.rb +3 -0
  25. data/test/dummy/app/models/rack_train.rb +3 -0
  26. data/test/dummy/app/models/railed_vehicle.rb +3 -0
  27. data/test/dummy/app/models/steam_locomotive.rb +3 -0
  28. data/test/dummy/app/models/steam_train.rb +3 -0
  29. data/test/dummy/app/models/train.rb +3 -0
  30. data/test/{app → dummy/app}/models/vehicle.rb +1 -0
  31. data/test/dummy/app/models/wheeled_vehicle.rb +3 -0
  32. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  33. data/test/dummy/config.ru +4 -0
  34. data/test/dummy/config/application.rb +59 -0
  35. data/test/dummy/config/boot.rb +10 -0
  36. data/test/{database.yml → dummy/config/database.yml} +1 -1
  37. data/test/dummy/config/environment.rb +5 -0
  38. data/test/dummy/config/environments/development.rb +37 -0
  39. data/test/dummy/config/environments/production.rb +67 -0
  40. data/test/dummy/config/environments/test.rb +37 -0
  41. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/test/dummy/config/initializers/inflections.rb +15 -0
  43. data/test/dummy/config/initializers/mime_types.rb +5 -0
  44. data/test/dummy/config/initializers/secret_token.rb +7 -0
  45. data/test/dummy/config/initializers/session_store.rb +8 -0
  46. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/test/dummy/config/locales/en.yml +5 -0
  48. data/test/dummy/config/routes.rb +58 -0
  49. data/test/dummy/lib/assets/.gitkeep +0 -0
  50. data/test/dummy/log/.gitkeep +0 -0
  51. data/test/dummy/public/404.html +26 -0
  52. data/test/dummy/public/422.html +26 -0
  53. data/test/dummy/public/500.html +25 -0
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/dummy/script/rails +6 -0
  56. data/test/fixtures/migrations/{1_add_class_table_inheritance.rb → 1_add_updateable_views_inheritance.rb} +1 -1
  57. data/test/install_generator_test.rb +13 -0
  58. data/test/migration_test.rb +1 -1
  59. data/test/schema_test.rb +1 -1
  60. data/test/test_helper.rb +5 -67
  61. data/updateable_views_inheritance.gemspec +4 -3
  62. metadata +118 -42
  63. data/lib/generators/updateable_views_inheritance_migration/USAGE +0 -8
  64. data/lib/generators/updateable_views_inheritance_migration/uvi_migration_generator.rb +0 -12
  65. data/test/app/models/bicycle.rb +0 -3
  66. data/test/app/models/boat.rb +0 -3
  67. data/test/app/models/car.rb +0 -3
  68. data/test/app/models/electric_locomotive.rb +0 -3
  69. data/test/app/models/electric_train.rb +0 -3
  70. data/test/app/models/maglev_train.rb +0 -3
  71. data/test/app/models/rack_locomotive.rb +0 -3
  72. data/test/app/models/rack_train.rb +0 -3
  73. data/test/app/models/railed_vehicle.rb +0 -3
  74. data/test/app/models/steam_locomotive.rb +0 -3
  75. data/test/app/models/steam_train.rb +0 -3
  76. data/test/app/models/train.rb +0 -3
  77. data/test/app/models/wheeled_vehicle.rb +0 -3
@@ -5,12 +5,12 @@ require 'updateable_views_inheritance/version'
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "updateable_views_inheritance"
8
- s.version = Uvi::VERSION
8
+ s.version = UpdateableViewsInheritance::VERSION
9
9
  s.authors = ["Sava Chankov", "Denitsa Belogusheva"]
10
10
  s.email = ["sava@tutuf.com", "deni@tutuf.com"]
11
11
  s.homepage = "http://github.com/tutuf/updateable_views_inheritance"
12
12
  s.summary = %q{Class table inheritance for ActiveRecord}
13
- s.description = %q{Uvi relies on updatable views in the database that join parent and children tables}
13
+ s.description = %q{Class table inheritance for ActiveRecord based on updatable views in the database that join parent and children tables}
14
14
  s.license = "MIT"
15
15
 
16
16
  s.files = `git ls-files`.split($/)
@@ -20,7 +20,8 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_dependency "activerecord", "~>3.2.12"
22
22
  s.add_dependency "pg"
23
-
23
+
24
+ s.add_development_dependency "rails", "~>3.2.12"
24
25
  s.add_development_dependency "bundler", "~>1.3"
25
26
  s.add_development_dependency "rake"
26
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: updateable_views_inheritance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -44,6 +44,22 @@ dependencies:
44
44
  - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 3.2.12
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: 3.2.12
47
63
  - !ruby/object:Gem::Dependency
48
64
  name: bundler
49
65
  requirement: !ruby/object:Gem::Requirement
@@ -76,8 +92,8 @@ dependencies:
76
92
  - - ! '>='
77
93
  - !ruby/object:Gem::Version
78
94
  version: '0'
79
- description: Uvi relies on updatable views in the database that join parent and children
80
- tables
95
+ description: Class table inheritance for ActiveRecord based on updatable views in
96
+ the database that join parent and children tables
81
97
  email:
82
98
  - sava@tutuf.com
83
99
  - deni@tutuf.com
@@ -86,42 +102,71 @@ extensions: []
86
102
  extra_rdoc_files: []
87
103
  files:
88
104
  - .gitignore
105
+ - CHANGELOG.md
89
106
  - Gemfile
90
107
  - MIT-LICENSE
91
108
  - README.rdoc
92
109
  - Rakefile
93
110
  - doc/template/horo.rb
94
- - lib/generators/updateable_views_inheritance_migration/USAGE
95
- - lib/generators/updateable_views_inheritance_migration/templates/migration.rb
96
- - lib/generators/updateable_views_inheritance_migration/uvi_migration_generator.rb
111
+ - lib/generators/updateable_views_inheritance/install_generator.rb
112
+ - lib/generators/updateable_views_inheritance/templates/create_updateable_views_inheritance.rb
97
113
  - lib/updateable_views_inheritance.rb
98
114
  - lib/updateable_views_inheritance/active_record.rb
99
115
  - lib/updateable_views_inheritance/postgresql_adapter.rb
100
116
  - lib/updateable_views_inheritance/version.rb
101
117
  - tasks/updateable_views_inheritance_tasks.rake
102
- - test/app/models/bicycle.rb
103
- - test/app/models/boat.rb
104
- - test/app/models/car.rb
105
- - test/app/models/electric_locomotive.rb
106
- - test/app/models/electric_train.rb
107
- - test/app/models/locomotive.rb
108
- - test/app/models/maglev_locomotive.rb
109
- - test/app/models/maglev_train.rb
110
- - test/app/models/rack_locomotive.rb
111
- - test/app/models/rack_train.rb
112
- - test/app/models/railed_vehicle.rb
113
- - test/app/models/steam_locomotive.rb
114
- - test/app/models/steam_train.rb
115
- - test/app/models/train.rb
116
- - test/app/models/vehicle.rb
117
- - test/app/models/wheeled_vehicle.rb
118
118
  - test/config/database.yml
119
119
  - test/config/environment.rb
120
120
  - test/config/routes.rb
121
121
  - test/config/schema.rb
122
122
  - test/content_test.rb
123
- - test/database.yml
124
123
  - test/deep_hierarchy_test.rb
124
+ - test/dummy/Rakefile
125
+ - test/dummy/app/assets/javascripts/application.js
126
+ - test/dummy/app/assets/stylesheets/application.css
127
+ - test/dummy/app/controllers/application_controller.rb
128
+ - test/dummy/app/helpers/application_helper.rb
129
+ - test/dummy/app/mailers/.gitkeep
130
+ - test/dummy/app/models/bicycle.rb
131
+ - test/dummy/app/models/boat.rb
132
+ - test/dummy/app/models/car.rb
133
+ - test/dummy/app/models/electric_locomotive.rb
134
+ - test/dummy/app/models/electric_train.rb
135
+ - test/dummy/app/models/locomotive.rb
136
+ - test/dummy/app/models/maglev_locomotive.rb
137
+ - test/dummy/app/models/maglev_train.rb
138
+ - test/dummy/app/models/rack_locomotive.rb
139
+ - test/dummy/app/models/rack_train.rb
140
+ - test/dummy/app/models/railed_vehicle.rb
141
+ - test/dummy/app/models/steam_locomotive.rb
142
+ - test/dummy/app/models/steam_train.rb
143
+ - test/dummy/app/models/train.rb
144
+ - test/dummy/app/models/vehicle.rb
145
+ - test/dummy/app/models/wheeled_vehicle.rb
146
+ - test/dummy/app/views/layouts/application.html.erb
147
+ - test/dummy/config.ru
148
+ - test/dummy/config/application.rb
149
+ - test/dummy/config/boot.rb
150
+ - test/dummy/config/database.yml
151
+ - test/dummy/config/environment.rb
152
+ - test/dummy/config/environments/development.rb
153
+ - test/dummy/config/environments/production.rb
154
+ - test/dummy/config/environments/test.rb
155
+ - test/dummy/config/initializers/backtrace_silencers.rb
156
+ - test/dummy/config/initializers/inflections.rb
157
+ - test/dummy/config/initializers/mime_types.rb
158
+ - test/dummy/config/initializers/secret_token.rb
159
+ - test/dummy/config/initializers/session_store.rb
160
+ - test/dummy/config/initializers/wrap_parameters.rb
161
+ - test/dummy/config/locales/en.yml
162
+ - test/dummy/config/routes.rb
163
+ - test/dummy/lib/assets/.gitkeep
164
+ - test/dummy/log/.gitkeep
165
+ - test/dummy/public/404.html
166
+ - test/dummy/public/422.html
167
+ - test/dummy/public/500.html
168
+ - test/dummy/public/favicon.ico
169
+ - test/dummy/script/rails
125
170
  - test/fixtures/bicycles.yml
126
171
  - test/fixtures/boats.yml
127
172
  - test/fixtures/cars.yml
@@ -129,7 +174,7 @@ files:
129
174
  - test/fixtures/electric_trains.yml
130
175
  - test/fixtures/maglev_locomotives.yml
131
176
  - test/fixtures/maglev_trains.yml
132
- - test/fixtures/migrations/1_add_class_table_inheritance.rb
177
+ - test/fixtures/migrations/1_add_updateable_views_inheritance.rb
133
178
  - test/fixtures/migrations/2_create_with_default_table.rb
134
179
  - test/fixtures/migrations/3_create_with_explicit_table.rb
135
180
  - test/fixtures/migrations/4_create_deeper_hierarchy.rb
@@ -140,6 +185,7 @@ files:
140
185
  - test/fixtures/rack_trains.yml
141
186
  - test/fixtures/steam_locomotives.yml
142
187
  - test/fixtures/steam_trains.yml
188
+ - test/install_generator_test.rb
143
189
  - test/migration_test.rb
144
190
  - test/schema_test.rb
145
191
  - test/single_table_inheritance.rb
@@ -171,29 +217,58 @@ signing_key:
171
217
  specification_version: 3
172
218
  summary: Class table inheritance for ActiveRecord
173
219
  test_files:
174
- - test/app/models/bicycle.rb
175
- - test/app/models/boat.rb
176
- - test/app/models/car.rb
177
- - test/app/models/electric_locomotive.rb
178
- - test/app/models/electric_train.rb
179
- - test/app/models/locomotive.rb
180
- - test/app/models/maglev_locomotive.rb
181
- - test/app/models/maglev_train.rb
182
- - test/app/models/rack_locomotive.rb
183
- - test/app/models/rack_train.rb
184
- - test/app/models/railed_vehicle.rb
185
- - test/app/models/steam_locomotive.rb
186
- - test/app/models/steam_train.rb
187
- - test/app/models/train.rb
188
- - test/app/models/vehicle.rb
189
- - test/app/models/wheeled_vehicle.rb
190
220
  - test/config/database.yml
191
221
  - test/config/environment.rb
192
222
  - test/config/routes.rb
193
223
  - test/config/schema.rb
194
224
  - test/content_test.rb
195
- - test/database.yml
196
225
  - test/deep_hierarchy_test.rb
226
+ - test/dummy/Rakefile
227
+ - test/dummy/app/assets/javascripts/application.js
228
+ - test/dummy/app/assets/stylesheets/application.css
229
+ - test/dummy/app/controllers/application_controller.rb
230
+ - test/dummy/app/helpers/application_helper.rb
231
+ - test/dummy/app/mailers/.gitkeep
232
+ - test/dummy/app/models/bicycle.rb
233
+ - test/dummy/app/models/boat.rb
234
+ - test/dummy/app/models/car.rb
235
+ - test/dummy/app/models/electric_locomotive.rb
236
+ - test/dummy/app/models/electric_train.rb
237
+ - test/dummy/app/models/locomotive.rb
238
+ - test/dummy/app/models/maglev_locomotive.rb
239
+ - test/dummy/app/models/maglev_train.rb
240
+ - test/dummy/app/models/rack_locomotive.rb
241
+ - test/dummy/app/models/rack_train.rb
242
+ - test/dummy/app/models/railed_vehicle.rb
243
+ - test/dummy/app/models/steam_locomotive.rb
244
+ - test/dummy/app/models/steam_train.rb
245
+ - test/dummy/app/models/train.rb
246
+ - test/dummy/app/models/vehicle.rb
247
+ - test/dummy/app/models/wheeled_vehicle.rb
248
+ - test/dummy/app/views/layouts/application.html.erb
249
+ - test/dummy/config.ru
250
+ - test/dummy/config/application.rb
251
+ - test/dummy/config/boot.rb
252
+ - test/dummy/config/database.yml
253
+ - test/dummy/config/environment.rb
254
+ - test/dummy/config/environments/development.rb
255
+ - test/dummy/config/environments/production.rb
256
+ - test/dummy/config/environments/test.rb
257
+ - test/dummy/config/initializers/backtrace_silencers.rb
258
+ - test/dummy/config/initializers/inflections.rb
259
+ - test/dummy/config/initializers/mime_types.rb
260
+ - test/dummy/config/initializers/secret_token.rb
261
+ - test/dummy/config/initializers/session_store.rb
262
+ - test/dummy/config/initializers/wrap_parameters.rb
263
+ - test/dummy/config/locales/en.yml
264
+ - test/dummy/config/routes.rb
265
+ - test/dummy/lib/assets/.gitkeep
266
+ - test/dummy/log/.gitkeep
267
+ - test/dummy/public/404.html
268
+ - test/dummy/public/422.html
269
+ - test/dummy/public/500.html
270
+ - test/dummy/public/favicon.ico
271
+ - test/dummy/script/rails
197
272
  - test/fixtures/bicycles.yml
198
273
  - test/fixtures/boats.yml
199
274
  - test/fixtures/cars.yml
@@ -201,7 +276,7 @@ test_files:
201
276
  - test/fixtures/electric_trains.yml
202
277
  - test/fixtures/maglev_locomotives.yml
203
278
  - test/fixtures/maglev_trains.yml
204
- - test/fixtures/migrations/1_add_class_table_inheritance.rb
279
+ - test/fixtures/migrations/1_add_updateable_views_inheritance.rb
205
280
  - test/fixtures/migrations/2_create_with_default_table.rb
206
281
  - test/fixtures/migrations/3_create_with_explicit_table.rb
207
282
  - test/fixtures/migrations/4_create_deeper_hierarchy.rb
@@ -212,6 +287,7 @@ test_files:
212
287
  - test/fixtures/rack_trains.yml
213
288
  - test/fixtures/steam_locomotives.yml
214
289
  - test/fixtures/steam_trains.yml
290
+ - test/install_generator_test.rb
215
291
  - test/migration_test.rb
216
292
  - test/schema_test.rb
217
293
  - test/single_table_inheritance.rb
@@ -1,8 +0,0 @@
1
- Description:
2
- Creates a migration for adding a table used by the updateable_views_inheritance gem.
3
-
4
- The generator takes a migration name as its argument. The migration name may be
5
- given in CamelCase or under_score.
6
-
7
- Example:
8
- ./script/generate updateable_views_inheritance_migration AddUvi
@@ -1,12 +0,0 @@
1
- class ClassTableInheritanceMigrationGenerator < Rails::Generator::NamedBase #:nodoc:
2
- def initialize(runtime_args, runtime_options = {})
3
- runtime_args << 'add_updateable_views_inheritance_migration' if runtime_args.empty?
4
- super
5
- end
6
-
7
- def manifest
8
- record do |m|
9
- m.migration_template 'migration.rb', 'db/migrate'
10
- end
11
- end
12
- end
@@ -1,3 +0,0 @@
1
- class Bicycle < WheeledVehicle
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class Boat < Vehicle
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class Car < WheeledVehicle
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class ElectricLocomotive < Locomotive
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class ElectricTrain < Train
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class MaglevTrain < ElectricTrain
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class RackLocomotive < Locomotive
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class RackTrain < Train
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class RailedVehicle < Vehicle
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class SteamLocomotive < Locomotive
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class SteamTrain < Train
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class Train < RailedVehicle
2
-
3
- end
@@ -1,3 +0,0 @@
1
- class WheeledVehicle < Vehicle
2
-
3
- end