cells 3.11.3 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +15 -13
- data/Appraisals +23 -0
- data/CHANGES.md +20 -3
- data/Gemfile +5 -7
- data/README.md +317 -236
- data/Rakefile +1 -1
- data/TODO.md +3 -0
- data/cells.gemspec +19 -28
- data/gemfiles/rails3.2.gemfile +14 -0
- data/gemfiles/rails4.0.gemfile +14 -0
- data/gemfiles/rails4.1.gemfile +15 -0
- data/gemfiles/rails4.2.gemfile +14 -0
- data/lib/cell.rb +28 -21
- data/lib/cell/caching.rb +10 -22
- data/lib/cell/caching/notification.rb +15 -0
- data/lib/cell/concept.rb +4 -69
- data/lib/cell/development.rb +11 -0
- data/lib/{cells → cell}/engines.rb +1 -1
- data/lib/cell/layout.rb +20 -0
- data/lib/cell/partial.rb +17 -0
- data/lib/cell/{base/prefixes.rb → prefixes.rb} +1 -1
- data/lib/cell/rails.rb +58 -50
- data/lib/cell/railtie.rb +60 -0
- data/lib/cell/{base/self_contained.rb → self_contained.rb} +1 -1
- data/lib/cell/templates.rb +60 -0
- data/lib/cell/test_case.rb +4 -162
- data/lib/cell/testing.rb +15 -0
- data/lib/cell/twin.rb +11 -29
- data/lib/cell/version.rb +10 -0
- data/lib/cell/view_model.rb +196 -88
- data/lib/cells.rb +1 -20
- data/lib/rails/generators/cell/cell_generator.rb +43 -0
- data/lib/rails/generators/cell/templates/cell.rb.erb +8 -0
- data/lib/{generators/templates/concept → rails/generators/cell/templates}/view.erb +0 -0
- data/lib/{generators/templates/concept → rails/generators/cell/templates}/view.haml +0 -0
- data/lib/rails/generators/cell/templates/view.slim +2 -0
- data/lib/rails/generators/concept/concept_generator.rb +38 -0
- data/lib/{generators/templates/concept/cell.rb → rails/generators/concept/templates/concept.rb.erb} +2 -2
- data/lib/{generators → rails/generators/concept}/templates/view.erb +0 -0
- data/lib/{generators → rails/generators/concept}/templates/view.haml +0 -0
- data/lib/rails/generators/concept/templates/view.slim +2 -0
- data/lib/rails/generators/test_unit/cell/cell_generator.rb +21 -0
- data/lib/{generators/templates/cell_test.rb → rails/generators/test_unit/cell/templates/unit_test.rb.erb} +3 -3
- data/lib/rails/generators/test_unit/concept/concept_generator.rb +21 -0
- data/lib/rails/generators/test_unit/concept/templates/unit_test.rb.erb +11 -0
- data/lib/{cells → tasks}/cells.rake +0 -0
- data/test/builder_test.rb +58 -0
- data/test/caching_test.rb +298 -0
- data/test/cell_benchmark.rb +32 -0
- data/test/cell_generator_test.rb +51 -82
- data/test/cell_test.rb +8 -23
- data/test/concept_generator_test.rb +22 -13
- data/test/concept_test.rb +41 -75
- data/test/dummy/app/views/musician/hamlet.html.erb +1 -0
- data/test/dummy/config/application.rb +21 -8
- data/test/{app/cells/bassist/play.html.erb → fixtures/bassist/play.erb} +0 -0
- data/test/fixtures/concepts/record/views/layout.erb +1 -0
- data/test/{app → fixtures}/concepts/record/views/show.erb +0 -0
- data/test/{app → fixtures}/concepts/record/views/song.erb +0 -0
- data/test/fixtures/inherit_views_test/popper/tap.erb +1 -0
- data/test/fixtures/inherit_views_test/tapper/play.erb +1 -0
- data/test/fixtures/inherit_views_test/tapper/tap.erb +1 -0
- data/test/fixtures/partial_test/with_partial/show.erb +1 -0
- data/test/fixtures/partials/_show.html.erb +1 -0
- data/test/fixtures/partials/_show.xml.erb +1 -0
- data/test/fixtures/song/ivar.erb +1 -0
- data/test/fixtures/song/show.erb +1 -0
- data/test/fixtures/song/with_erb.erb +4 -0
- data/test/fixtures/song/with_html.erb +1 -0
- data/test/fixtures/song/with_locals.erb +2 -0
- data/test/fixtures/song_with_layout/happy.erb +1 -0
- data/test/fixtures/song_with_layout/merry.erb +1 -0
- data/test/fixtures/song_with_layout/show.erb +1 -0
- data/test/fixtures/song_with_layout/show_with_layout.erb +1 -0
- data/test/fixtures/templates_caching_test/song/show.erb +1 -0
- data/test/fixtures/url_helper_test/song/edit.erb +8 -0
- data/test/fixtures/url_helper_test/song/with_block.erb +2 -0
- data/test/fixtures/url_helper_test/song/with_capture.erb +4 -0
- data/test/fixtures/url_helper_test/song/with_content_tag.erb +6 -0
- data/test/fixtures/url_helper_test/song/with_form_for_block.erb +3 -0
- data/test/fixtures/url_helper_test/song/with_link_to.erb +3 -0
- data/test/layout_test.rb +57 -0
- data/test/partial_test.rb +27 -0
- data/test/prefixes_test.rb +36 -10
- data/test/public_test.rb +42 -0
- data/test/rails_extensions_test.rb +51 -0
- data/test/render_test.rb +103 -0
- data/test/templates_test.rb +45 -0
- data/test/test_case_test.rb +21 -122
- data/test/test_helper.rb +37 -33
- data/test/twin_test.rb +3 -7
- data/test/url_helper_test.rb +89 -0
- metadata +92 -357
- data/gemfiles/Gemfile.rails3-0 +0 -7
- data/gemfiles/Gemfile.rails3-1 +0 -7
- data/gemfiles/Gemfile.rails3-2 +0 -7
- data/gemfiles/Gemfile.rails4-0 +0 -12
- data/gemfiles/Gemfile.rails4-1 +0 -12
- data/lib/cell/base.rb +0 -82
- data/lib/cell/base/view.rb +0 -15
- data/lib/cell/builder.rb +0 -71
- data/lib/cell/deprecations.rb +0 -41
- data/lib/cell/dsl.rb +0 -7
- data/lib/cell/rack.rb +0 -32
- data/lib/cell/rails/helper_api.rb +0 -37
- data/lib/cell/rails/view_model.rb +0 -159
- data/lib/cell/rails3_0_strategy.rb +0 -82
- data/lib/cell/rails3_1_strategy.rb +0 -40
- data/lib/cell/rails4_0_strategy.rb +0 -39
- data/lib/cell/rails4_1_strategy.rb +0 -40
- data/lib/cell/rendering.rb +0 -109
- data/lib/cells/rails.rb +0 -86
- data/lib/cells/railtie.rb +0 -38
- data/lib/cells/version.rb +0 -3
- data/lib/generators/USAGE +0 -30
- data/lib/generators/cells/base.rb +0 -22
- data/lib/generators/cells/cell_generator.rb +0 -15
- data/lib/generators/cells/view_generator.rb +0 -18
- data/lib/generators/erb/cell_generator.rb +0 -15
- data/lib/generators/erb/concept_generator.rb +0 -17
- data/lib/generators/haml/cell_generator.rb +0 -17
- data/lib/generators/haml/concept_generator.rb +0 -17
- data/lib/generators/rails/cell_generator.rb +0 -16
- data/lib/generators/rails/concept_generator.rb +0 -16
- data/lib/generators/slim/cell_generator.rb +0 -17
- data/lib/generators/templates/cell.rb +0 -9
- data/lib/generators/templates/view.slim +0 -4
- data/lib/generators/test_unit/cell_generator.rb +0 -14
- data/lib/generators/trailblazer/base.rb +0 -21
- data/lib/generators/trailblazer/view_generator.rb +0 -18
- data/test/app/cells/album/views/cover.haml +0 -1
- data/test/app/cells/bad_guitarist/_dii.html.erb +0 -1
- data/test/app/cells/bad_guitarist_cell.rb +0 -2
- data/test/app/cells/bassist/_dii.html.erb +0 -1
- data/test/app/cells/bassist/ahem.html.erb +0 -1
- data/test/app/cells/bassist/compose.html.erb +0 -1
- data/test/app/cells/bassist/contact_form.html.erb +0 -1
- data/test/app/cells/bassist/form_for.erb +0 -3
- data/test/app/cells/bassist/form_for_in_haml.haml +0 -2
- data/test/app/cells/bassist/jam.html.erb +0 -3
- data/test/app/cells/bassist/play.js.erb +0 -1
- data/test/app/cells/bassist/pose.html.erb +0 -1
- data/test/app/cells/bassist/promote.html.erb +0 -1
- data/test/app/cells/bassist/provoke.html.erb +0 -1
- data/test/app/cells/bassist/shout.html.erb +0 -1
- data/test/app/cells/bassist/sing.html.haml +0 -1
- data/test/app/cells/bassist/slap.html.erb +0 -1
- data/test/app/cells/bassist/yell.en.html.erb +0 -1
- data/test/app/cells/bassist_cell.rb +0 -25
- data/test/app/cells/club_security.rb +0 -2
- data/test/app/cells/club_security/guard/help.html.erb +0 -1
- data/test/app/cells/club_security/guard_cell.rb +0 -6
- data/test/app/cells/club_security/medic/help.html.erb +0 -1
- data/test/app/cells/club_security/medic_cell.rb +0 -8
- data/test/app/cells/layouts/b.erb +0 -1
- data/test/app/cells/layouts/metal.html.erb +0 -1
- data/test/app/cells/rails_helper_api_test/bassist/edit.html.erb +0 -5
- data/test/app/cells/shouter/sing.html.erb +0 -1
- data/test/app/cells/song/dashboard.haml +0 -7
- data/test/app/cells/song/details.html.haml +0 -1
- data/test/app/cells/song/info.html.haml +0 -1
- data/test/app/cells/song/lyrics.html.haml +0 -6
- data/test/app/cells/song/plays.haml +0 -1
- data/test/app/cells/song/scale.haml +0 -1
- data/test/app/cells/song/show.html.haml +0 -3
- data/test/app/cells/song/title.html.haml +0 -1
- data/test/app/cells/trumpeter/promote.html.erb +0 -1
- data/test/app/cells/trumpeter_cell.rb +0 -8
- data/test/app/cells/view_model_test/comments/show.haml +0 -7
- data/test/app/concepts/record/views/layout.haml +0 -2
- data/test/app/views/shared/_dong.html.erb +0 -1
- data/test/cell_module_test.rb +0 -170
- data/test/cells_module_test.rb +0 -27
- data/test/deprecations_test.rb +0 -101
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/views/musician/hamlet.html.haml +0 -1
- data/test/dummy/config/environments/development.rb +0 -16
- data/test/dummy/config/environments/production.rb +0 -46
- data/test/dummy/config/environments/test.rb +0 -33
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/label/app/cells/label/show.erb +0 -1
- data/test/dummy/label/app/cells/label_cell.rb +0 -5
- data/test/dummy/label/label.gemspec +0 -20
- data/test/dummy/label/lib/label.rb +0 -4
- data/test/dummy/label/lib/label/version.rb +0 -3
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/helper_test.rb +0 -81
- data/test/rack_test.rb +0 -32
- data/test/rails/asset_pipeline_test.rb +0 -20
- data/test/rails/caching_test.rb +0 -456
- data/test/rails/cells_test.rb +0 -119
- data/test/rails/forms_test.rb +0 -75
- data/test/rails/integration_test.rb +0 -299
- data/test/rails/render_test.rb +0 -189
- data/test/rails/view_model_test.rb +0 -226
- data/test/rails/view_test.rb +0 -49
- data/test/rails_helper_api_test.rb +0 -58
- data/test/self_contained_test.rb +0 -31
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
|
4
|
+
class TemplatesTest < MiniTest::Spec
|
5
|
+
Templates = Cell::Templates
|
6
|
+
|
7
|
+
let (:base) { ['test/fixtures'] }
|
8
|
+
|
9
|
+
# existing.
|
10
|
+
it { Templates.new[base, ['bassist'], 'play', 'erb'].file.must_equal 'test/fixtures/bassist/play.erb' }
|
11
|
+
|
12
|
+
# not existing.
|
13
|
+
it { Templates.new[base, ['bassist'], 'not-here', 'erb'].must_equal nil }
|
14
|
+
|
15
|
+
|
16
|
+
# different caches for different classes
|
17
|
+
|
18
|
+
# same cache for subclasses
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
class TemplatesCachingTest < MiniTest::Spec
|
24
|
+
class SongCell < Cell::ViewModel
|
25
|
+
self.view_paths = ['test/fixtures']
|
26
|
+
|
27
|
+
def show
|
28
|
+
render
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# templates are cached once and forever.
|
33
|
+
it do
|
34
|
+
cell = cell("templates_caching_test/song")
|
35
|
+
|
36
|
+
cell.call(:show).must_equal 'The Great Mind Eraser'
|
37
|
+
|
38
|
+
SongCell.templates.instance_eval do
|
39
|
+
def create; raise; end
|
40
|
+
end
|
41
|
+
|
42
|
+
# cached, NO new tilt template.
|
43
|
+
cell.call(:show).must_equal 'The Great Mind Eraser'
|
44
|
+
end
|
45
|
+
end
|
data/test/test_case_test.rb
CHANGED
@@ -1,143 +1,42 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class TestCaseTest <
|
4
|
-
|
5
|
-
|
6
|
-
class << self # FIXME: why use Minitest::Spec syntax here. how does C::TC work with that?
|
7
|
-
alias_method :before, :setup
|
8
|
-
alias_method :it, :test
|
9
|
-
|
10
|
-
def describe(msg, &block)
|
11
|
-
instance_exec &block
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
before do
|
16
|
-
@test = Cell::TestCase.new(:cell_test)
|
17
|
-
|
18
|
-
BassistCell.class_eval do
|
19
|
-
def play; render; end
|
20
|
-
end
|
3
|
+
class TestCaseTest < MiniTest::Spec
|
4
|
+
class SongCell < Cell::ViewModel
|
21
5
|
end
|
22
6
|
|
23
|
-
|
24
|
-
|
25
|
-
assert_equal "Doo", render_cell(:bassist, :play)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "accept state args" do
|
29
|
-
assert_equal "*shouts* Listen!\n", render_cell(:bassist, :shout, :words => "Listen!")
|
7
|
+
class Song
|
8
|
+
class Cell < Cell::Concept
|
30
9
|
end
|
31
10
|
end
|
32
11
|
|
33
|
-
|
34
|
-
assert_selector "p", "Doo", "<p>Doo</p>y"
|
35
|
-
end
|
12
|
+
let (:song) { Object.new }
|
36
13
|
|
37
14
|
describe "#cell" do
|
38
|
-
|
39
|
-
assert_kind_of BassistCell, cell(:bassist)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "accept a block" do
|
43
|
-
assert_respond_to cell(:bassist){ def whatever; end }, :whatever
|
44
|
-
end
|
45
|
-
end
|
15
|
+
subject { cell("test_case_test/song", song) }
|
46
16
|
|
47
|
-
|
48
|
-
it
|
49
|
-
render_cell(:bassist, :play)
|
50
|
-
assert_kind_of BassistCell, subject_cell
|
51
|
-
end
|
17
|
+
it { subject.must_be_instance_of SongCell }
|
18
|
+
it { subject.model.must_equal song }
|
52
19
|
end
|
53
20
|
|
54
21
|
|
55
|
-
describe "#
|
56
|
-
|
57
|
-
render_cell(:bassist, :play)
|
58
|
-
if Cell.rails_version.~("3.0")
|
59
|
-
assert_equal([:lookup_context], view_assigns.keys)
|
60
|
-
else
|
61
|
-
assert_equal({}, view_assigns)
|
62
|
-
end
|
63
|
-
end
|
22
|
+
describe "#concept" do
|
23
|
+
subject { concept("test_case_test/song/cell", song) }
|
64
24
|
|
65
|
-
it
|
66
|
-
|
67
|
-
def sleep
|
68
|
-
@duration = "8h"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
render_cell(:bassist, :sleep)
|
72
|
-
if Cell.rails_version.~("3.0")
|
73
|
-
assert_equal("8h", view_assigns[:duration])
|
74
|
-
else
|
75
|
-
assert_equal({:duration => "8h"}, view_assigns)
|
76
|
-
end
|
77
|
-
end
|
25
|
+
it { subject.must_be_instance_of Song::Cell }
|
26
|
+
it { subject.model.must_equal song }
|
78
27
|
end
|
79
28
|
|
80
|
-
describe "in declarative tests" do
|
81
|
-
it "respond to TestCase.tests" do
|
82
|
-
self.class.tests BassistCell
|
83
|
-
assert_equal BassistCell, self.class.controller_class
|
84
|
-
end
|
85
|
-
|
86
|
-
it "infer the cell name" do
|
87
|
-
class SingerCell < Cell::Rails
|
88
|
-
end
|
89
|
-
|
90
|
-
class SingerCellTest < Cell::TestCase
|
91
|
-
end
|
92
29
|
|
93
|
-
|
30
|
+
# capybara support
|
31
|
+
class CapybaraCell < Cell::ViewModel
|
32
|
+
def show
|
33
|
+
"<b>Grunt</b>"
|
94
34
|
end
|
35
|
+
end
|
95
36
|
|
96
|
-
|
97
|
-
|
98
|
-
self.class.tests BassistCell
|
99
|
-
end
|
100
|
-
|
101
|
-
it "provide #invoke" do
|
102
|
-
assert_equal "Doo", invoke(:play)
|
103
|
-
end
|
104
|
-
|
105
|
-
it "provide #last_invoke" do
|
106
|
-
assert_equal nil, last_invoke
|
107
|
-
assert_equal "Doo", invoke(:play)
|
108
|
-
assert_equal "Doo", last_invoke
|
109
|
-
end
|
110
|
-
|
111
|
-
it "provide #invoke accepting options" do
|
112
|
-
#assert_equal "Doo", invoke(:play)
|
113
|
-
end
|
114
|
-
|
115
|
-
it "provide #invoke accepting args" do
|
116
|
-
assert_equal "*shouts* Listen!\n", invoke(:shout, :words => "Listen!")
|
117
|
-
end
|
118
|
-
|
119
|
-
it "provide assert_select" do
|
120
|
-
invoke :promote
|
121
|
-
assert_select "a", "vd.com"
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
describe "#before_test_states_in" do
|
126
|
-
it "add the :in_view state" do
|
127
|
-
c = cell(:bassist)
|
128
|
-
assert ! c.respond_to?(:in_view)
|
129
|
-
|
130
|
-
setup_test_states_in(c)
|
131
|
-
assert_equal "Cells rock.", c.render_state(:in_view, lambda{"Cells rock."})
|
132
|
-
end
|
133
|
-
end
|
37
|
+
describe "capybara support" do
|
38
|
+
subject { cell("test_case_test/capybara", nil) }
|
134
39
|
|
135
|
-
|
136
|
-
it "execute the block in a real view" do
|
137
|
-
content = "Cells rule."
|
138
|
-
@test.setup
|
139
|
-
assert_equal("<h1>Cells rule.</h1>", @test.in_view(:bassist) do content_tag("h1", content) end)
|
140
|
-
end
|
141
|
-
end
|
40
|
+
it { subject.call } # add capybara tests here, @seuros.
|
142
41
|
end
|
143
|
-
end
|
42
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,49 +1,53 @@
|
|
1
|
-
|
2
|
-
require '
|
1
|
+
begin
|
2
|
+
require 'byebug'
|
3
|
+
rescue LoadError
|
4
|
+
end
|
3
5
|
|
4
6
|
ENV['RAILS_ENV'] = 'test'
|
5
7
|
|
6
|
-
|
7
|
-
require
|
8
|
+
require_relative 'dummy/config/environment'
|
9
|
+
require 'tilt/erubis' if Gem::Version.new(ActiveSupport::VERSION::STRING) >= Gem::Version.new('4.2.0')
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
require 'minitest/autorun'
|
12
|
+
require 'test_xml/mini_test'
|
11
13
|
|
12
|
-
require '
|
14
|
+
require 'minitest/reporters'
|
15
|
+
Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new]
|
16
|
+
require "rails/test_help" # adds stuff like @routes, etc.
|
13
17
|
|
14
|
-
|
18
|
+
require 'cells'
|
15
19
|
|
16
|
-
require "cell/test_case"
|
17
|
-
# Extend TestCase.
|
18
20
|
MiniTest::Spec.class_eval do
|
19
|
-
|
20
|
-
assert !assertion
|
21
|
-
end
|
22
|
-
|
23
|
-
def assert_is_a(klass, object)
|
24
|
-
assert object.is_a?(klass)
|
25
|
-
end
|
21
|
+
include Cell::TestHelper
|
26
22
|
end
|
27
23
|
|
28
|
-
|
29
|
-
class Cell::Rails
|
30
|
-
def action_method?(*); true; end
|
24
|
+
class BassistCell < Cell::ViewModel
|
31
25
|
end
|
32
26
|
|
33
|
-
|
34
|
-
|
35
|
-
|
27
|
+
class MusicianController < ActionController::Base
|
28
|
+
def view_with_concept_with_show
|
29
|
+
render :inline => %{<%= concept("view_extensions_test/cell", "Up For Breakfast", volume: 1).show %>} # TODO: concept doesn't need .call
|
30
|
+
end
|
36
31
|
|
37
|
-
|
32
|
+
def view_with_concept_without_call
|
33
|
+
render :inline => %{<%= concept("view_extensions_test/cell", "A Tale That Wasn't Right") %>} # this tests ViewModel#to_s.
|
34
|
+
end
|
38
35
|
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
def view_with_concept_with_call
|
37
|
+
render :inline => %{<%= concept("view_extensions_test/cell", "A Tale That Wasn't Right").call %>}
|
38
|
+
end
|
39
|
+
|
40
|
+
def view_with_cell_with_call
|
41
|
+
render :inline => %{<%= cell("view_extensions_test/song", "A Tale That Wasn't Right").call %>}
|
42
|
+
end
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
def action_with_concept_with_call
|
45
|
+
render text: concept("view_extensions_test/cell", "A Tale That Wasn't Right").call
|
46
|
+
end
|
47
|
+
|
48
|
+
def action_with_cell_with_call
|
49
|
+
render text: cell("view_extensions_test/song", "A Tale That Wasn't Right").call
|
50
|
+
end
|
48
51
|
end
|
49
|
-
|
52
|
+
|
53
|
+
Rails.backtrace_cleaner.remove_silencers! # YES, stacktraces are awesome!
|
data/test/twin_test.rb
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'cell/twin'
|
3
3
|
|
4
|
-
if Cell.rails_version >= 3.1
|
5
|
-
|
6
4
|
class TwinTest < MiniTest::Spec
|
7
5
|
class SongCell < Cell::ViewModel
|
8
|
-
class Twin <
|
6
|
+
class Twin < Disposable::Twin
|
9
7
|
property :title
|
10
8
|
option :online?
|
11
9
|
end
|
12
10
|
|
13
|
-
include Cell::Twin
|
14
|
-
|
11
|
+
include Cell::Twin
|
12
|
+
twin Twin
|
15
13
|
|
16
14
|
def show
|
17
15
|
"#{title} is #{online?}"
|
@@ -26,5 +24,3 @@ class TwinTest < MiniTest::Spec
|
|
26
24
|
|
27
25
|
it { SongCell.new(nil, model, :online? => true).call.must_equal "kenny is true" }
|
28
26
|
end
|
29
|
-
|
30
|
-
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MusiciansController < ApplicationController
|
4
|
+
end
|
5
|
+
|
6
|
+
class UrlHelperTest < MiniTest::Spec
|
7
|
+
let (:controller) { MusiciansController.new.tap { |ctl| ctl.send("request=", ActionDispatch::Request.new({})) } }
|
8
|
+
let (:cellule) { SongCell.new(controller) }
|
9
|
+
|
10
|
+
class SongCell < Cell::ViewModel
|
11
|
+
self.view_paths = ['test/fixtures']
|
12
|
+
|
13
|
+
include ActionView::Helpers::FormTagHelper
|
14
|
+
|
15
|
+
def edit
|
16
|
+
render
|
17
|
+
end
|
18
|
+
|
19
|
+
def with_content_tag
|
20
|
+
render
|
21
|
+
end
|
22
|
+
|
23
|
+
def with_block
|
24
|
+
render
|
25
|
+
end
|
26
|
+
|
27
|
+
def with_capture
|
28
|
+
render
|
29
|
+
end
|
30
|
+
|
31
|
+
def with_form_tag
|
32
|
+
form_tag("/songs") + content_tag(:span) + "</form>"
|
33
|
+
end
|
34
|
+
|
35
|
+
include ActionView::Helpers::AssetTagHelper
|
36
|
+
def with_link_to
|
37
|
+
render
|
38
|
+
end
|
39
|
+
|
40
|
+
include ActionView::Helpers::FormHelper
|
41
|
+
def with_form_for_block
|
42
|
+
render
|
43
|
+
end
|
44
|
+
|
45
|
+
def erb_with_form_for_block
|
46
|
+
render template_engine: :erb
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
def cap
|
51
|
+
"yay, #{with_output_buffer { yield } }"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
# URL helpers work in cell instance.
|
57
|
+
it { cellule.songs_path.must_equal "/songs" }
|
58
|
+
# it { cellule.url_for(Song.new).must_equal "/songs" }
|
59
|
+
|
60
|
+
include TestXml::Assertions # TODO: fix in test_xml.
|
61
|
+
|
62
|
+
# content_tag with HAML.
|
63
|
+
# it { cellule.with_content_tag.must_equal "<span>Title:\n<div>Still Knee Deep\n</div>\n</span>\n" }
|
64
|
+
|
65
|
+
# form_tag with block in block work.
|
66
|
+
# it { cellule.edit.must_equal_xml_structure "<form><div><input/></div><label/><input/><ul><li/></ul></form>" }
|
67
|
+
|
68
|
+
# form_tag, no block
|
69
|
+
# it { cellule.with_form_tag.must_equal_xml_structure "<form><div><input/></div><span/></form>" }
|
70
|
+
|
71
|
+
# # form_for with block
|
72
|
+
# it { cellule.with_form_for_block.must_equal_xml_structure "<form><div><input/></div><input/></form>" }
|
73
|
+
# # form_for with block in ERB.
|
74
|
+
# it { cellule.erb_with_form_for_block.must_equal_xml_structure "<form><div><input/></div><input/></form>" }
|
75
|
+
|
76
|
+
# when using yield, haml breaks it (but doesn't escape HTML)
|
77
|
+
# it { cellule.with_block.must_equal "Nice!\nyay, <b>yeah</b>\n" }
|
78
|
+
|
79
|
+
# capture
|
80
|
+
# it { cellule.with_capture.must_equal "Nice!\n<b>Great!</b>\n" }
|
81
|
+
|
82
|
+
# there's again escaping happening where it shouldn't be in link_to and rails <= 3.2.
|
83
|
+
# if Cell.rails_version >= Gem::Version.new('4.0')
|
84
|
+
# # link_to with block and img_tag
|
85
|
+
# it { cellule.with_link_to.must_equal "<a href=\"/songs\"><img alt=\"All\" src=\"/images/all.png\" />\n</a>\n" }
|
86
|
+
# end
|
87
|
+
end
|
88
|
+
|
89
|
+
# start with content_tag and block (or capture) and find out how sinatra handles that. goal is NOT to use those hacks in haml's action_view_extensions.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,171 +16,64 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: railties
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '3.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '3.0'
|
26
|
+
version: '3.2'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: uber
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - "~>"
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
33
|
+
version: 0.0.9
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - "~>"
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: haml
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: slim
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: tzinfo
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: minitest
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 4.7.5
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 4.7.5
|
40
|
+
version: 0.0.9
|
125
41
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
42
|
+
name: tilt
|
127
43
|
requirement: !ruby/object:Gem::Requirement
|
128
44
|
requirements:
|
129
45
|
- - ">="
|
130
46
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: capybara
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
47
|
+
version: '1.4'
|
48
|
+
- - "<"
|
144
49
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
146
|
-
type: :
|
50
|
+
version: '3'
|
51
|
+
type: :runtime
|
147
52
|
prerelease: false
|
148
53
|
version_requirements: !ruby/object:Gem::Requirement
|
149
54
|
requirements:
|
150
55
|
- - ">="
|
151
56
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
153
|
-
-
|
154
|
-
name: sprockets
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
57
|
+
version: '1.4'
|
58
|
+
- - "<"
|
165
59
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
60
|
+
version: '3'
|
167
61
|
- !ruby/object:Gem::Dependency
|
168
62
|
name: disposable
|
169
63
|
requirement: !ruby/object:Gem::Requirement
|
170
64
|
requirements:
|
171
65
|
- - "~>"
|
172
66
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.0.
|
174
|
-
type: :
|
67
|
+
version: 0.0.8
|
68
|
+
type: :runtime
|
175
69
|
prerelease: false
|
176
70
|
version_requirements: !ruby/object:Gem::Requirement
|
177
71
|
requirements:
|
178
72
|
- - "~>"
|
179
73
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.0.
|
181
|
-
description: Cells
|
182
|
-
|
183
|
-
and component-orientation.
|
74
|
+
version: 0.0.8
|
75
|
+
description: Cells replace partials and helpers with OOP view models, giving you proper
|
76
|
+
encapsulation, inheritance, testability and a cleaner view architecture.
|
184
77
|
email:
|
185
78
|
- apotonick@gmail.com
|
186
79
|
executables: []
|
@@ -189,170 +82,114 @@ extra_rdoc_files: []
|
|
189
82
|
files:
|
190
83
|
- ".gitignore"
|
191
84
|
- ".travis.yml"
|
85
|
+
- Appraisals
|
192
86
|
- CHANGES.md
|
193
87
|
- Gemfile
|
194
88
|
- README.md
|
195
89
|
- Rakefile
|
196
90
|
- TODO.md
|
197
91
|
- cells.gemspec
|
198
|
-
- gemfiles/
|
199
|
-
- gemfiles/
|
200
|
-
- gemfiles/
|
201
|
-
- gemfiles/
|
202
|
-
- gemfiles/Gemfile.rails4-1
|
92
|
+
- gemfiles/rails3.2.gemfile
|
93
|
+
- gemfiles/rails4.0.gemfile
|
94
|
+
- gemfiles/rails4.1.gemfile
|
95
|
+
- gemfiles/rails4.2.gemfile
|
203
96
|
- lib/cell.rb
|
204
|
-
- lib/cell/base.rb
|
205
|
-
- lib/cell/base/prefixes.rb
|
206
|
-
- lib/cell/base/self_contained.rb
|
207
|
-
- lib/cell/base/view.rb
|
208
|
-
- lib/cell/builder.rb
|
209
97
|
- lib/cell/caching.rb
|
98
|
+
- lib/cell/caching/notification.rb
|
210
99
|
- lib/cell/concept.rb
|
211
|
-
- lib/cell/
|
212
|
-
- lib/cell/
|
213
|
-
- lib/cell/
|
100
|
+
- lib/cell/development.rb
|
101
|
+
- lib/cell/engines.rb
|
102
|
+
- lib/cell/layout.rb
|
103
|
+
- lib/cell/partial.rb
|
104
|
+
- lib/cell/prefixes.rb
|
214
105
|
- lib/cell/rails.rb
|
215
|
-
- lib/cell/
|
216
|
-
- lib/cell/
|
217
|
-
- lib/cell/
|
218
|
-
- lib/cell/rails3_1_strategy.rb
|
219
|
-
- lib/cell/rails4_0_strategy.rb
|
220
|
-
- lib/cell/rails4_1_strategy.rb
|
221
|
-
- lib/cell/rendering.rb
|
106
|
+
- lib/cell/railtie.rb
|
107
|
+
- lib/cell/self_contained.rb
|
108
|
+
- lib/cell/templates.rb
|
222
109
|
- lib/cell/test_case.rb
|
110
|
+
- lib/cell/testing.rb
|
223
111
|
- lib/cell/twin.rb
|
112
|
+
- lib/cell/version.rb
|
224
113
|
- lib/cell/view_model.rb
|
225
114
|
- lib/cells.rb
|
226
|
-
- lib/
|
227
|
-
- lib/
|
228
|
-
- lib/
|
229
|
-
- lib/
|
230
|
-
- lib/
|
231
|
-
- lib/generators/
|
232
|
-
- lib/generators/
|
233
|
-
- lib/generators/
|
234
|
-
- lib/generators/
|
235
|
-
- lib/generators/
|
236
|
-
- lib/generators/
|
237
|
-
- lib/generators/
|
238
|
-
- lib/generators/
|
239
|
-
- lib/generators/
|
240
|
-
- lib/
|
241
|
-
-
|
242
|
-
-
|
243
|
-
-
|
244
|
-
- lib/generators/templates/concept/cell.rb
|
245
|
-
- lib/generators/templates/concept/view.erb
|
246
|
-
- lib/generators/templates/concept/view.haml
|
247
|
-
- lib/generators/templates/view.erb
|
248
|
-
- lib/generators/templates/view.haml
|
249
|
-
- lib/generators/templates/view.slim
|
250
|
-
- lib/generators/test_unit/cell_generator.rb
|
251
|
-
- lib/generators/trailblazer/base.rb
|
252
|
-
- lib/generators/trailblazer/view_generator.rb
|
253
|
-
- test/app/cells/album/views/cover.haml
|
254
|
-
- test/app/cells/bad_guitarist/_dii.html.erb
|
255
|
-
- test/app/cells/bad_guitarist_cell.rb
|
256
|
-
- test/app/cells/bassist/_dii.html.erb
|
257
|
-
- test/app/cells/bassist/ahem.html.erb
|
258
|
-
- test/app/cells/bassist/compose.html.erb
|
259
|
-
- test/app/cells/bassist/contact_form.html.erb
|
260
|
-
- test/app/cells/bassist/form_for.erb
|
261
|
-
- test/app/cells/bassist/form_for_in_haml.haml
|
262
|
-
- test/app/cells/bassist/jam.html.erb
|
263
|
-
- test/app/cells/bassist/play.html.erb
|
264
|
-
- test/app/cells/bassist/play.js.erb
|
265
|
-
- test/app/cells/bassist/pose.html.erb
|
266
|
-
- test/app/cells/bassist/promote.html.erb
|
267
|
-
- test/app/cells/bassist/provoke.html.erb
|
268
|
-
- test/app/cells/bassist/shout.html.erb
|
269
|
-
- test/app/cells/bassist/sing.html.haml
|
270
|
-
- test/app/cells/bassist/slap.html.erb
|
271
|
-
- test/app/cells/bassist/yell.en.html.erb
|
272
|
-
- test/app/cells/bassist_cell.rb
|
273
|
-
- test/app/cells/club_security.rb
|
274
|
-
- test/app/cells/club_security/guard/help.html.erb
|
275
|
-
- test/app/cells/club_security/guard_cell.rb
|
276
|
-
- test/app/cells/club_security/medic/help.html.erb
|
277
|
-
- test/app/cells/club_security/medic_cell.rb
|
278
|
-
- test/app/cells/layouts/b.erb
|
279
|
-
- test/app/cells/layouts/metal.html.erb
|
280
|
-
- test/app/cells/rails_helper_api_test/bassist/edit.html.erb
|
281
|
-
- test/app/cells/shouter/sing.html.erb
|
282
|
-
- test/app/cells/song/dashboard.haml
|
283
|
-
- test/app/cells/song/details.html.haml
|
284
|
-
- test/app/cells/song/info.html.haml
|
285
|
-
- test/app/cells/song/lyrics.html.haml
|
286
|
-
- test/app/cells/song/plays.haml
|
287
|
-
- test/app/cells/song/scale.haml
|
288
|
-
- test/app/cells/song/show.html.haml
|
289
|
-
- test/app/cells/song/title.html.haml
|
290
|
-
- test/app/cells/trumpeter/promote.html.erb
|
291
|
-
- test/app/cells/trumpeter_cell.rb
|
292
|
-
- test/app/cells/view_model_test/comments/show.haml
|
293
|
-
- test/app/concepts/record/views/layout.haml
|
294
|
-
- test/app/concepts/record/views/show.erb
|
295
|
-
- test/app/concepts/record/views/song.erb
|
296
|
-
- test/app/views/shared/_dong.html.erb
|
115
|
+
- lib/rails/generators/cell/cell_generator.rb
|
116
|
+
- lib/rails/generators/cell/templates/cell.rb.erb
|
117
|
+
- lib/rails/generators/cell/templates/view.erb
|
118
|
+
- lib/rails/generators/cell/templates/view.haml
|
119
|
+
- lib/rails/generators/cell/templates/view.slim
|
120
|
+
- lib/rails/generators/concept/concept_generator.rb
|
121
|
+
- lib/rails/generators/concept/templates/concept.rb.erb
|
122
|
+
- lib/rails/generators/concept/templates/view.erb
|
123
|
+
- lib/rails/generators/concept/templates/view.haml
|
124
|
+
- lib/rails/generators/concept/templates/view.slim
|
125
|
+
- lib/rails/generators/test_unit/cell/cell_generator.rb
|
126
|
+
- lib/rails/generators/test_unit/cell/templates/unit_test.rb.erb
|
127
|
+
- lib/rails/generators/test_unit/concept/concept_generator.rb
|
128
|
+
- lib/rails/generators/test_unit/concept/templates/unit_test.rb.erb
|
129
|
+
- lib/tasks/cells.rake
|
130
|
+
- test/builder_test.rb
|
131
|
+
- test/caching_test.rb
|
132
|
+
- test/cell_benchmark.rb
|
297
133
|
- test/cell_generator_test.rb
|
298
|
-
- test/cell_module_test.rb
|
299
134
|
- test/cell_test.rb
|
300
|
-
- test/cells_module_test.rb
|
301
135
|
- test/concept_generator_test.rb
|
302
136
|
- test/concept_test.rb
|
303
|
-
- test/deprecations_test.rb
|
304
137
|
- test/dummy/Rakefile
|
305
138
|
- test/dummy/app/assets/javascripts/application.js
|
306
139
|
- test/dummy/app/cells/album/assets/album.js
|
307
140
|
- test/dummy/app/concepts/song/assets/songs.js
|
308
141
|
- test/dummy/app/controllers/application_controller.rb
|
309
|
-
- test/dummy/app/helpers/application_helper.rb
|
310
142
|
- test/dummy/app/views/layouts/application.html.erb
|
311
143
|
- test/dummy/app/views/musician/featured.html.erb
|
312
144
|
- test/dummy/app/views/musician/featured_with_block.html.erb
|
313
|
-
- test/dummy/app/views/musician/hamlet.html.
|
145
|
+
- test/dummy/app/views/musician/hamlet.html.erb
|
314
146
|
- test/dummy/app/views/musician/title.erb
|
315
147
|
- test/dummy/config.ru
|
316
148
|
- test/dummy/config/application.rb
|
317
149
|
- test/dummy/config/boot.rb
|
318
150
|
- test/dummy/config/database.yml
|
319
151
|
- test/dummy/config/environment.rb
|
320
|
-
- test/dummy/config/environments/development.rb
|
321
|
-
- test/dummy/config/environments/production.rb
|
322
|
-
- test/dummy/config/environments/test.rb
|
323
152
|
- test/dummy/config/locales/en.yml
|
324
153
|
- test/dummy/config/routes.rb
|
325
|
-
- test/dummy/db/test.sqlite3
|
326
|
-
- test/dummy/label/app/cells/label/show.erb
|
327
|
-
- test/dummy/label/app/cells/label_cell.rb
|
328
|
-
- test/dummy/label/label.gemspec
|
329
|
-
- test/dummy/label/lib/label.rb
|
330
|
-
- test/dummy/label/lib/label/version.rb
|
331
|
-
- test/dummy/log/production.log
|
332
|
-
- test/dummy/log/server.log
|
333
|
-
- test/dummy/public/404.html
|
334
|
-
- test/dummy/public/422.html
|
335
|
-
- test/dummy/public/500.html
|
336
|
-
- test/dummy/public/favicon.ico
|
337
|
-
- test/dummy/public/stylesheets/.gitkeep
|
338
154
|
- test/dummy/script/rails
|
339
|
-
- test/
|
155
|
+
- test/fixtures/bassist/play.erb
|
156
|
+
- test/fixtures/concepts/record/views/layout.erb
|
157
|
+
- test/fixtures/concepts/record/views/show.erb
|
158
|
+
- test/fixtures/concepts/record/views/song.erb
|
159
|
+
- test/fixtures/inherit_views_test/popper/tap.erb
|
160
|
+
- test/fixtures/inherit_views_test/tapper/play.erb
|
161
|
+
- test/fixtures/inherit_views_test/tapper/tap.erb
|
162
|
+
- test/fixtures/partial_test/with_partial/show.erb
|
163
|
+
- test/fixtures/partials/_show.html.erb
|
164
|
+
- test/fixtures/partials/_show.xml.erb
|
165
|
+
- test/fixtures/song/ivar.erb
|
166
|
+
- test/fixtures/song/show.erb
|
167
|
+
- test/fixtures/song/with_erb.erb
|
168
|
+
- test/fixtures/song/with_html.erb
|
169
|
+
- test/fixtures/song/with_locals.erb
|
170
|
+
- test/fixtures/song_with_layout/happy.erb
|
171
|
+
- test/fixtures/song_with_layout/merry.erb
|
172
|
+
- test/fixtures/song_with_layout/show.erb
|
173
|
+
- test/fixtures/song_with_layout/show_with_layout.erb
|
174
|
+
- test/fixtures/templates_caching_test/song/show.erb
|
175
|
+
- test/fixtures/url_helper_test/song/edit.erb
|
176
|
+
- test/fixtures/url_helper_test/song/with_block.erb
|
177
|
+
- test/fixtures/url_helper_test/song/with_capture.erb
|
178
|
+
- test/fixtures/url_helper_test/song/with_content_tag.erb
|
179
|
+
- test/fixtures/url_helper_test/song/with_form_for_block.erb
|
180
|
+
- test/fixtures/url_helper_test/song/with_link_to.erb
|
181
|
+
- test/layout_test.rb
|
182
|
+
- test/partial_test.rb
|
340
183
|
- test/prefixes_test.rb
|
341
|
-
- test/
|
342
|
-
- test/
|
343
|
-
- test/
|
344
|
-
- test/
|
345
|
-
- test/rails/forms_test.rb
|
346
|
-
- test/rails/integration_test.rb
|
347
|
-
- test/rails/render_test.rb
|
348
|
-
- test/rails/view_model_test.rb
|
349
|
-
- test/rails/view_test.rb
|
350
|
-
- test/rails_helper_api_test.rb
|
351
|
-
- test/self_contained_test.rb
|
184
|
+
- test/public_test.rb
|
185
|
+
- test/rails_extensions_test.rb
|
186
|
+
- test/render_test.rb
|
187
|
+
- test/templates_test.rb
|
352
188
|
- test/test_case_test.rb
|
353
189
|
- test/test_helper.rb
|
354
190
|
- test/twin_test.rb
|
355
|
-
|
191
|
+
- test/url_helper_test.rb
|
192
|
+
homepage: https://github.com/apotonick/cells
|
356
193
|
licenses:
|
357
194
|
- MIT
|
358
195
|
metadata: {}
|
@@ -367,115 +204,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
367
204
|
version: '0'
|
368
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
369
206
|
requirements:
|
370
|
-
- - "
|
207
|
+
- - ">"
|
371
208
|
- !ruby/object:Gem::Version
|
372
|
-
version:
|
209
|
+
version: 1.3.1
|
373
210
|
requirements: []
|
374
211
|
rubyforge_project:
|
375
212
|
rubygems_version: 2.2.2
|
376
213
|
signing_key:
|
377
214
|
specification_version: 4
|
378
|
-
summary: View
|
379
|
-
test_files:
|
380
|
-
- test/app/cells/album/views/cover.haml
|
381
|
-
- test/app/cells/bad_guitarist/_dii.html.erb
|
382
|
-
- test/app/cells/bad_guitarist_cell.rb
|
383
|
-
- test/app/cells/bassist/_dii.html.erb
|
384
|
-
- test/app/cells/bassist/ahem.html.erb
|
385
|
-
- test/app/cells/bassist/compose.html.erb
|
386
|
-
- test/app/cells/bassist/contact_form.html.erb
|
387
|
-
- test/app/cells/bassist/form_for.erb
|
388
|
-
- test/app/cells/bassist/form_for_in_haml.haml
|
389
|
-
- test/app/cells/bassist/jam.html.erb
|
390
|
-
- test/app/cells/bassist/play.html.erb
|
391
|
-
- test/app/cells/bassist/play.js.erb
|
392
|
-
- test/app/cells/bassist/pose.html.erb
|
393
|
-
- test/app/cells/bassist/promote.html.erb
|
394
|
-
- test/app/cells/bassist/provoke.html.erb
|
395
|
-
- test/app/cells/bassist/shout.html.erb
|
396
|
-
- test/app/cells/bassist/sing.html.haml
|
397
|
-
- test/app/cells/bassist/slap.html.erb
|
398
|
-
- test/app/cells/bassist/yell.en.html.erb
|
399
|
-
- test/app/cells/bassist_cell.rb
|
400
|
-
- test/app/cells/club_security.rb
|
401
|
-
- test/app/cells/club_security/guard/help.html.erb
|
402
|
-
- test/app/cells/club_security/guard_cell.rb
|
403
|
-
- test/app/cells/club_security/medic/help.html.erb
|
404
|
-
- test/app/cells/club_security/medic_cell.rb
|
405
|
-
- test/app/cells/layouts/b.erb
|
406
|
-
- test/app/cells/layouts/metal.html.erb
|
407
|
-
- test/app/cells/rails_helper_api_test/bassist/edit.html.erb
|
408
|
-
- test/app/cells/shouter/sing.html.erb
|
409
|
-
- test/app/cells/song/dashboard.haml
|
410
|
-
- test/app/cells/song/details.html.haml
|
411
|
-
- test/app/cells/song/info.html.haml
|
412
|
-
- test/app/cells/song/lyrics.html.haml
|
413
|
-
- test/app/cells/song/plays.haml
|
414
|
-
- test/app/cells/song/scale.haml
|
415
|
-
- test/app/cells/song/show.html.haml
|
416
|
-
- test/app/cells/song/title.html.haml
|
417
|
-
- test/app/cells/trumpeter/promote.html.erb
|
418
|
-
- test/app/cells/trumpeter_cell.rb
|
419
|
-
- test/app/cells/view_model_test/comments/show.haml
|
420
|
-
- test/app/concepts/record/views/layout.haml
|
421
|
-
- test/app/concepts/record/views/show.erb
|
422
|
-
- test/app/concepts/record/views/song.erb
|
423
|
-
- test/app/views/shared/_dong.html.erb
|
424
|
-
- test/cell_generator_test.rb
|
425
|
-
- test/cell_module_test.rb
|
426
|
-
- test/cell_test.rb
|
427
|
-
- test/cells_module_test.rb
|
428
|
-
- test/concept_generator_test.rb
|
429
|
-
- test/concept_test.rb
|
430
|
-
- test/deprecations_test.rb
|
431
|
-
- test/dummy/Rakefile
|
432
|
-
- test/dummy/app/assets/javascripts/application.js
|
433
|
-
- test/dummy/app/cells/album/assets/album.js
|
434
|
-
- test/dummy/app/concepts/song/assets/songs.js
|
435
|
-
- test/dummy/app/controllers/application_controller.rb
|
436
|
-
- test/dummy/app/helpers/application_helper.rb
|
437
|
-
- test/dummy/app/views/layouts/application.html.erb
|
438
|
-
- test/dummy/app/views/musician/featured.html.erb
|
439
|
-
- test/dummy/app/views/musician/featured_with_block.html.erb
|
440
|
-
- test/dummy/app/views/musician/hamlet.html.haml
|
441
|
-
- test/dummy/app/views/musician/title.erb
|
442
|
-
- test/dummy/config.ru
|
443
|
-
- test/dummy/config/application.rb
|
444
|
-
- test/dummy/config/boot.rb
|
445
|
-
- test/dummy/config/database.yml
|
446
|
-
- test/dummy/config/environment.rb
|
447
|
-
- test/dummy/config/environments/development.rb
|
448
|
-
- test/dummy/config/environments/production.rb
|
449
|
-
- test/dummy/config/environments/test.rb
|
450
|
-
- test/dummy/config/locales/en.yml
|
451
|
-
- test/dummy/config/routes.rb
|
452
|
-
- test/dummy/db/test.sqlite3
|
453
|
-
- test/dummy/label/app/cells/label/show.erb
|
454
|
-
- test/dummy/label/app/cells/label_cell.rb
|
455
|
-
- test/dummy/label/label.gemspec
|
456
|
-
- test/dummy/label/lib/label.rb
|
457
|
-
- test/dummy/label/lib/label/version.rb
|
458
|
-
- test/dummy/log/production.log
|
459
|
-
- test/dummy/log/server.log
|
460
|
-
- test/dummy/public/404.html
|
461
|
-
- test/dummy/public/422.html
|
462
|
-
- test/dummy/public/500.html
|
463
|
-
- test/dummy/public/favicon.ico
|
464
|
-
- test/dummy/public/stylesheets/.gitkeep
|
465
|
-
- test/dummy/script/rails
|
466
|
-
- test/helper_test.rb
|
467
|
-
- test/prefixes_test.rb
|
468
|
-
- test/rack_test.rb
|
469
|
-
- test/rails/asset_pipeline_test.rb
|
470
|
-
- test/rails/caching_test.rb
|
471
|
-
- test/rails/cells_test.rb
|
472
|
-
- test/rails/forms_test.rb
|
473
|
-
- test/rails/integration_test.rb
|
474
|
-
- test/rails/render_test.rb
|
475
|
-
- test/rails/view_model_test.rb
|
476
|
-
- test/rails/view_test.rb
|
477
|
-
- test/rails_helper_api_test.rb
|
478
|
-
- test/self_contained_test.rb
|
479
|
-
- test/test_case_test.rb
|
480
|
-
- test/test_helper.rb
|
481
|
-
- test/twin_test.rb
|
215
|
+
summary: View Models for Rails.
|
216
|
+
test_files: []
|