drape 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +27 -0
  3. data/.gitignore +18 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +1159 -0
  6. data/.travis.yml +14 -0
  7. data/.yardopts +1 -0
  8. data/CHANGELOG.md +230 -0
  9. data/CONTRIBUTING.md +20 -0
  10. data/Gemfile +16 -0
  11. data/Guardfile +26 -0
  12. data/LICENSE +7 -0
  13. data/README.md +592 -0
  14. data/Rakefile +76 -0
  15. data/drape.gemspec +31 -0
  16. data/gemfiles/5.0.gemfile +8 -0
  17. data/lib/drape.rb +63 -0
  18. data/lib/drape/automatic_delegation.rb +55 -0
  19. data/lib/drape/collection_decorator.rb +102 -0
  20. data/lib/drape/decoratable.rb +93 -0
  21. data/lib/drape/decoratable/equality.rb +26 -0
  22. data/lib/drape/decorated_association.rb +33 -0
  23. data/lib/drape/decorates_assigned.rb +44 -0
  24. data/lib/drape/decorator.rb +282 -0
  25. data/lib/drape/delegation.rb +13 -0
  26. data/lib/drape/factory.rb +91 -0
  27. data/lib/drape/finders.rb +36 -0
  28. data/lib/drape/helper_proxy.rb +43 -0
  29. data/lib/drape/helper_support.rb +5 -0
  30. data/lib/drape/lazy_helpers.rb +13 -0
  31. data/lib/drape/railtie.rb +69 -0
  32. data/lib/drape/tasks/test.rake +9 -0
  33. data/lib/drape/test/devise_helper.rb +30 -0
  34. data/lib/drape/test/minitest_integration.rb +6 -0
  35. data/lib/drape/test/rspec_integration.rb +20 -0
  36. data/lib/drape/test_case.rb +42 -0
  37. data/lib/drape/undecorate.rb +9 -0
  38. data/lib/drape/version.rb +3 -0
  39. data/lib/drape/view_context.rb +104 -0
  40. data/lib/drape/view_context/build_strategy.rb +46 -0
  41. data/lib/drape/view_helpers.rb +34 -0
  42. data/lib/generators/controller_override.rb +17 -0
  43. data/lib/generators/mini_test/decorator_generator.rb +20 -0
  44. data/lib/generators/mini_test/templates/decorator_spec.rb +4 -0
  45. data/lib/generators/mini_test/templates/decorator_test.rb +4 -0
  46. data/lib/generators/rails/decorator_generator.rb +36 -0
  47. data/lib/generators/rails/templates/decorator.rb +19 -0
  48. data/lib/generators/rspec/decorator_generator.rb +9 -0
  49. data/lib/generators/rspec/templates/decorator_spec.rb +4 -0
  50. data/lib/generators/test_unit/decorator_generator.rb +9 -0
  51. data/lib/generators/test_unit/templates/decorator_test.rb +4 -0
  52. data/spec/draper/collection_decorator_spec.rb +305 -0
  53. data/spec/draper/decoratable/equality_spec.rb +10 -0
  54. data/spec/draper/decoratable_spec.rb +203 -0
  55. data/spec/draper/decorated_association_spec.rb +85 -0
  56. data/spec/draper/decorates_assigned_spec.rb +70 -0
  57. data/spec/draper/decorator_spec.rb +828 -0
  58. data/spec/draper/factory_spec.rb +250 -0
  59. data/spec/draper/finders_spec.rb +165 -0
  60. data/spec/draper/helper_proxy_spec.rb +61 -0
  61. data/spec/draper/lazy_helpers_spec.rb +21 -0
  62. data/spec/draper/undecorate_spec.rb +19 -0
  63. data/spec/draper/view_context/build_strategy_spec.rb +116 -0
  64. data/spec/draper/view_context_spec.rb +160 -0
  65. data/spec/draper/view_helpers_spec.rb +8 -0
  66. data/spec/dummy/.gitignore +21 -0
  67. data/spec/dummy/Rakefile +6 -0
  68. data/spec/dummy/app/assets/config/manifest.js +3 -0
  69. data/spec/dummy/app/assets/images/.keep +0 -0
  70. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  71. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  72. data/spec/dummy/app/assets/javascripts/channels/.keep +0 -0
  73. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  74. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  75. data/spec/dummy/app/channels/application_cable/connection.rb +5 -0
  76. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  77. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  78. data/spec/dummy/app/controllers/posts_controller.rb +21 -0
  79. data/spec/dummy/app/decorators/mongoid_post_decorator.rb +4 -0
  80. data/spec/dummy/app/decorators/post_decorator.rb +59 -0
  81. data/spec/dummy/app/helpers/application_helper.rb +5 -0
  82. data/spec/dummy/app/jobs/application_job.rb +2 -0
  83. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  84. data/spec/dummy/app/mailers/post_mailer.rb +18 -0
  85. data/spec/dummy/app/models/admin.rb +5 -0
  86. data/spec/dummy/app/models/application_record.rb +3 -0
  87. data/spec/dummy/app/models/concerns/.keep +0 -0
  88. data/spec/dummy/app/models/mongoid_post.rb +5 -0
  89. data/spec/dummy/app/models/post.rb +3 -0
  90. data/spec/dummy/app/models/user.rb +5 -0
  91. data/spec/dummy/app/views/layouts/application.html.erb +9 -0
  92. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  93. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  94. data/spec/dummy/app/views/post_mailer/decorated_email.html.erb +31 -0
  95. data/spec/dummy/app/views/posts/_post.html.erb +40 -0
  96. data/spec/dummy/app/views/posts/show.html.erb +1 -0
  97. data/spec/dummy/bin/bundle +3 -0
  98. data/spec/dummy/bin/rails +9 -0
  99. data/spec/dummy/bin/rake +9 -0
  100. data/spec/dummy/bin/setup +34 -0
  101. data/spec/dummy/bin/spring +15 -0
  102. data/spec/dummy/bin/update +29 -0
  103. data/spec/dummy/config.ru +5 -0
  104. data/spec/dummy/config/application.rb +21 -0
  105. data/spec/dummy/config/boot.rb +2 -0
  106. data/spec/dummy/config/cable.yml +10 -0
  107. data/spec/dummy/config/database.yml +25 -0
  108. data/spec/dummy/config/environment.rb +5 -0
  109. data/spec/dummy/config/environments/development.rb +51 -0
  110. data/spec/dummy/config/environments/production.rb +91 -0
  111. data/spec/dummy/config/environments/test.rb +42 -0
  112. data/spec/dummy/config/initializers/active_record_belongs_to_required_by_default.rb +6 -0
  113. data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
  114. data/spec/dummy/config/initializers/assets.rb +11 -0
  115. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  116. data/spec/dummy/config/initializers/callback_terminator.rb +6 -0
  117. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  118. data/spec/dummy/config/initializers/devise.rb +3 -0
  119. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  120. data/spec/dummy/config/initializers/inflections.rb +16 -0
  121. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  122. data/spec/dummy/config/initializers/per_form_csrf_tokens.rb +4 -0
  123. data/spec/dummy/config/initializers/request_forgery_protection.rb +4 -0
  124. data/spec/dummy/config/initializers/session_store.rb +3 -0
  125. data/spec/dummy/config/initializers/ssl_options.rb +4 -0
  126. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  127. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  128. data/spec/dummy/config/locales/en.yml +23 -0
  129. data/spec/dummy/config/mongoid.yml +16 -0
  130. data/spec/dummy/config/puma.rb +47 -0
  131. data/spec/dummy/config/routes.rb +8 -0
  132. data/spec/dummy/config/secrets.yml +22 -0
  133. data/spec/dummy/config/spring.rb +6 -0
  134. data/spec/dummy/db/migrate/20121019115657_create_posts.rb +7 -0
  135. data/spec/dummy/db/schema.rb +19 -0
  136. data/spec/dummy/db/seeds.rb +2 -0
  137. data/spec/dummy/lib/assets/.keep +0 -0
  138. data/spec/dummy/lib/tasks/.keep +0 -0
  139. data/spec/dummy/lib/tasks/test.rake +16 -0
  140. data/spec/dummy/log/.keep +0 -0
  141. data/spec/dummy/public/404.html +67 -0
  142. data/spec/dummy/public/422.html +67 -0
  143. data/spec/dummy/public/500.html +66 -0
  144. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  145. data/spec/dummy/public/apple-touch-icon.png +0 -0
  146. data/spec/dummy/public/favicon.ico +0 -0
  147. data/spec/dummy/public/robots.txt +5 -0
  148. data/spec/dummy/spec/decorators/active_model_serializers_spec.rb +12 -0
  149. data/spec/dummy/spec/decorators/devise_spec.rb +64 -0
  150. data/spec/dummy/spec/decorators/helpers_spec.rb +21 -0
  151. data/spec/dummy/spec/decorators/post_decorator_spec.rb +66 -0
  152. data/spec/dummy/spec/decorators/spec_type_spec.rb +7 -0
  153. data/spec/dummy/spec/decorators/view_context_spec.rb +22 -0
  154. data/spec/dummy/spec/mailers/post_mailer_spec.rb +33 -0
  155. data/spec/dummy/spec/models/mongoid_post_spec.rb +8 -0
  156. data/spec/dummy/spec/models/post_spec.rb +6 -0
  157. data/spec/dummy/spec/shared_examples/decoratable.rb +26 -0
  158. data/spec/dummy/spec/spec_helper.rb +8 -0
  159. data/spec/dummy/test/controllers/.keep +0 -0
  160. data/spec/dummy/test/fixtures/.keep +0 -0
  161. data/spec/dummy/test/fixtures/files/.keep +0 -0
  162. data/spec/dummy/test/helpers/.keep +0 -0
  163. data/spec/dummy/test/integration/.keep +0 -0
  164. data/spec/dummy/test/mailers/.keep +0 -0
  165. data/spec/dummy/test/models/.keep +0 -0
  166. data/spec/dummy/test/test_helper.rb +10 -0
  167. data/spec/dummy/vendor/assets/javascripts/.keep +0 -0
  168. data/spec/dummy/vendor/assets/stylesheets/.keep +0 -0
  169. data/spec/generators/controller/controller_generator_spec.rb +24 -0
  170. data/spec/generators/decorator/decorator_generator_spec.rb +94 -0
  171. data/spec/integration/integration_spec.rb +68 -0
  172. data/spec/performance/active_record.rb +4 -0
  173. data/spec/performance/benchmark.rb +57 -0
  174. data/spec/performance/decorators.rb +41 -0
  175. data/spec/performance/models.rb +20 -0
  176. data/spec/spec_helper.rb +41 -0
  177. data/spec/support/dummy_app.rb +88 -0
  178. data/spec/support/matchers/have_text.rb +50 -0
  179. data/spec/support/shared_examples/decoratable_equality.rb +40 -0
  180. data/spec/support/shared_examples/view_helpers.rb +39 -0
  181. metadata +497 -0
