cells 4.0.0.beta4 → 4.0.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +19 -0
- data/Rakefile +11 -0
- data/cells.gemspec +3 -4
- data/gemfiles/rails4.2.gemfile +0 -7
- data/lib/cell.rb +19 -19
- data/lib/cell/abstract.rb +9 -0
- data/lib/cell/caching.rb +16 -17
- data/lib/cell/concept.rb +2 -4
- data/lib/cell/prefixes.rb +3 -2
- data/lib/cell/rails.rb +27 -4
- data/lib/cell/railtie.rb +47 -42
- data/lib/cell/testing.rb +12 -9
- data/lib/cell/twin.rb +2 -2
- data/lib/cell/util.rb +16 -0
- data/lib/cell/version.rb +1 -8
- data/lib/cell/view_model.rb +63 -90
- data/test/builder_test.rb +5 -5
- data/test/caching_test.rb +2 -2
- data/test/cell_test.rb +1 -1
- data/test/concept_test.rb +24 -10
- data/test/dummy/config/application.rb +1 -1
- data/test/public_test.rb +8 -9
- data/test/rails4.2/.gitignore +13 -0
- data/test/rails4.2/Gemfile +16 -0
- data/test/rails4.2/README.rdoc +3 -0
- data/test/rails4.2/Rakefile +6 -0
- data/test/rails4.2/app/assets/images/.keep +0 -0
- data/test/rails4.2/app/assets/stylesheets/application.css +17 -0
- data/test/rails4.2/app/cells/song/song.css +1 -0
- data/test/rails4.2/app/cells/song_cell.rb +2 -0
- data/test/rails4.2/app/controllers/application_controller.rb +5 -0
- data/test/rails4.2/app/controllers/concerns/.keep +0 -0
- data/test/rails4.2/app/controllers/index_controller.rb +7 -0
- data/test/rails4.2/app/helpers/application_helper.rb +2 -0
- data/test/rails4.2/app/mailers/.keep +0 -0
- data/test/rails4.2/app/models/.keep +0 -0
- data/test/rails4.2/app/models/concerns/.keep +0 -0
- data/test/rails4.2/app/views/index/index.html.erb +6 -0
- data/test/rails4.2/app/views/layouts/application.html.erb +13 -0
- data/test/rails4.2/bin/bundle +3 -0
- data/test/rails4.2/bin/rails +4 -0
- data/test/rails4.2/bin/rake +4 -0
- data/test/rails4.2/bin/setup +29 -0
- data/test/rails4.2/config.ru +4 -0
- data/test/rails4.2/config/application.rb +38 -0
- data/test/rails4.2/config/boot.rb +3 -0
- data/test/rails4.2/config/environment.rb +5 -0
- data/test/rails4.2/config/environments/development.rb +25 -0
- data/test/rails4.2/config/environments/production.rb +64 -0
- data/test/rails4.2/config/environments/test.rb +42 -0
- data/test/rails4.2/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails4.2/config/initializers/cookies_serializer.rb +3 -0
- data/test/rails4.2/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/rails4.2/config/initializers/inflections.rb +16 -0
- data/test/rails4.2/config/initializers/mime_types.rb +4 -0
- data/test/rails4.2/config/initializers/session_store.rb +3 -0
- data/test/rails4.2/config/initializers/wrap_parameters.rb +9 -0
- data/test/rails4.2/config/locales/en.yml +23 -0
- data/test/rails4.2/config/routes.rb +4 -0
- data/test/rails4.2/config/secrets.yml +22 -0
- data/test/rails4.2/db/seeds.rb +7 -0
- data/test/rails4.2/engines/my_engine/.gitignore +3 -0
- data/test/rails4.2/engines/my_engine/Gemfile +15 -0
- data/test/rails4.2/engines/my_engine/MIT-LICENSE +20 -0
- data/test/rails4.2/engines/my_engine/README.rdoc +3 -0
- data/test/rails4.2/engines/my_engine/Rakefile +24 -0
- data/test/rails4.2/engines/my_engine/app/assets/images/my_engine/.keep +0 -0
- data/test/rails4.2/engines/my_engine/app/assets/stylesheets/my_engine/application.css +15 -0
- data/test/rails4.2/engines/my_engine/app/concepts/user/cell.rb +8 -0
- data/test/rails4.2/engines/my_engine/app/concepts/user/views/show.erb +1 -0
- data/test/rails4.2/engines/my_engine/app/concepts/user/views/user.scss +3 -0
- data/test/rails4.2/engines/my_engine/app/controllers/my_engine/application_controller.rb +4 -0
- data/test/rails4.2/engines/my_engine/app/controllers/my_engine/user_controller.rb +7 -0
- data/test/rails4.2/engines/my_engine/app/helpers/my_engine/application_helper.rb +4 -0
- data/test/rails4.2/engines/my_engine/app/models/my_engine/user.rb +4 -0
- data/test/rails4.2/engines/my_engine/app/views/layouts/my_engine/application.html.erb +14 -0
- data/test/rails4.2/engines/my_engine/app/views/my_engine/user/show.html.erb +3 -0
- data/test/rails4.2/engines/my_engine/bin/rails +12 -0
- data/test/rails4.2/engines/my_engine/config/routes.rb +3 -0
- data/test/rails4.2/engines/my_engine/db/migrate/20150530135920_create_my_engine_users.rb +8 -0
- data/test/rails4.2/engines/my_engine/lib/my_engine.rb +6 -0
- data/test/rails4.2/engines/my_engine/lib/my_engine/engine.rb +9 -0
- data/test/rails4.2/engines/my_engine/lib/my_engine/version.rb +3 -0
- data/test/rails4.2/engines/my_engine/lib/tasks/my_engine_tasks.rake +4 -0
- data/test/rails4.2/engines/my_engine/my_engine.gemspec +24 -0
- data/test/rails4.2/engines/my_engine/test/fixtures/my_engine/users.yml +11 -0
- data/test/rails4.2/engines/my_engine/test/models/my_engine/user_test.rb +9 -0
- data/test/rails4.2/lib/assets/.keep +0 -0
- data/test/rails4.2/lib/tasks/.keep +0 -0
- data/test/rails4.2/log/.keep +0 -0
- data/test/rails4.2/public/404.html +67 -0
- data/test/rails4.2/public/422.html +67 -0
- data/test/rails4.2/public/500.html +66 -0
- data/test/rails4.2/public/favicon.ico +0 -0
- data/test/rails4.2/public/robots.txt +5 -0
- data/test/rails4.2/test/integration/asset_pipeline_test.rb +17 -0
- data/test/rails4.2/test/test_helper.rb +14 -0
- data/test/rails4.2/vendor/assets/stylesheets/.keep +0 -0
- data/test/twin_test.rb +1 -1
- data/test/url_helper_test.rb +1 -1
- metadata +83 -19
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require "capybara/rails"
|
3
|
+
require "capybara/dsl"
|
4
|
+
|
5
|
+
# This blog post helped so much: http://rakeroutes.com/blog/write-a-gem-for-the-rails-asset-pipeline/
|
6
|
+
# Thanks, Stephen!!! :)
|
7
|
+
|
8
|
+
class AssetPipelineTest < ActionDispatch::IntegrationTest
|
9
|
+
include ::Capybara::DSL
|
10
|
+
|
11
|
+
it do
|
12
|
+
visit "/assets/application.css"
|
13
|
+
|
14
|
+
# both engine User::Cell and SongCell provide assets.
|
15
|
+
page.text.must_equal "user{background:green}.song{background:red}"
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
3
|
+
require 'rails/test_help'
|
4
|
+
|
5
|
+
Rails.backtrace_cleaner.remove_silencers!
|
6
|
+
|
7
|
+
# MiniTest::Spec.class_eval do
|
8
|
+
# after :each do
|
9
|
+
# # DatabaseCleaner.clean
|
10
|
+
# Thing.delete_all
|
11
|
+
# Comment.delete_all
|
12
|
+
# User.delete_all
|
13
|
+
# end
|
14
|
+
# end
|
File without changes
|
data/test/twin_test.rb
CHANGED
data/test/url_helper_test.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: actionpack
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.2'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '3.2'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: uber
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,8 +114,8 @@ dependencies:
|
|
128
114
|
- - ">="
|
129
115
|
- !ruby/object:Gem::Version
|
130
116
|
version: 0.0.2
|
131
|
-
description: Cells
|
132
|
-
encapsulation, inheritance, testability and a cleaner view architecture.
|
117
|
+
description: Cells replaces partials and helpers with OOP view models, giving you
|
118
|
+
proper encapsulation, inheritance, testability and a cleaner view architecture.
|
133
119
|
email:
|
134
120
|
- apotonick@gmail.com
|
135
121
|
executables: []
|
@@ -149,6 +135,7 @@ files:
|
|
149
135
|
- gemfiles/rails4.1.gemfile
|
150
136
|
- gemfiles/rails4.2.gemfile
|
151
137
|
- lib/cell.rb
|
138
|
+
- lib/cell/abstract.rb
|
152
139
|
- lib/cell/caching.rb
|
153
140
|
- lib/cell/caching/notification.rb
|
154
141
|
- lib/cell/concept.rb
|
@@ -164,6 +151,7 @@ files:
|
|
164
151
|
- lib/cell/test_case.rb
|
165
152
|
- lib/cell/testing.rb
|
166
153
|
- lib/cell/twin.rb
|
154
|
+
- lib/cell/util.rb
|
167
155
|
- lib/cell/version.rb
|
168
156
|
- lib/cell/view_model.rb
|
169
157
|
- lib/cells.rb
|
@@ -237,6 +225,82 @@ files:
|
|
237
225
|
- test/partial_test.rb
|
238
226
|
- test/prefixes_test.rb
|
239
227
|
- test/public_test.rb
|
228
|
+
- test/rails4.2/.gitignore
|
229
|
+
- test/rails4.2/Gemfile
|
230
|
+
- test/rails4.2/README.rdoc
|
231
|
+
- test/rails4.2/Rakefile
|
232
|
+
- test/rails4.2/app/assets/images/.keep
|
233
|
+
- test/rails4.2/app/assets/stylesheets/application.css
|
234
|
+
- test/rails4.2/app/cells/song/song.css
|
235
|
+
- test/rails4.2/app/cells/song_cell.rb
|
236
|
+
- test/rails4.2/app/controllers/application_controller.rb
|
237
|
+
- test/rails4.2/app/controllers/concerns/.keep
|
238
|
+
- test/rails4.2/app/controllers/index_controller.rb
|
239
|
+
- test/rails4.2/app/helpers/application_helper.rb
|
240
|
+
- test/rails4.2/app/mailers/.keep
|
241
|
+
- test/rails4.2/app/models/.keep
|
242
|
+
- test/rails4.2/app/models/concerns/.keep
|
243
|
+
- test/rails4.2/app/views/index/index.html.erb
|
244
|
+
- test/rails4.2/app/views/layouts/application.html.erb
|
245
|
+
- test/rails4.2/bin/bundle
|
246
|
+
- test/rails4.2/bin/rails
|
247
|
+
- test/rails4.2/bin/rake
|
248
|
+
- test/rails4.2/bin/setup
|
249
|
+
- test/rails4.2/config.ru
|
250
|
+
- test/rails4.2/config/application.rb
|
251
|
+
- test/rails4.2/config/boot.rb
|
252
|
+
- test/rails4.2/config/environment.rb
|
253
|
+
- test/rails4.2/config/environments/development.rb
|
254
|
+
- test/rails4.2/config/environments/production.rb
|
255
|
+
- test/rails4.2/config/environments/test.rb
|
256
|
+
- test/rails4.2/config/initializers/backtrace_silencers.rb
|
257
|
+
- test/rails4.2/config/initializers/cookies_serializer.rb
|
258
|
+
- test/rails4.2/config/initializers/filter_parameter_logging.rb
|
259
|
+
- test/rails4.2/config/initializers/inflections.rb
|
260
|
+
- test/rails4.2/config/initializers/mime_types.rb
|
261
|
+
- test/rails4.2/config/initializers/session_store.rb
|
262
|
+
- test/rails4.2/config/initializers/wrap_parameters.rb
|
263
|
+
- test/rails4.2/config/locales/en.yml
|
264
|
+
- test/rails4.2/config/routes.rb
|
265
|
+
- test/rails4.2/config/secrets.yml
|
266
|
+
- test/rails4.2/db/seeds.rb
|
267
|
+
- test/rails4.2/engines/my_engine/.gitignore
|
268
|
+
- test/rails4.2/engines/my_engine/Gemfile
|
269
|
+
- test/rails4.2/engines/my_engine/MIT-LICENSE
|
270
|
+
- test/rails4.2/engines/my_engine/README.rdoc
|
271
|
+
- test/rails4.2/engines/my_engine/Rakefile
|
272
|
+
- test/rails4.2/engines/my_engine/app/assets/images/my_engine/.keep
|
273
|
+
- test/rails4.2/engines/my_engine/app/assets/stylesheets/my_engine/application.css
|
274
|
+
- test/rails4.2/engines/my_engine/app/concepts/user/cell.rb
|
275
|
+
- test/rails4.2/engines/my_engine/app/concepts/user/views/show.erb
|
276
|
+
- test/rails4.2/engines/my_engine/app/concepts/user/views/user.scss
|
277
|
+
- test/rails4.2/engines/my_engine/app/controllers/my_engine/application_controller.rb
|
278
|
+
- test/rails4.2/engines/my_engine/app/controllers/my_engine/user_controller.rb
|
279
|
+
- test/rails4.2/engines/my_engine/app/helpers/my_engine/application_helper.rb
|
280
|
+
- test/rails4.2/engines/my_engine/app/models/my_engine/user.rb
|
281
|
+
- test/rails4.2/engines/my_engine/app/views/layouts/my_engine/application.html.erb
|
282
|
+
- test/rails4.2/engines/my_engine/app/views/my_engine/user/show.html.erb
|
283
|
+
- test/rails4.2/engines/my_engine/bin/rails
|
284
|
+
- test/rails4.2/engines/my_engine/config/routes.rb
|
285
|
+
- test/rails4.2/engines/my_engine/db/migrate/20150530135920_create_my_engine_users.rb
|
286
|
+
- test/rails4.2/engines/my_engine/lib/my_engine.rb
|
287
|
+
- test/rails4.2/engines/my_engine/lib/my_engine/engine.rb
|
288
|
+
- test/rails4.2/engines/my_engine/lib/my_engine/version.rb
|
289
|
+
- test/rails4.2/engines/my_engine/lib/tasks/my_engine_tasks.rake
|
290
|
+
- test/rails4.2/engines/my_engine/my_engine.gemspec
|
291
|
+
- test/rails4.2/engines/my_engine/test/fixtures/my_engine/users.yml
|
292
|
+
- test/rails4.2/engines/my_engine/test/models/my_engine/user_test.rb
|
293
|
+
- test/rails4.2/lib/assets/.keep
|
294
|
+
- test/rails4.2/lib/tasks/.keep
|
295
|
+
- test/rails4.2/log/.keep
|
296
|
+
- test/rails4.2/public/404.html
|
297
|
+
- test/rails4.2/public/422.html
|
298
|
+
- test/rails4.2/public/500.html
|
299
|
+
- test/rails4.2/public/favicon.ico
|
300
|
+
- test/rails4.2/public/robots.txt
|
301
|
+
- test/rails4.2/test/integration/asset_pipeline_test.rb
|
302
|
+
- test/rails4.2/test/test_helper.rb
|
303
|
+
- test/rails4.2/vendor/assets/stylesheets/.keep
|
240
304
|
- test/rails_extensions_test.rb
|
241
305
|
- test/render_test.rb
|
242
306
|
- test/templates_test.rb
|
@@ -267,5 +331,5 @@ rubyforge_project:
|
|
267
331
|
rubygems_version: 2.2.2
|
268
332
|
signing_key:
|
269
333
|
specification_version: 4
|
270
|
-
summary: View Models for Rails.
|
334
|
+
summary: View Models for Ruby and Rails.
|
271
335
|
test_files: []
|