draper 0.18.0 → 1.0.0
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/.gitignore +3 -0
- data/.travis.yml +11 -0
- data/.yardopts +1 -1
- data/CHANGELOG.md +161 -0
- data/CONTRIBUTING.md +11 -0
- data/Gemfile +20 -0
- data/LICENSE +7 -0
- data/README.md +324 -0
- data/Rakefile +52 -31
- data/draper.gemspec +11 -9
- data/lib/draper/automatic_delegation.rb +50 -0
- data/lib/draper/collection_decorator.rb +107 -0
- data/lib/draper/decoratable.rb +83 -0
- data/lib/draper/decorated_association.rb +74 -0
- data/lib/draper/decorator.rb +238 -0
- data/lib/draper/delegation.rb +13 -0
- data/lib/draper/finders.rb +37 -0
- data/lib/draper/helper_proxy.rb +17 -0
- data/lib/draper/lazy_helpers.rb +10 -6
- data/lib/draper/railtie.rb +27 -21
- data/lib/draper/tasks/test.rake +22 -0
- data/lib/draper/test/devise_helper.rb +34 -0
- data/lib/draper/test/minitest_integration.rb +2 -3
- data/lib/draper/test/rspec_integration.rb +3 -13
- data/lib/draper/test_case.rb +33 -0
- data/lib/draper/version.rb +1 -1
- data/lib/draper/view_context.rb +12 -17
- data/lib/draper/view_helpers.rb +37 -0
- data/lib/draper.rb +47 -8
- data/lib/generators/decorator/decorator_generator.rb +10 -2
- data/lib/generators/decorator/templates/decorator.rb +12 -27
- data/lib/generators/mini_test/decorator_generator.rb +20 -0
- data/lib/generators/mini_test/templates/decorator_spec.rb +4 -0
- data/lib/generators/mini_test/templates/decorator_test.rb +4 -0
- data/lib/generators/test_unit/templates/decorator_test.rb +1 -1
- data/spec/draper/collection_decorator_spec.rb +286 -0
- data/spec/draper/decoratable_spec.rb +192 -0
- data/spec/draper/decorated_association_spec.rb +142 -0
- data/spec/draper/decorator_spec.rb +624 -0
- data/spec/draper/finders_spec.rb +132 -0
- data/spec/draper/helper_proxy_spec.rb +12 -0
- data/spec/draper/view_helpers_spec.rb +41 -0
- data/spec/dummy/.rspec +2 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +4 -0
- data/spec/dummy/app/controllers/localized_urls.rb +5 -0
- data/spec/dummy/app/controllers/posts_controller.rb +11 -0
- data/spec/dummy/app/decorators/post_decorator.rb +32 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +3 -0
- data/spec/dummy/app/mailers/post_mailer.rb +9 -0
- data/spec/dummy/app/models/post.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +11 -0
- data/spec/dummy/app/views/post_mailer/decorated_email.html.erb +1 -0
- data/spec/dummy/app/views/posts/_post.html.erb +19 -0
- data/spec/dummy/app/views/posts/show.html.erb +1 -0
- data/spec/dummy/config/application.rb +64 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +34 -0
- data/spec/dummy/config/environments/production.rb +55 -0
- data/spec/dummy/config/environments/test.rb +32 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +7 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20121019115657_create_posts.rb +8 -0
- data/spec/dummy/db/schema.rb +21 -0
- data/spec/dummy/db/seeds.rb +2 -0
- data/spec/dummy/lib/tasks/test.rake +10 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/mini_test/mini_test_integration_test.rb +46 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/decorators/post_decorator_spec.rb +26 -0
- data/spec/dummy/spec/decorators/rspec_integration_spec.rb +19 -0
- data/spec/dummy/spec/mailers/post_mailer_spec.rb +29 -0
- data/spec/dummy/spec/models/post_spec.rb +14 -0
- data/spec/dummy/spec/spec_helper.rb +8 -0
- data/spec/generators/decorator/decorator_generator_spec.rb +47 -7
- data/spec/integration/integration_spec.rb +33 -0
- data/{performance → spec/performance}/decorators.rb +2 -4
- data/spec/spec_helper.rb +20 -45
- data/spec/support/action_controller.rb +12 -0
- data/spec/support/active_model.rb +7 -0
- data/spec/support/active_record.rb +9 -0
- data/spec/support/{samples → decorators}/decorator_with_application_helper.rb +1 -1
- data/spec/support/decorators/namespaced_product_decorator.rb +5 -0
- data/spec/support/decorators/non_active_model_product_decorator.rb +2 -0
- data/spec/support/decorators/product_decorator.rb +23 -0
- data/spec/support/{samples → decorators}/products_decorator.rb +1 -1
- data/spec/support/decorators/some_thing_decorator.rb +2 -0
- data/spec/support/{samples → decorators}/specific_product_decorator.rb +0 -2
- data/spec/support/dummy_app.rb +85 -0
- data/spec/support/matchers/have_text.rb +50 -0
- data/spec/support/{samples → models}/namespaced_product.rb +1 -3
- data/spec/support/{samples → models}/non_active_model_product.rb +1 -0
- data/spec/support/{samples → models}/product.rb +17 -2
- data/spec/support/models/some_thing.rb +5 -0
- data/spec/support/models/uninferrable_decorator_model.rb +3 -0
- metadata +241 -87
- data/CHANGELOG.markdown +0 -57
- data/Readme.markdown +0 -387
- data/lib/draper/active_model_support.rb +0 -27
- data/lib/draper/base.rb +0 -312
- data/lib/draper/decorated_enumerable_proxy.rb +0 -90
- data/lib/draper/model_support.rb +0 -25
- data/lib/draper/rspec_integration.rb +0 -2
- data/lib/draper/system.rb +0 -18
- data/spec/draper/base_spec.rb +0 -873
- data/spec/draper/decorated_enumerable_proxy_spec.rb +0 -45
- data/spec/draper/model_support_spec.rb +0 -48
- data/spec/minitest-rails/spec_type_spec.rb +0 -63
- data/spec/support/samples/active_record.rb +0 -17
- data/spec/support/samples/decorator.rb +0 -5
- data/spec/support/samples/decorator_with_allows.rb +0 -3
- data/spec/support/samples/decorator_with_denies.rb +0 -3
- data/spec/support/samples/decorator_with_denies_all.rb +0 -3
- data/spec/support/samples/decorator_with_multiple_allows.rb +0 -4
- data/spec/support/samples/decorator_with_special_methods.rb +0 -13
- data/spec/support/samples/enumerable_proxy.rb +0 -3
- data/spec/support/samples/namespaced_product_decorator.rb +0 -7
- data/spec/support/samples/product_decorator.rb +0 -7
- data/spec/support/samples/sequel_product.rb +0 -13
- data/spec/support/samples/some_thing.rb +0 -2
- data/spec/support/samples/some_thing_decorator.rb +0 -3
- /data/{performance → spec/performance}/active_record.rb +0 -0
- /data/{performance/bechmark.rb → spec/performance/benchmark.rb} +0 -0
- /data/{performance → spec/performance}/models.rb +0 -0
- /data/spec/support/{samples → decorators}/widget_decorator.rb +0 -0
- /data/spec/support/{samples → models}/widget.rb +0 -0
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: draper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,32 +10,48 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2013-01-14 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activesupport
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
none: false
|
|
19
19
|
requirements:
|
|
20
|
-
- -
|
|
20
|
+
- - ! '>='
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '3.
|
|
22
|
+
version: '3.0'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
none: false
|
|
27
27
|
requirements:
|
|
28
|
-
- -
|
|
28
|
+
- - ! '>='
|
|
29
29
|
- !ruby/object:Gem::Version
|
|
30
|
-
version: '3.
|
|
30
|
+
version: '3.0'
|
|
31
31
|
- !ruby/object:Gem::Dependency
|
|
32
32
|
name: actionpack
|
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
|
34
|
+
none: false
|
|
35
|
+
requirements:
|
|
36
|
+
- - ! '>='
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '3.0'
|
|
39
|
+
type: :runtime
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
none: false
|
|
43
|
+
requirements:
|
|
44
|
+
- - ! '>='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '3.0'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: request_store
|
|
33
49
|
requirement: !ruby/object:Gem::Requirement
|
|
34
50
|
none: false
|
|
35
51
|
requirements:
|
|
36
52
|
- - ~>
|
|
37
53
|
- !ruby/object:Gem::Version
|
|
38
|
-
version:
|
|
54
|
+
version: 1.0.3
|
|
39
55
|
type: :runtime
|
|
40
56
|
prerelease: false
|
|
41
57
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -43,7 +59,7 @@ dependencies:
|
|
|
43
59
|
requirements:
|
|
44
60
|
- - ~>
|
|
45
61
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
62
|
+
version: 1.0.3
|
|
47
63
|
- !ruby/object:Gem::Dependency
|
|
48
64
|
name: ammeter
|
|
49
65
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -65,7 +81,7 @@ dependencies:
|
|
|
65
81
|
requirement: !ruby/object:Gem::Requirement
|
|
66
82
|
none: false
|
|
67
83
|
requirements:
|
|
68
|
-
- -
|
|
84
|
+
- - ! '>='
|
|
69
85
|
- !ruby/object:Gem::Version
|
|
70
86
|
version: 0.9.2
|
|
71
87
|
type: :development
|
|
@@ -73,7 +89,7 @@ dependencies:
|
|
|
73
89
|
version_requirements: !ruby/object:Gem::Requirement
|
|
74
90
|
none: false
|
|
75
91
|
requirements:
|
|
76
|
-
- -
|
|
92
|
+
- - ! '>='
|
|
77
93
|
- !ruby/object:Gem::Version
|
|
78
94
|
version: 0.9.2
|
|
79
95
|
- !ruby/object:Gem::Dependency
|
|
@@ -83,7 +99,7 @@ dependencies:
|
|
|
83
99
|
requirements:
|
|
84
100
|
- - ~>
|
|
85
101
|
- !ruby/object:Gem::Version
|
|
86
|
-
version: '2.
|
|
102
|
+
version: '2.12'
|
|
87
103
|
type: :development
|
|
88
104
|
prerelease: false
|
|
89
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -91,15 +107,15 @@ dependencies:
|
|
|
91
107
|
requirements:
|
|
92
108
|
- - ~>
|
|
93
109
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: '2.
|
|
110
|
+
version: '2.12'
|
|
95
111
|
- !ruby/object:Gem::Dependency
|
|
96
|
-
name:
|
|
112
|
+
name: rspec-mocks
|
|
97
113
|
requirement: !ruby/object:Gem::Requirement
|
|
98
114
|
none: false
|
|
99
115
|
requirements:
|
|
100
116
|
- - ! '>='
|
|
101
117
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
118
|
+
version: 2.12.1
|
|
103
119
|
type: :development
|
|
104
120
|
prerelease: false
|
|
105
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -107,7 +123,23 @@ dependencies:
|
|
|
107
123
|
requirements:
|
|
108
124
|
- - ! '>='
|
|
109
125
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
126
|
+
version: 2.12.1
|
|
127
|
+
- !ruby/object:Gem::Dependency
|
|
128
|
+
name: rspec-rails
|
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
|
130
|
+
none: false
|
|
131
|
+
requirements:
|
|
132
|
+
- - ~>
|
|
133
|
+
- !ruby/object:Gem::Version
|
|
134
|
+
version: '2.12'
|
|
135
|
+
type: :development
|
|
136
|
+
prerelease: false
|
|
137
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
+
none: false
|
|
139
|
+
requirements:
|
|
140
|
+
- - ~>
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: '2.12'
|
|
111
143
|
- !ruby/object:Gem::Dependency
|
|
112
144
|
name: minitest-rails
|
|
113
145
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -124,7 +156,24 @@ dependencies:
|
|
|
124
156
|
- - ~>
|
|
125
157
|
- !ruby/object:Gem::Version
|
|
126
158
|
version: '0.2'
|
|
127
|
-
|
|
159
|
+
- !ruby/object:Gem::Dependency
|
|
160
|
+
name: capybara
|
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
|
162
|
+
none: false
|
|
163
|
+
requirements:
|
|
164
|
+
- - ! '>='
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
type: :development
|
|
168
|
+
prerelease: false
|
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
170
|
+
none: false
|
|
171
|
+
requirements:
|
|
172
|
+
- - ! '>='
|
|
173
|
+
- !ruby/object:Gem::Version
|
|
174
|
+
version: '0'
|
|
175
|
+
description: Draper adds a nicely-separated object-oriented layer of presentation
|
|
176
|
+
logic to your Rails apps.
|
|
128
177
|
email:
|
|
129
178
|
- jeff@casimircreative.com
|
|
130
179
|
- steve@steveklabnik.com
|
|
@@ -136,65 +185,124 @@ files:
|
|
|
136
185
|
- .rspec
|
|
137
186
|
- .travis.yml
|
|
138
187
|
- .yardopts
|
|
139
|
-
- CHANGELOG.
|
|
188
|
+
- CHANGELOG.md
|
|
189
|
+
- CONTRIBUTING.md
|
|
140
190
|
- Gemfile
|
|
141
191
|
- Guardfile
|
|
192
|
+
- LICENSE
|
|
193
|
+
- README.md
|
|
142
194
|
- Rakefile
|
|
143
|
-
- Readme.markdown
|
|
144
195
|
- draper.gemspec
|
|
145
196
|
- lib/draper.rb
|
|
146
|
-
- lib/draper/
|
|
147
|
-
- lib/draper/
|
|
148
|
-
- lib/draper/
|
|
197
|
+
- lib/draper/automatic_delegation.rb
|
|
198
|
+
- lib/draper/collection_decorator.rb
|
|
199
|
+
- lib/draper/decoratable.rb
|
|
200
|
+
- lib/draper/decorated_association.rb
|
|
201
|
+
- lib/draper/decorator.rb
|
|
202
|
+
- lib/draper/delegation.rb
|
|
203
|
+
- lib/draper/finders.rb
|
|
204
|
+
- lib/draper/helper_proxy.rb
|
|
149
205
|
- lib/draper/helper_support.rb
|
|
150
206
|
- lib/draper/lazy_helpers.rb
|
|
151
|
-
- lib/draper/model_support.rb
|
|
152
207
|
- lib/draper/railtie.rb
|
|
153
|
-
- lib/draper/
|
|
154
|
-
- lib/draper/
|
|
208
|
+
- lib/draper/tasks/test.rake
|
|
209
|
+
- lib/draper/test/devise_helper.rb
|
|
155
210
|
- lib/draper/test/minitest_integration.rb
|
|
156
211
|
- lib/draper/test/rspec_integration.rb
|
|
212
|
+
- lib/draper/test_case.rb
|
|
157
213
|
- lib/draper/version.rb
|
|
158
214
|
- lib/draper/view_context.rb
|
|
215
|
+
- lib/draper/view_helpers.rb
|
|
159
216
|
- lib/generators/decorator/decorator_generator.rb
|
|
160
217
|
- lib/generators/decorator/templates/decorator.rb
|
|
218
|
+
- lib/generators/mini_test/decorator_generator.rb
|
|
219
|
+
- lib/generators/mini_test/templates/decorator_spec.rb
|
|
220
|
+
- lib/generators/mini_test/templates/decorator_test.rb
|
|
161
221
|
- lib/generators/resource_override.rb
|
|
162
222
|
- lib/generators/rspec/decorator_generator.rb
|
|
163
223
|
- lib/generators/rspec/templates/decorator_spec.rb
|
|
164
224
|
- lib/generators/test_unit/decorator_generator.rb
|
|
165
225
|
- lib/generators/test_unit/templates/decorator_test.rb
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
- spec/draper/
|
|
171
|
-
- spec/draper/
|
|
172
|
-
- spec/draper/
|
|
226
|
+
- spec/draper/collection_decorator_spec.rb
|
|
227
|
+
- spec/draper/decoratable_spec.rb
|
|
228
|
+
- spec/draper/decorated_association_spec.rb
|
|
229
|
+
- spec/draper/decorator_spec.rb
|
|
230
|
+
- spec/draper/finders_spec.rb
|
|
231
|
+
- spec/draper/helper_proxy_spec.rb
|
|
232
|
+
- spec/draper/view_helpers_spec.rb
|
|
233
|
+
- spec/dummy/.rspec
|
|
234
|
+
- spec/dummy/README.rdoc
|
|
235
|
+
- spec/dummy/Rakefile
|
|
236
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
237
|
+
- spec/dummy/app/controllers/localized_urls.rb
|
|
238
|
+
- spec/dummy/app/controllers/posts_controller.rb
|
|
239
|
+
- spec/dummy/app/decorators/post_decorator.rb
|
|
240
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
241
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
|
242
|
+
- spec/dummy/app/mailers/post_mailer.rb
|
|
243
|
+
- spec/dummy/app/models/post.rb
|
|
244
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
245
|
+
- spec/dummy/app/views/post_mailer/decorated_email.html.erb
|
|
246
|
+
- spec/dummy/app/views/posts/_post.html.erb
|
|
247
|
+
- spec/dummy/app/views/posts/show.html.erb
|
|
248
|
+
- spec/dummy/config.ru
|
|
249
|
+
- spec/dummy/config/application.rb
|
|
250
|
+
- spec/dummy/config/boot.rb
|
|
251
|
+
- spec/dummy/config/database.yml
|
|
252
|
+
- spec/dummy/config/environment.rb
|
|
253
|
+
- spec/dummy/config/environments/development.rb
|
|
254
|
+
- spec/dummy/config/environments/production.rb
|
|
255
|
+
- spec/dummy/config/environments/test.rb
|
|
256
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
257
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
258
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
259
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
260
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
261
|
+
- spec/dummy/config/locales/en.yml
|
|
262
|
+
- spec/dummy/config/routes.rb
|
|
263
|
+
- spec/dummy/db/migrate/20121019115657_create_posts.rb
|
|
264
|
+
- spec/dummy/db/schema.rb
|
|
265
|
+
- spec/dummy/db/seeds.rb
|
|
266
|
+
- spec/dummy/lib/tasks/test.rake
|
|
267
|
+
- spec/dummy/log/.gitkeep
|
|
268
|
+
- spec/dummy/mini_test/mini_test_integration_test.rb
|
|
269
|
+
- spec/dummy/public/404.html
|
|
270
|
+
- spec/dummy/public/422.html
|
|
271
|
+
- spec/dummy/public/500.html
|
|
272
|
+
- spec/dummy/public/favicon.ico
|
|
273
|
+
- spec/dummy/script/rails
|
|
274
|
+
- spec/dummy/spec/decorators/post_decorator_spec.rb
|
|
275
|
+
- spec/dummy/spec/decorators/rspec_integration_spec.rb
|
|
276
|
+
- spec/dummy/spec/mailers/post_mailer_spec.rb
|
|
277
|
+
- spec/dummy/spec/models/post_spec.rb
|
|
278
|
+
- spec/dummy/spec/spec_helper.rb
|
|
173
279
|
- spec/generators/decorator/decorator_generator_spec.rb
|
|
174
|
-
- spec/
|
|
280
|
+
- spec/integration/integration_spec.rb
|
|
281
|
+
- spec/performance/active_record.rb
|
|
282
|
+
- spec/performance/benchmark.rb
|
|
283
|
+
- spec/performance/decorators.rb
|
|
284
|
+
- spec/performance/models.rb
|
|
175
285
|
- spec/spec_helper.rb
|
|
176
|
-
- spec/support/
|
|
177
|
-
- spec/support/
|
|
178
|
-
- spec/support/
|
|
179
|
-
- spec/support/
|
|
180
|
-
- spec/support/
|
|
181
|
-
- spec/support/
|
|
182
|
-
- spec/support/
|
|
183
|
-
- spec/support/
|
|
184
|
-
- spec/support/
|
|
185
|
-
- spec/support/
|
|
186
|
-
- spec/support/
|
|
187
|
-
- spec/support/
|
|
188
|
-
- spec/support/
|
|
189
|
-
- spec/support/
|
|
190
|
-
- spec/support/
|
|
191
|
-
- spec/support/
|
|
192
|
-
- spec/support/
|
|
193
|
-
- spec/support/
|
|
194
|
-
- spec/support/
|
|
195
|
-
|
|
196
|
-
- spec/support/samples/widget_decorator.rb
|
|
197
|
-
homepage: http://github.com/jcasimir/draper
|
|
286
|
+
- spec/support/action_controller.rb
|
|
287
|
+
- spec/support/active_model.rb
|
|
288
|
+
- spec/support/active_record.rb
|
|
289
|
+
- spec/support/decorators/decorator_with_application_helper.rb
|
|
290
|
+
- spec/support/decorators/namespaced_product_decorator.rb
|
|
291
|
+
- spec/support/decorators/non_active_model_product_decorator.rb
|
|
292
|
+
- spec/support/decorators/product_decorator.rb
|
|
293
|
+
- spec/support/decorators/products_decorator.rb
|
|
294
|
+
- spec/support/decorators/some_thing_decorator.rb
|
|
295
|
+
- spec/support/decorators/specific_product_decorator.rb
|
|
296
|
+
- spec/support/decorators/widget_decorator.rb
|
|
297
|
+
- spec/support/dummy_app.rb
|
|
298
|
+
- spec/support/matchers/have_text.rb
|
|
299
|
+
- spec/support/models/namespaced_product.rb
|
|
300
|
+
- spec/support/models/non_active_model_product.rb
|
|
301
|
+
- spec/support/models/product.rb
|
|
302
|
+
- spec/support/models/some_thing.rb
|
|
303
|
+
- spec/support/models/uninferrable_decorator_model.rb
|
|
304
|
+
- spec/support/models/widget.rb
|
|
305
|
+
homepage: http://github.com/drapergem/draper
|
|
198
306
|
licenses: []
|
|
199
307
|
post_install_message:
|
|
200
308
|
rdoc_options: []
|
|
@@ -206,50 +314,96 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
206
314
|
- - ! '>='
|
|
207
315
|
- !ruby/object:Gem::Version
|
|
208
316
|
version: '0'
|
|
209
|
-
segments:
|
|
210
|
-
- 0
|
|
211
|
-
hash: 3407414068195492297
|
|
212
317
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
318
|
none: false
|
|
214
319
|
requirements:
|
|
215
320
|
- - ! '>='
|
|
216
321
|
- !ruby/object:Gem::Version
|
|
217
322
|
version: '0'
|
|
218
|
-
segments:
|
|
219
|
-
- 0
|
|
220
|
-
hash: 3407414068195492297
|
|
221
323
|
requirements: []
|
|
222
324
|
rubyforge_project: draper
|
|
223
|
-
rubygems_version: 1.8.
|
|
325
|
+
rubygems_version: 1.8.23
|
|
224
326
|
signing_key:
|
|
225
327
|
specification_version: 3
|
|
226
|
-
summary:
|
|
328
|
+
summary: View Models for Rails
|
|
227
329
|
test_files:
|
|
228
|
-
- spec/draper/
|
|
229
|
-
- spec/draper/
|
|
230
|
-
- spec/draper/
|
|
330
|
+
- spec/draper/collection_decorator_spec.rb
|
|
331
|
+
- spec/draper/decoratable_spec.rb
|
|
332
|
+
- spec/draper/decorated_association_spec.rb
|
|
333
|
+
- spec/draper/decorator_spec.rb
|
|
334
|
+
- spec/draper/finders_spec.rb
|
|
335
|
+
- spec/draper/helper_proxy_spec.rb
|
|
336
|
+
- spec/draper/view_helpers_spec.rb
|
|
337
|
+
- spec/dummy/.rspec
|
|
338
|
+
- spec/dummy/README.rdoc
|
|
339
|
+
- spec/dummy/Rakefile
|
|
340
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
341
|
+
- spec/dummy/app/controllers/localized_urls.rb
|
|
342
|
+
- spec/dummy/app/controllers/posts_controller.rb
|
|
343
|
+
- spec/dummy/app/decorators/post_decorator.rb
|
|
344
|
+
- spec/dummy/app/helpers/application_helper.rb
|
|
345
|
+
- spec/dummy/app/mailers/application_mailer.rb
|
|
346
|
+
- spec/dummy/app/mailers/post_mailer.rb
|
|
347
|
+
- spec/dummy/app/models/post.rb
|
|
348
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
349
|
+
- spec/dummy/app/views/post_mailer/decorated_email.html.erb
|
|
350
|
+
- spec/dummy/app/views/posts/_post.html.erb
|
|
351
|
+
- spec/dummy/app/views/posts/show.html.erb
|
|
352
|
+
- spec/dummy/config.ru
|
|
353
|
+
- spec/dummy/config/application.rb
|
|
354
|
+
- spec/dummy/config/boot.rb
|
|
355
|
+
- spec/dummy/config/database.yml
|
|
356
|
+
- spec/dummy/config/environment.rb
|
|
357
|
+
- spec/dummy/config/environments/development.rb
|
|
358
|
+
- spec/dummy/config/environments/production.rb
|
|
359
|
+
- spec/dummy/config/environments/test.rb
|
|
360
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
361
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
362
|
+
- spec/dummy/config/initializers/mime_types.rb
|
|
363
|
+
- spec/dummy/config/initializers/secret_token.rb
|
|
364
|
+
- spec/dummy/config/initializers/session_store.rb
|
|
365
|
+
- spec/dummy/config/locales/en.yml
|
|
366
|
+
- spec/dummy/config/routes.rb
|
|
367
|
+
- spec/dummy/db/migrate/20121019115657_create_posts.rb
|
|
368
|
+
- spec/dummy/db/schema.rb
|
|
369
|
+
- spec/dummy/db/seeds.rb
|
|
370
|
+
- spec/dummy/lib/tasks/test.rake
|
|
371
|
+
- spec/dummy/log/.gitkeep
|
|
372
|
+
- spec/dummy/mini_test/mini_test_integration_test.rb
|
|
373
|
+
- spec/dummy/public/404.html
|
|
374
|
+
- spec/dummy/public/422.html
|
|
375
|
+
- spec/dummy/public/500.html
|
|
376
|
+
- spec/dummy/public/favicon.ico
|
|
377
|
+
- spec/dummy/script/rails
|
|
378
|
+
- spec/dummy/spec/decorators/post_decorator_spec.rb
|
|
379
|
+
- spec/dummy/spec/decorators/rspec_integration_spec.rb
|
|
380
|
+
- spec/dummy/spec/mailers/post_mailer_spec.rb
|
|
381
|
+
- spec/dummy/spec/models/post_spec.rb
|
|
382
|
+
- spec/dummy/spec/spec_helper.rb
|
|
231
383
|
- spec/generators/decorator/decorator_generator_spec.rb
|
|
232
|
-
- spec/
|
|
384
|
+
- spec/integration/integration_spec.rb
|
|
385
|
+
- spec/performance/active_record.rb
|
|
386
|
+
- spec/performance/benchmark.rb
|
|
387
|
+
- spec/performance/decorators.rb
|
|
388
|
+
- spec/performance/models.rb
|
|
233
389
|
- spec/spec_helper.rb
|
|
234
|
-
- spec/support/
|
|
235
|
-
- spec/support/
|
|
236
|
-
- spec/support/
|
|
237
|
-
- spec/support/
|
|
238
|
-
- spec/support/
|
|
239
|
-
- spec/support/
|
|
240
|
-
- spec/support/
|
|
241
|
-
- spec/support/
|
|
242
|
-
- spec/support/
|
|
243
|
-
- spec/support/
|
|
244
|
-
- spec/support/
|
|
245
|
-
- spec/support/
|
|
246
|
-
- spec/support/
|
|
247
|
-
- spec/support/
|
|
248
|
-
- spec/support/
|
|
249
|
-
- spec/support/
|
|
250
|
-
- spec/support/
|
|
251
|
-
- spec/support/
|
|
252
|
-
- spec/support/
|
|
253
|
-
- spec/support/samples/widget.rb
|
|
254
|
-
- spec/support/samples/widget_decorator.rb
|
|
390
|
+
- spec/support/action_controller.rb
|
|
391
|
+
- spec/support/active_model.rb
|
|
392
|
+
- spec/support/active_record.rb
|
|
393
|
+
- spec/support/decorators/decorator_with_application_helper.rb
|
|
394
|
+
- spec/support/decorators/namespaced_product_decorator.rb
|
|
395
|
+
- spec/support/decorators/non_active_model_product_decorator.rb
|
|
396
|
+
- spec/support/decorators/product_decorator.rb
|
|
397
|
+
- spec/support/decorators/products_decorator.rb
|
|
398
|
+
- spec/support/decorators/some_thing_decorator.rb
|
|
399
|
+
- spec/support/decorators/specific_product_decorator.rb
|
|
400
|
+
- spec/support/decorators/widget_decorator.rb
|
|
401
|
+
- spec/support/dummy_app.rb
|
|
402
|
+
- spec/support/matchers/have_text.rb
|
|
403
|
+
- spec/support/models/namespaced_product.rb
|
|
404
|
+
- spec/support/models/non_active_model_product.rb
|
|
405
|
+
- spec/support/models/product.rb
|
|
406
|
+
- spec/support/models/some_thing.rb
|
|
407
|
+
- spec/support/models/uninferrable_decorator_model.rb
|
|
408
|
+
- spec/support/models/widget.rb
|
|
255
409
|
has_rdoc:
|
data/CHANGELOG.markdown
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Draper Changelog
|
|
2
|
-
|
|
3
|
-
## 0.17.0
|
|
4
|
-
|
|
5
|
-
* [Fix earlier fix of `view_context` priming](https://github.com/jcasimir/draper/commit/5da44336)
|
|
6
|
-
* [Add `denies_all`](https://github.com/jcasimir/draper/commit/148e732)
|
|
7
|
-
* [Properly proxy associations with regard to `find`](https://github.com/jcasimir/draper/commit/d46d19205e)
|
|
8
|
-
|
|
9
|
-
## 0.16.0
|
|
10
|
-
|
|
11
|
-
* [Automatically prime `view_context`](https://github.com/jcasimir/draper/commit/057ab4e8)
|
|
12
|
-
* [Fixed bug where rspec eq matchers didn't work]((https://github.com/jcasimir/draper/commit/57617b)
|
|
13
|
-
* [Sequel ORM support](https://github.com/jcasimir/draper/commit/7d4942)
|
|
14
|
-
* Fixed issues with newer minitest
|
|
15
|
-
* [Changed the way the `view_context` gets set](https://github.com/jcasimir/draper/commit/0b03d9c)
|
|
16
|
-
|
|
17
|
-
## 0.15.0
|
|
18
|
-
|
|
19
|
-
* Proper minitest integration
|
|
20
|
-
* [We can properly decorate scoped associations](https://github.com/jcasimir/draper/issues/223)
|
|
21
|
-
* [Fixed awkward eager loading](https://github.com/jcasimir/draper/commit/7dc3510b)
|
|
22
|
-
|
|
23
|
-
## 0.14.0
|
|
24
|
-
|
|
25
|
-
* [Properly prime the view context in Rails Console](https://github.com/jcasimir/draper/commit/738074f)
|
|
26
|
-
* Make more gems development requirements only
|
|
27
|
-
|
|
28
|
-
## 0.13.0
|
|
29
|
-
|
|
30
|
-
* Upgraded all dependencies
|
|
31
|
-
* Dropped support for Rubies < 1.9.3
|
|
32
|
-
* `#to_model` has been renamed to `#wrapped_object`
|
|
33
|
-
* Allow proper overriding of special `ActiveModel` methods
|
|
34
|
-
|
|
35
|
-
## 0.12.3
|
|
36
|
-
|
|
37
|
-
* [Fix i18n issue](https://github.com/jcasimir/draper/issues/202)
|
|
38
|
-
|
|
39
|
-
## 0.12.2
|
|
40
|
-
|
|
41
|
-
* Fix bug with initializing ammeter
|
|
42
|
-
* Some gems are now development only in the gemspec
|
|
43
|
-
* Fix bug where generated models were still inheriting from `ApplicationDecorator`
|
|
44
|
-
|
|
45
|
-
## 0.12.0
|
|
46
|
-
|
|
47
|
-
* Added Changelog
|
|
48
|
-
* [Prevented double decoration](https://github.com/jcasimir/draper/issues/173)
|
|
49
|
-
* [`ActiveModel::Errors` support](https://github.com/jcasimir/draper/commit/19496f0c)
|
|
50
|
-
* [Fixed autoloading issue](https://github.com/jcasimir/draper/issues/188)
|
|
51
|
-
* [Re-did generators](https://github.com/jcasimir/draper/commit/9155e58f)
|
|
52
|
-
* [Added capybara integration](https://github.com/jcasimir/draper/commit/57c8678e)
|
|
53
|
-
* Fixed a few bugs with the `DecoratedEnumerableProxy`
|
|
54
|
-
|
|
55
|
-
## 0.11.1
|
|
56
|
-
|
|
57
|
-
* [Fixed regression, we don't want to introduce a hard dependency on Rails](https://github.com/jcasimir/draper/issues/107)
|