@@ -0,0 +1,50 @@
1
+ require 'capybara'
2
+
3
+ module HaveTextMatcher
4
+ def have_text(text)
5
+ HaveText.new(text)
6
+ end
7
+
8
+ class HaveText
9
+ def initialize(text)
10
+ @text = text
11
+ end
12
+
13
+ def in(css)
14
+ @css = css
15
+ self
16
+ end
17
+
18
+ def matches?(subject)
19
+ @subject = Capybara.string(subject)
20
+
21
+ @subject.has_css?(@css || '*', text: @text)
22
+ end
23
+
24
+ def failure_message
25
+ "expected to find #{@text.inspect} #{within}"
26
+ end
27
+
28
+ def failure_message_when_negated
29
+ "expected not to find #{@text.inspect} #{within}"
30
+ end
31
+
32
+ private
33
+
34
+ def within
35
+ if @css && @subject.has_css?(@css)
36
+ "within\n#{@subject.find(@css).native}"
37
+ else
38
+ "#{inside} within\n#{@subject.native}"
39
+ end
40
+ end
41
+
42
+ def inside
43
+ @css ? "inside #{@css.inspect}" : 'anywhere'
44
+ end
45
+ end
46
+ end
47
+
48
+ RSpec.configure do |config|
49
+ config.include HaveTextMatcher
50
+ end
@@ -0,0 +1,40 @@
1
+ shared_examples_for 'decoration-aware #==' do |subject|
2
+ it 'is true for itself' do
3
+ expect(subject == subject).to be_truthy
4
+ end
5
+
6
+ it 'is false for another object' do
7
+ expect(subject == Object.new).to be_falsey
8
+ end
9
+
10
+ it 'is true for a decorated version of itself' do
11
+ decorated = double(object: subject, decorated?: true)
12
+
13
+ expect(subject == decorated).to be_truthy
14
+ end
15
+
16
+ it 'is false for a decorated other object' do
17
+ decorated = double(object: Object.new, decorated?: true)
18
+
19
+ expect(subject == decorated).to be_falsey
20
+ end
21
+
22
+ it 'is false for a decoratable object with a `object` association' do
23
+ decoratable = double(object: subject, decorated?: false)
24
+
25
+ expect(subject == decoratable).to be_falsey
26
+ end
27
+
28
+ it 'is false for an undecoratable object with a `object` association' do
29
+ undecoratable = double(object: subject)
30
+
31
+ expect(subject == undecoratable).to be_falsey
32
+ end
33
+
34
+ it 'is true for a multiply-decorated version of itself' do
35
+ decorated = double(object: subject, decorated?: true)
36
+ redecorated = double(object: decorated, decorated?: true)
37
+
38
+ expect(subject == redecorated).to be_truthy
39
+ end
40
+ end
@@ -0,0 +1,39 @@
1
+ shared_examples_for 'view helpers' do |subject|
2
+ describe '#helpers' do
3
+ it 'returns the current view context' do
4
+ Drape::ViewContext.stub current: :current_view_context
5
+ expect(subject.helpers).to be :current_view_context
6
+ end
7
+
8
+ it 'is aliased to #h' do
9
+ Drape::ViewContext.stub current: :current_view_context
10
+ expect(subject.h).to be :current_view_context
11
+ end
12
+ end
13
+
14
+ describe '#localize' do
15
+ it 'delegates to #helpers' do
16
+ subject.stub helpers: double
17
+ subject.helpers.should_receive(:localize).with(:an_object, some: 'parameter')
18
+ subject.localize(:an_object, some: 'parameter')
19
+ end
20
+
21
+ it 'is aliased to #l' do
22
+ subject.stub helpers: double
23
+ subject.helpers.should_receive(:localize).with(:an_object, some: 'parameter')
24
+ subject.l(:an_object, some: 'parameter')
25
+ end
26
+ end
27
+
28
+ describe '.helpers' do
29
+ it 'returns the current view context' do
30
+ Drape::ViewContext.stub current: :current_view_context
31
+ expect(subject.class.helpers).to be :current_view_context
32
+ end
33
+
34
+ it 'is aliased to .h' do
35
+ Drape::ViewContext.stub current: :current_view_context
36
+ expect(subject.class.h).to be :current_view_context
37
+ end
38
+ end
39
+ end
metadata ADDED
@@ -0,0 +1,497 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: drape
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Emelianenko
8
+ - Jeff Casimir
9
+ - Steve Klabnik
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2016-05-29 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 5.0.0.beta1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 5.0.0.beta1
29
+ - !ruby/object:Gem::Dependency
30
+ name: actionpack
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 5.0.0.beta1
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 5.0.0.beta1
43
+ - !ruby/object:Gem::Dependency
44
+ name: request_store
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '1.0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: activemodel
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 5.0.0.beta1
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 5.0.0.beta1
71
+ - !ruby/object:Gem::Dependency
72
+ name: activemodel-serializers-xml
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '1.0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '1.0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: rake
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.9.2
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 0.9.2
99
+ - !ruby/object:Gem::Dependency
100
+ name: rspec-rails
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 3.5.0.beta1
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 3.5.0.beta1
113
+ - !ruby/object:Gem::Dependency
114
+ name: minitest-rails
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 2.2.0
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 2.2.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: capybara
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ - !ruby/object:Gem::Dependency
142
+ name: active_model_serializers
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ description: Drape adds an object-oriented layer of presentation logic to your Rails
156
+ apps.
157
+ email:
158
+ - andrew@soften-it.com
159
+ - jeff@casimircreative.com
160
+ - steve@steveklabnik.com
161
+ executables: []
162
+ extensions: []
163
+ extra_rdoc_files: []
164
+ files:
165
+ - ".codeclimate.yml"
166
+ - ".gitignore"
167
+ - ".rspec"
168
+ - ".rubocop.yml"
169
+ - ".travis.yml"
170
+ - ".yardopts"
171
+ - CHANGELOG.md
172
+ - CONTRIBUTING.md
173
+ - Gemfile
174
+ - Guardfile
175
+ - LICENSE
176
+ - README.md
177
+ - Rakefile
178
+ - drape.gemspec
179
+ - gemfiles/5.0.gemfile
180
+ - lib/drape.rb
181
+ - lib/drape/automatic_delegation.rb
182
+ - lib/drape/collection_decorator.rb
183
+ - lib/drape/decoratable.rb
184
+ - lib/drape/decoratable/equality.rb
185
+ - lib/drape/decorated_association.rb
186
+ - lib/drape/decorates_assigned.rb
187
+ - lib/drape/decorator.rb
188
+ - lib/drape/delegation.rb
189
+ - lib/drape/factory.rb
190
+ - lib/drape/finders.rb
191
+ - lib/drape/helper_proxy.rb
192
+ - lib/drape/helper_support.rb
193
+ - lib/drape/lazy_helpers.rb
194
+ - lib/drape/railtie.rb
195
+ - lib/drape/tasks/test.rake
196
+ - lib/drape/test/devise_helper.rb
197
+ - lib/drape/test/minitest_integration.rb
198
+ - lib/drape/test/rspec_integration.rb
199
+ - lib/drape/test_case.rb
200
+ - lib/drape/undecorate.rb
201
+ - lib/drape/version.rb
202
+ - lib/drape/view_context.rb
203
+ - lib/drape/view_context/build_strategy.rb
204
+ - lib/drape/view_helpers.rb
205
+ - lib/generators/controller_override.rb
206
+ - lib/generators/mini_test/decorator_generator.rb
207
+ - lib/generators/mini_test/templates/decorator_spec.rb
208
+ - lib/generators/mini_test/templates/decorator_test.rb
209
+ - lib/generators/rails/decorator_generator.rb
210
+ - lib/generators/rails/templates/decorator.rb
211
+ - lib/generators/rspec/decorator_generator.rb
212
+ - lib/generators/rspec/templates/decorator_spec.rb
213
+ - lib/generators/test_unit/decorator_generator.rb
214
+ - lib/generators/test_unit/templates/decorator_test.rb
215
+ - spec/draper/collection_decorator_spec.rb
216
+ - spec/draper/decoratable/equality_spec.rb
217
+ - spec/draper/decoratable_spec.rb
218
+ - spec/draper/decorated_association_spec.rb
219
+ - spec/draper/decorates_assigned_spec.rb
220
+ - spec/draper/decorator_spec.rb
221
+ - spec/draper/factory_spec.rb
222
+ - spec/draper/finders_spec.rb
223
+ - spec/draper/helper_proxy_spec.rb
224
+ - spec/draper/lazy_helpers_spec.rb
225
+ - spec/draper/undecorate_spec.rb
226
+ - spec/draper/view_context/build_strategy_spec.rb
227
+ - spec/draper/view_context_spec.rb
228
+ - spec/draper/view_helpers_spec.rb
229
+ - spec/dummy/.gitignore
230
+ - spec/dummy/Rakefile
231
+ - spec/dummy/app/assets/config/manifest.js
232
+ - spec/dummy/app/assets/images/.keep
233
+ - spec/dummy/app/assets/javascripts/application.js
234
+ - spec/dummy/app/assets/javascripts/cable.js
235
+ - spec/dummy/app/assets/javascripts/channels/.keep
236
+ - spec/dummy/app/assets/stylesheets/application.css
237
+ - spec/dummy/app/channels/application_cable/channel.rb
238
+ - spec/dummy/app/channels/application_cable/connection.rb
239
+ - spec/dummy/app/controllers/application_controller.rb
240
+ - spec/dummy/app/controllers/concerns/.keep
241
+ - spec/dummy/app/controllers/posts_controller.rb
242
+ - spec/dummy/app/decorators/mongoid_post_decorator.rb
243
+ - spec/dummy/app/decorators/post_decorator.rb
244
+ - spec/dummy/app/helpers/application_helper.rb
245
+ - spec/dummy/app/jobs/application_job.rb
246
+ - spec/dummy/app/mailers/application_mailer.rb
247
+ - spec/dummy/app/mailers/post_mailer.rb
248
+ - spec/dummy/app/models/admin.rb
249
+ - spec/dummy/app/models/application_record.rb
250
+ - spec/dummy/app/models/concerns/.keep
251
+ - spec/dummy/app/models/mongoid_post.rb
252
+ - spec/dummy/app/models/post.rb
253
+ - spec/dummy/app/models/user.rb
254
+ - spec/dummy/app/views/layouts/application.html.erb
255
+ - spec/dummy/app/views/layouts/mailer.html.erb
256
+ - spec/dummy/app/views/layouts/mailer.text.erb
257
+ - spec/dummy/app/views/post_mailer/decorated_email.html.erb
258
+ - spec/dummy/app/views/posts/_post.html.erb
259
+ - spec/dummy/app/views/posts/show.html.erb
260
+ - spec/dummy/bin/bundle
261
+ - spec/dummy/bin/rails
262
+ - spec/dummy/bin/rake
263
+ - spec/dummy/bin/setup
264
+ - spec/dummy/bin/spring
265
+ - spec/dummy/bin/update
266
+ - spec/dummy/config.ru
267
+ - spec/dummy/config/application.rb
268
+ - spec/dummy/config/boot.rb
269
+ - spec/dummy/config/cable.yml
270
+ - spec/dummy/config/database.yml
271
+ - spec/dummy/config/environment.rb
272
+ - spec/dummy/config/environments/development.rb
273
+ - spec/dummy/config/environments/production.rb
274
+ - spec/dummy/config/environments/test.rb
275
+ - spec/dummy/config/initializers/active_record_belongs_to_required_by_default.rb
276
+ - spec/dummy/config/initializers/application_controller_renderer.rb
277
+ - spec/dummy/config/initializers/assets.rb
278
+ - spec/dummy/config/initializers/backtrace_silencers.rb
279
+ - spec/dummy/config/initializers/callback_terminator.rb
280
+ - spec/dummy/config/initializers/cookies_serializer.rb
281
+ - spec/dummy/config/initializers/devise.rb
282
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
283
+ - spec/dummy/config/initializers/inflections.rb
284
+ - spec/dummy/config/initializers/mime_types.rb
285
+ - spec/dummy/config/initializers/per_form_csrf_tokens.rb
286
+ - spec/dummy/config/initializers/request_forgery_protection.rb
287
+ - spec/dummy/config/initializers/session_store.rb
288
+ - spec/dummy/config/initializers/ssl_options.rb
289
+ - spec/dummy/config/initializers/to_time_preserves_timezone.rb
290
+ - spec/dummy/config/initializers/wrap_parameters.rb
291
+ - spec/dummy/config/locales/en.yml
292
+ - spec/dummy/config/mongoid.yml
293
+ - spec/dummy/config/puma.rb
294
+ - spec/dummy/config/routes.rb
295
+ - spec/dummy/config/secrets.yml
296
+ - spec/dummy/config/spring.rb
297
+ - spec/dummy/db/migrate/20121019115657_create_posts.rb
298
+ - spec/dummy/db/schema.rb
299
+ - spec/dummy/db/seeds.rb
300
+ - spec/dummy/lib/assets/.keep
301
+ - spec/dummy/lib/tasks/.keep
302
+ - spec/dummy/lib/tasks/test.rake
303
+ - spec/dummy/log/.keep
304
+ - spec/dummy/public/404.html
305
+ - spec/dummy/public/422.html
306
+ - spec/dummy/public/500.html
307
+ - spec/dummy/public/apple-touch-icon-precomposed.png
308
+ - spec/dummy/public/apple-touch-icon.png
309
+ - spec/dummy/public/favicon.ico
310
+ - spec/dummy/public/robots.txt
311
+ - spec/dummy/spec/decorators/active_model_serializers_spec.rb
312
+ - spec/dummy/spec/decorators/devise_spec.rb
313
+ - spec/dummy/spec/decorators/helpers_spec.rb
314
+ - spec/dummy/spec/decorators/post_decorator_spec.rb
315
+ - spec/dummy/spec/decorators/spec_type_spec.rb
316
+ - spec/dummy/spec/decorators/view_context_spec.rb
317
+ - spec/dummy/spec/mailers/post_mailer_spec.rb
318
+ - spec/dummy/spec/models/mongoid_post_spec.rb
319
+ - spec/dummy/spec/models/post_spec.rb
320
+ - spec/dummy/spec/shared_examples/decoratable.rb
321
+ - spec/dummy/spec/spec_helper.rb
322
+ - spec/dummy/test/controllers/.keep
323
+ - spec/dummy/test/fixtures/.keep
324
+ - spec/dummy/test/fixtures/files/.keep
325
+ - spec/dummy/test/helpers/.keep
326
+ - spec/dummy/test/integration/.keep
327
+ - spec/dummy/test/mailers/.keep
328
+ - spec/dummy/test/models/.keep
329
+ - spec/dummy/test/test_helper.rb
330
+ - spec/dummy/vendor/assets/javascripts/.keep
331
+ - spec/dummy/vendor/assets/stylesheets/.keep
332
+ - spec/generators/controller/controller_generator_spec.rb
333
+ - spec/generators/decorator/decorator_generator_spec.rb
334
+ - spec/integration/integration_spec.rb
335
+ - spec/performance/active_record.rb
336
+ - spec/performance/benchmark.rb
337
+ - spec/performance/decorators.rb
338
+ - spec/performance/models.rb
339
+ - spec/spec_helper.rb
340
+ - spec/support/dummy_app.rb
341
+ - spec/support/matchers/have_text.rb
342
+ - spec/support/shared_examples/decoratable_equality.rb
343
+ - spec/support/shared_examples/view_helpers.rb
344
+ homepage: http://github.com/MrEmelianenko/drape
345
+ licenses:
346
+ - MIT
347
+ metadata: {}
348
+ post_install_message:
349
+ rdoc_options: []
350
+ require_paths:
351
+ - lib
352
+ required_ruby_version: !ruby/object:Gem::Requirement
353
+ requirements:
354
+ - - ">="
355
+ - !ruby/object:Gem::Version
356
+ version: '0'
357
+ required_rubygems_version: !ruby/object:Gem::Requirement
358
+ requirements:
359
+ - - ">"
360
+ - !ruby/object:Gem::Version
361
+ version: 1.3.1
362
+ requirements: []
363
+ rubyforge_project:
364
+ rubygems_version: 2.6.3
365
+ signing_key:
366
+ specification_version: 4
367
+ summary: View Models for Rails
368
+ test_files:
369
+ - spec/draper/collection_decorator_spec.rb
370
+ - spec/draper/decoratable/equality_spec.rb
371
+ - spec/draper/decoratable_spec.rb
372
+ - spec/draper/decorated_association_spec.rb
373
+ - spec/draper/decorates_assigned_spec.rb
374
+ - spec/draper/decorator_spec.rb
375
+ - spec/draper/factory_spec.rb
376
+ - spec/draper/finders_spec.rb
377
+ - spec/draper/helper_proxy_spec.rb
378
+ - spec/draper/lazy_helpers_spec.rb
379
+ - spec/draper/undecorate_spec.rb
380
+ - spec/draper/view_context/build_strategy_spec.rb
381
+ - spec/draper/view_context_spec.rb
382
+ - spec/draper/view_helpers_spec.rb
383
+ - spec/dummy/.gitignore
384
+ - spec/dummy/Rakefile
385
+ - spec/dummy/app/assets/config/manifest.js
386
+ - spec/dummy/app/assets/images/.keep
387
+ - spec/dummy/app/assets/javascripts/application.js
388
+ - spec/dummy/app/assets/javascripts/cable.js
389
+ - spec/dummy/app/assets/javascripts/channels/.keep
390
+ - spec/dummy/app/assets/stylesheets/application.css
391
+ - spec/dummy/app/channels/application_cable/channel.rb
392
+ - spec/dummy/app/channels/application_cable/connection.rb
393
+ - spec/dummy/app/controllers/application_controller.rb
394
+ - spec/dummy/app/controllers/concerns/.keep
395
+ - spec/dummy/app/controllers/posts_controller.rb
396
+ - spec/dummy/app/decorators/mongoid_post_decorator.rb
397
+ - spec/dummy/app/decorators/post_decorator.rb
398
+ - spec/dummy/app/helpers/application_helper.rb
399
+ - spec/dummy/app/jobs/application_job.rb
400
+ - spec/dummy/app/mailers/application_mailer.rb
401
+ - spec/dummy/app/mailers/post_mailer.rb
402
+ - spec/dummy/app/models/admin.rb
403
+ - spec/dummy/app/models/application_record.rb
404
+ - spec/dummy/app/models/concerns/.keep
405
+ - spec/dummy/app/models/mongoid_post.rb
406
+ - spec/dummy/app/models/post.rb
407
+ - spec/dummy/app/models/user.rb
408
+ - spec/dummy/app/views/layouts/application.html.erb
409
+ - spec/dummy/app/views/layouts/mailer.html.erb
410
+ - spec/dummy/app/views/layouts/mailer.text.erb
411
+ - spec/dummy/app/views/post_mailer/decorated_email.html.erb
412
+ - spec/dummy/app/views/posts/_post.html.erb
413
+ - spec/dummy/app/views/posts/show.html.erb
414
+ - spec/dummy/bin/bundle
415
+ - spec/dummy/bin/rails
416
+ - spec/dummy/bin/rake
417
+ - spec/dummy/bin/setup
418
+ - spec/dummy/bin/spring
419
+ - spec/dummy/bin/update
420
+ - spec/dummy/config.ru
421
+ - spec/dummy/config/application.rb
422
+ - spec/dummy/config/boot.rb
423
+ - spec/dummy/config/cable.yml
424
+ - spec/dummy/config/database.yml
425
+ - spec/dummy/config/environment.rb
426
+ - spec/dummy/config/environments/development.rb
427
+ - spec/dummy/config/environments/production.rb
428
+ - spec/dummy/config/environments/test.rb
429
+ - spec/dummy/config/initializers/active_record_belongs_to_required_by_default.rb
430
+ - spec/dummy/config/initializers/application_controller_renderer.rb
431
+ - spec/dummy/config/initializers/assets.rb
432
+ - spec/dummy/config/initializers/backtrace_silencers.rb
433
+ - spec/dummy/config/initializers/callback_terminator.rb
434
+ - spec/dummy/config/initializers/cookies_serializer.rb
435
+ - spec/dummy/config/initializers/devise.rb
436
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
437
+ - spec/dummy/config/initializers/inflections.rb
438
+ - spec/dummy/config/initializers/mime_types.rb
439
+ - spec/dummy/config/initializers/per_form_csrf_tokens.rb
440
+ - spec/dummy/config/initializers/request_forgery_protection.rb
441
+ - spec/dummy/config/initializers/session_store.rb
442
+ - spec/dummy/config/initializers/ssl_options.rb
443
+ - spec/dummy/config/initializers/to_time_preserves_timezone.rb
444
+ - spec/dummy/config/initializers/wrap_parameters.rb
445
+ - spec/dummy/config/locales/en.yml
446
+ - spec/dummy/config/mongoid.yml
447
+ - spec/dummy/config/puma.rb
448
+ - spec/dummy/config/routes.rb
449
+ - spec/dummy/config/secrets.yml
450
+ - spec/dummy/config/spring.rb
451
+ - spec/dummy/db/migrate/20121019115657_create_posts.rb
452
+ - spec/dummy/db/schema.rb
453
+ - spec/dummy/db/seeds.rb
454
+ - spec/dummy/lib/assets/.keep
455
+ - spec/dummy/lib/tasks/.keep
456
+ - spec/dummy/lib/tasks/test.rake
457
+ - spec/dummy/log/.keep
458
+ - spec/dummy/public/404.html
459
+ - spec/dummy/public/422.html
460
+ - spec/dummy/public/500.html
461
+ - spec/dummy/public/apple-touch-icon-precomposed.png
462
+ - spec/dummy/public/apple-touch-icon.png
463
+ - spec/dummy/public/favicon.ico
464
+ - spec/dummy/public/robots.txt
465
+ - spec/dummy/spec/decorators/active_model_serializers_spec.rb
466
+ - spec/dummy/spec/decorators/devise_spec.rb
467
+ - spec/dummy/spec/decorators/helpers_spec.rb
468
+ - spec/dummy/spec/decorators/post_decorator_spec.rb
469
+ - spec/dummy/spec/decorators/spec_type_spec.rb
470
+ - spec/dummy/spec/decorators/view_context_spec.rb
471
+ - spec/dummy/spec/mailers/post_mailer_spec.rb
472
+ - spec/dummy/spec/models/mongoid_post_spec.rb
473
+ - spec/dummy/spec/models/post_spec.rb
474
+ - spec/dummy/spec/shared_examples/decoratable.rb
475
+ - spec/dummy/spec/spec_helper.rb
476
+ - spec/dummy/test/controllers/.keep
477
+ - spec/dummy/test/fixtures/.keep
478
+ - spec/dummy/test/fixtures/files/.keep
479
+ - spec/dummy/test/helpers/.keep
480
+ - spec/dummy/test/integration/.keep
481
+ - spec/dummy/test/mailers/.keep
482
+ - spec/dummy/test/models/.keep
483
+ - spec/dummy/test/test_helper.rb
484
+ - spec/dummy/vendor/assets/javascripts/.keep
485
+ - spec/dummy/vendor/assets/stylesheets/.keep
486
+ - spec/generators/controller/controller_generator_spec.rb
487
+ - spec/generators/decorator/decorator_generator_spec.rb
488
+ - spec/integration/integration_spec.rb
489
+ - spec/performance/active_record.rb
490
+ - spec/performance/benchmark.rb
491
+ - spec/performance/decorators.rb
492
+ - spec/performance/models.rb
493
+ - spec/spec_helper.rb
494
+ - spec/support/dummy_app.rb
495
+ - spec/support/matchers/have_text.rb
496
+ - spec/support/shared_examples/decoratable_equality.rb
497
+ - spec/support/shared_examples/view_helpers.rb