cells 3.3.7 → 3.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +3 -0
  2. data/about.yml +7 -0
  3. data/cells.gemspec +26 -0
  4. data/lib/cells/version.rb +1 -1
  5. data/test/app/cells/a/another_state.html.erb +1 -0
  6. data/test/app/cells/a/existing_view.html.erb +1 -0
  7. data/test/app/cells/a/inherited_view.html.erb +1 -0
  8. data/test/app/cells/a/inherited_view.js.erb +1 -0
  9. data/test/app/cells/a/view_with_locals.html.erb +1 -0
  10. data/test/app/cells/a/view_with_render_call.html.erb +1 -0
  11. data/test/app/cells/b/existing_view.html.erb +1 -0
  12. data/test/app/cells/b/existing_view.js.erb +1 -0
  13. data/test/app/cells/b/layouts/metal.html.erb +1 -0
  14. data/test/app/cells/b/view_with_render_call.html.erb +1 -0
  15. data/test/app/cells/bassist/jam.html.erb +3 -0
  16. data/test/app/cells/bassist/play.html.erb +1 -0
  17. data/test/app/cells/cells_test_one/renamed_instance_view.html.erb +1 -0
  18. data/test/app/cells/cells_test_one/super_state.html.erb +1 -0
  19. data/test/app/cells/helper_using/state_using_application_helper.html.erb +3 -0
  20. data/test/app/cells/helper_using/state_with_automatic_helper_invocation.html.erb +3 -0
  21. data/test/app/cells/helper_using/state_with_helper_invocation.html.erb +3 -0
  22. data/test/app/cells/helper_using/state_with_helper_method_invocation.html.erb +3 -0
  23. data/test/app/cells/layouts/metal.html.erb +1 -0
  24. data/test/app/cells/my_child/hello.html.erb +1 -0
  25. data/test/app/cells/my_mother/bye.html.erb +1 -0
  26. data/test/app/cells/my_mother/hello.html.erb +1 -0
  27. data/test/app/cells/my_test/_broken_partial.html.erb +1 -0
  28. data/test/app/cells/my_test/_partial.html.erb +1 -0
  29. data/test/app/cells/my_test/state_with_instance_var.html.erb +1 -0
  30. data/test/app/cells/my_test/state_with_link_to.html.erb +3 -0
  31. data/test/app/cells/my_test/state_with_not_included_helper_method.html.erb +8 -0
  32. data/test/app/cells/my_test/view_containing_broken_partial.html.erb +3 -0
  33. data/test/app/cells/my_test/view_containing_nonexistant_partial.html.erb +3 -0
  34. data/test/app/cells/my_test/view_containing_partial.html.erb +3 -0
  35. data/test/app/cells/my_test/view_containing_partial_without_cell_name.html.erb +3 -0
  36. data/test/app/cells/my_test/view_in_local_test_views_dir.html.erb +1 -0
  37. data/test/app/cells/my_test/view_with_explicit_english_translation.en.html.erb +1 -0
  38. data/test/app/cells/my_test/view_with_explicit_english_translation.html.erb +1 -0
  39. data/test/app/cells/my_test/view_with_instance_var.html.erb +4 -0
  40. data/test/app/cells/really_module/nested/happy_state.html.erb +1 -0
  41. data/test/app/cells/simple/two_templates_state.html.mytpl +1 -0
  42. data/test/app/cells/test/beep.html.erb +1 -0
  43. data/test/app/cells/test/state_invoking_capture.html.erb +7 -0
  44. data/test/app/cells/test/state_invoking_content_for.html.erb +7 -0
  45. data/test/app/cells/test/state_invoking_content_for_twice.html.erb +9 -0
  46. data/test/app/cells/test/state_with_not_included_helper_method.html.erb +8 -0
  47. data/test/app/cells/two_helpers_including/state_using_another_helper.html.erb +3 -0
  48. metadata +65 -55
  49. data/Gemfile.lock +0 -40
  50. data/test/dummy/tmp/app/cells/blog/post_cell.rb +0 -7
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .*~
@@ -0,0 +1,7 @@
1
+ author: Nick Sutterer, Peter Bex, Bob Leers
2
+ summary: Cells are lightweight controllers for Rails and can be rendered in controllers and views, providing an elegant and fast way for encapsulation and component-orientation.
3
+ homepage: http://cells.rubyforge.org
4
+ plugin:
5
+ license: MIT
6
+ version: 1.1
7
+ rails_version: 2.1
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib/', __FILE__)
3
+ $:.unshift lib unless $:.include?(lib)
4
+
5
+ require 'cells/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "cells"
9
+ s.version = Cells::VERSION
10
+ s.platform = Gem::Platform::RUBY
11
+ s.authors = ["Nick Sutterer"]
12
+ s.email = ["apotonick@gmail.com"]
13
+ s.homepage = "http://cells.rubyforge.org"
14
+ s.summary = %q{View Components for Rails.}
15
+ s.description = %q{Cells are view components for Rails. They are lightweight controllers, can be rendered in views and thus provide an elegant and fast way for encapsulation and component-orientation.}
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency "rails", "~> 2.3"
23
+
24
+ s.add_development_dependency "shoulda"
25
+ s.add_development_dependency "active_helper"
26
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Cells
4
- VERSION = '3.3.7'
4
+ VERSION = '3.3.8'
5
5
  end
@@ -0,0 +1 @@
1
+ A/another_state/<%= @a %>,<%= @b %>
@@ -0,0 +1 @@
1
+ A/existing_view/<%= @a %>
@@ -0,0 +1 @@
1
+ A/inherited_view/<%= @a %>
@@ -0,0 +1 @@
1
+ A/inherited_view/<%= @a %>/js
@@ -0,0 +1 @@
1
+ A/view_with_locals/<%= @a %>/<%= name %>
@@ -0,0 +1 @@
1
+ A/view_with_render_call/<%= @a %>:<%= render :view => :existing_view %>
@@ -0,0 +1 @@
1
+ B/existing_view/<%= @b %>
@@ -0,0 +1 @@
1
+ B/existing_view/<%= @b %>/js
@@ -0,0 +1 @@
1
+ B-Metal:<%= @content_for_layout %>
@@ -0,0 +1 @@
1
+ B/view_with_render_call/<%= @a %>:<%= render :view => :inherited_view %>
@@ -0,0 +1,3 @@
1
+ <% @chords.each do |chord| %>
2
+ <%= render :state => :play %>
3
+ <% end %>
@@ -0,0 +1 @@
1
+ <p id="renamedInstanceView" />
@@ -0,0 +1 @@
1
+ <p id="superStateView"><%= @my_class %></p>
@@ -0,0 +1,3 @@
1
+ <p id="stateUsingApplicationHelper">
2
+ <%= application_helper_method %>
3
+ </p>
@@ -0,0 +1,3 @@
1
+ <p id="stateWithAutomaticHelperInvocation">
2
+ <%= an_automatically_included_helper_method %>
3
+ </p>
@@ -0,0 +1,3 @@
1
+ <p id="stateWithHelperInvocation">
2
+ <%= a_mysterious_helper_method %>
3
+ </p>
@@ -0,0 +1,3 @@
1
+ <p id="stateWithHelperMethodInvocation">
2
+ <%= my_helper_method %>
3
+ </p>
@@ -0,0 +1 @@
1
+ Metal:<%= @content_for_layout %>
@@ -0,0 +1 @@
1
+ <div id="childHello"><%= @message %></div>
@@ -0,0 +1 @@
1
+ <div id="motherBye"><%= @message %></div>
@@ -0,0 +1 @@
1
+ <div id="motherHello"><%= @message %></div>
@@ -0,0 +1 @@
1
+ <%= broken_assignment %>
@@ -0,0 +1 @@
1
+ <div id="partial" />
@@ -0,0 +1,3 @@
1
+ <div id="linkTo">
2
+ <%= link_to :bla %>
3
+ </div>
@@ -0,0 +1,8 @@
1
+ <!-- this cell state utilizes a helper method that is NOT included in the cell. -->
2
+
3
+ <p id="stateWithNotIncludedHelperMethod">
4
+ <%= a_mysterious_helper_method %>
5
+ </p>
6
+
7
+
8
+ <%= form_tag "test" %>
@@ -0,0 +1,3 @@
1
+ <div id="partialContained">
2
+ <%= render :partial => "my_test/broken_partial" %>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div id="partialContained">
2
+ <%= render :partial => "my_test/nonexistant_partial" %>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div id="partialContained">
2
+ <%= render :partial => "my_test/partial" %>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div id="partialContained">
2
+ <%= render :partial => "partial" %>
3
+ </div>
@@ -0,0 +1 @@
1
+ <div id="localView" />
@@ -0,0 +1 @@
1
+ <div id="explicitEnglishTranslation" />
@@ -0,0 +1 @@
1
+ <div id="defaultTranslation" />
@@ -0,0 +1,4 @@
1
+ <div id="view_with_instance_var">
2
+ <div id="one"><%= @instance_variable_one %></div>
3
+ <div id="two"><%= @instance_variable_two %></div>
4
+ </div>
@@ -0,0 +1 @@
1
+ <div id="happyStateView"></div>
@@ -0,0 +1 @@
1
+ Written using my own spiffy templating system
@@ -0,0 +1 @@
1
+ <h1>beep!</h1>
@@ -0,0 +1,7 @@
1
+ <h1>
2
+ <% @captured_block = global_capture :captured_block do %>
3
+ <%= "captured!" %>
4
+ <% end %>
5
+ </h1>
6
+
7
+ <h2><%= @captured_block %></h2>
@@ -0,0 +1,7 @@
1
+ <js>
2
+ <% global_content_for :js do %>
3
+ <%= "first line" %>
4
+ <% end %>
5
+ </js>
6
+
7
+ <%= render :view => :state_invoking_content_for_twice %>
@@ -0,0 +1,9 @@
1
+ <js>
2
+ <% global_content_for :js do %>
3
+ <%= "second line" %>
4
+ <% end %>
5
+
6
+ <% global_content_for :js do %>
7
+ <%= "third line" %>
8
+ <% end %>
9
+ </js>
@@ -0,0 +1,8 @@
1
+ <!-- this cell state utilizes a helper method that is NOT included in the cell. -->
2
+
3
+ <p id="stateWithNotIncludedHelperMethod">
4
+ <%= a_mysterious_helper_method %>
5
+ </p>
6
+
7
+
8
+ <%= form_tag "test" %>
@@ -0,0 +1,3 @@
1
+ <p id="stateUsingAnotherHelper">
2
+ <%= senseless_helper_method %>
3
+ </p>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 3
8
- - 7
9
- version: 3.3.7
8
+ - 8
9
+ version: 3.3.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nick Sutterer
@@ -17,22 +17,10 @@ cert_chain: []
17
17
  date: 2011-07-14 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: cells
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
30
- type: :runtime
31
- prerelease: false
32
- version_requirements: *id001
33
20
  - !ruby/object:Gem::Dependency
34
21
  name: rails
35
- requirement: &id002 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
36
24
  none: false
37
25
  requirements:
38
26
  - - ~>
@@ -42,11 +30,11 @@ dependencies:
42
30
  - 3
43
31
  version: "2.3"
44
32
  type: :runtime
45
- prerelease: false
46
- version_requirements: *id002
33
+ version_requirements: *id001
47
34
  - !ruby/object:Gem::Dependency
48
35
  name: shoulda
49
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
50
38
  none: false
51
39
  requirements:
52
40
  - - ">="
@@ -55,11 +43,11 @@ dependencies:
55
43
  - 0
56
44
  version: "0"
57
45
  type: :development
58
- prerelease: false
59
- version_requirements: *id003
46
+ version_requirements: *id002
60
47
  - !ruby/object:Gem::Dependency
61
48
  name: active_helper
62
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ prerelease: false
50
+ requirement: &id003 !ruby/object:Gem::Requirement
63
51
  none: false
64
52
  requirements:
65
53
  - - ">="
@@ -68,23 +56,25 @@ dependencies:
68
56
  - 0
69
57
  version: "0"
70
58
  type: :development
71
- prerelease: false
72
- version_requirements: *id004
73
- description: Cells are lightweight controllers for Rails and can be rendered in controllers and views, providing an elegant and fast way for encapsulation and component-orientation.
74
- email: apotonick@gmail.com
59
+ version_requirements: *id003
60
+ description: Cells are view components for Rails. They are lightweight controllers, can be rendered in views and thus provide an elegant and fast way for encapsulation and component-orientation.
61
+ email:
62
+ - apotonick@gmail.com
75
63
  executables: []
76
64
 
77
65
  extensions: []
78
66
 
79
- extra_rdoc_files:
80
- - README.rdoc
67
+ extra_rdoc_files: []
68
+
81
69
  files:
70
+ - .gitignore
82
71
  - CHANGES
83
72
  - Gemfile
84
- - Gemfile.lock
85
73
  - MIT-LICENSE
86
74
  - README.rdoc
87
75
  - Rakefile
76
+ - about.yml
77
+ - cells.gemspec
88
78
  - lib/cell.rb
89
79
  - lib/cells.rb
90
80
  - lib/cells/assertions_helper.rb
@@ -112,12 +102,55 @@ files:
112
102
  - rails_generators/cells_install/templates/initializer.rb
113
103
  - rails_generators/cells_install/templates/tasks.rake
114
104
  - test/active_helper_test.rb
105
+ - test/app/cells/a/another_state.html.erb
106
+ - test/app/cells/a/existing_view.html.erb
107
+ - test/app/cells/a/inherited_view.html.erb
108
+ - test/app/cells/a/inherited_view.js.erb
109
+ - test/app/cells/a/view_with_locals.html.erb
110
+ - test/app/cells/a/view_with_render_call.html.erb
111
+ - test/app/cells/b/existing_view.html.erb
112
+ - test/app/cells/b/existing_view.js.erb
113
+ - test/app/cells/b/layouts/metal.html.erb
114
+ - test/app/cells/b/view_with_render_call.html.erb
115
+ - test/app/cells/bassist/jam.html.erb
116
+ - test/app/cells/bassist/play.html.erb
115
117
  - test/app/cells/bassist_cell.rb
118
+ - test/app/cells/cells_test_one/renamed_instance_view.html.erb
119
+ - test/app/cells/cells_test_one/super_state.html.erb
116
120
  - test/app/cells/cells_test_one_cell.rb
117
121
  - test/app/cells/cells_test_two_cell.rb
122
+ - test/app/cells/helper_using/state_using_application_helper.html.erb
123
+ - test/app/cells/helper_using/state_with_automatic_helper_invocation.html.erb
124
+ - test/app/cells/helper_using/state_with_helper_invocation.html.erb
125
+ - test/app/cells/helper_using/state_with_helper_method_invocation.html.erb
126
+ - test/app/cells/layouts/metal.html.erb
127
+ - test/app/cells/my_child/hello.html.erb
128
+ - test/app/cells/my_mother/bye.html.erb
129
+ - test/app/cells/my_mother/hello.html.erb
130
+ - test/app/cells/my_test/_broken_partial.html.erb
131
+ - test/app/cells/my_test/_partial.html.erb
132
+ - test/app/cells/my_test/state_with_instance_var.html.erb
133
+ - test/app/cells/my_test/state_with_link_to.html.erb
134
+ - test/app/cells/my_test/state_with_not_included_helper_method.html.erb
135
+ - test/app/cells/my_test/view_containing_broken_partial.html.erb
136
+ - test/app/cells/my_test/view_containing_nonexistant_partial.html.erb
137
+ - test/app/cells/my_test/view_containing_partial.html.erb
138
+ - test/app/cells/my_test/view_containing_partial_without_cell_name.html.erb
139
+ - test/app/cells/my_test/view_in_local_test_views_dir.html.erb
140
+ - test/app/cells/my_test/view_with_explicit_english_translation.en.html.erb
141
+ - test/app/cells/my_test/view_with_explicit_english_translation.html.erb
142
+ - test/app/cells/my_test/view_with_instance_var.html.erb
143
+ - test/app/cells/really_module/nested/happy_state.html.erb
118
144
  - test/app/cells/really_module/nested_cell.rb
145
+ - test/app/cells/simple/two_templates_state.html.mytpl
119
146
  - test/app/cells/simple_cell.rb
147
+ - test/app/cells/test/beep.html.erb
148
+ - test/app/cells/test/state_invoking_capture.html.erb
149
+ - test/app/cells/test/state_invoking_content_for.html.erb
150
+ - test/app/cells/test/state_invoking_content_for_twice.html.erb
151
+ - test/app/cells/test/state_with_not_included_helper_method.html.erb
120
152
  - test/app/cells/test_cell.rb
153
+ - test/app/cells/two_helpers_including/state_using_another_helper.html.erb
121
154
  - test/app/controllers/cells_test_controller.rb
122
155
  - test/app/helpers/application_helper.rb
123
156
  - test/app/helpers/helper_using_cell_helper.rb
@@ -127,7 +160,6 @@ files:
127
160
  - test/capture_helper_test.rb
128
161
  - test/cell_generator_test.rb
129
162
  - test/cells_test.rb
130
- - test/dummy/tmp/app/cells/blog/post_cell.rb
131
163
  - test/helper_test.rb
132
164
  - test/rails_test.rb
133
165
  - test/render_test.rb
@@ -165,28 +197,6 @@ rubyforge_project:
165
197
  rubygems_version: 1.3.7
166
198
  signing_key:
167
199
  specification_version: 3
168
- summary: Cells are lightweight controllers for Rails and can be rendered in controllers and views, providing an elegant and fast way for encapsulation and component-orientation.
169
- test_files:
170
- - test/active_helper_test.rb
171
- - test/app/cells/bassist_cell.rb
172
- - test/app/cells/cells_test_one_cell.rb
173
- - test/app/cells/cells_test_two_cell.rb
174
- - test/app/cells/really_module/nested_cell.rb
175
- - test/app/cells/simple_cell.rb
176
- - test/app/cells/test_cell.rb
177
- - test/app/controllers/cells_test_controller.rb
178
- - test/app/helpers/application_helper.rb
179
- - test/app/helpers/helper_using_cell_helper.rb
180
- - test/assertions_helper_test.rb
181
- - test/bugs_test.rb
182
- - test/caching_test.rb
183
- - test/capture_helper_test.rb
184
- - test/cell_generator_test.rb
185
- - test/cells_test.rb
186
- - test/dummy/tmp/app/cells/blog/post_cell.rb
187
- - test/helper_test.rb
188
- - test/rails_test.rb
189
- - test/render_test.rb
190
- - test/support/internal_assertions_helper.rb
191
- - test/test_case_test.rb
192
- - test/test_helper.rb
200
+ summary: View Components for Rails.
201
+ test_files: []
202
+
@@ -1,40 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- cells (3.3.6)
5
- rails (~> 2.3)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (2.3.12)
11
- actionpack (= 2.3.12)
12
- actionpack (2.3.12)
13
- activesupport (= 2.3.12)
14
- rack (~> 1.1.0)
15
- active_helper (0.2.2)
16
- activesupport (>= 2.3.0)
17
- activerecord (2.3.12)
18
- activesupport (= 2.3.12)
19
- activeresource (2.3.12)
20
- activesupport (= 2.3.12)
21
- activesupport (2.3.12)
22
- rack (1.1.2)
23
- rails (2.3.12)
24
- actionmailer (= 2.3.12)
25
- actionpack (= 2.3.12)
26
- activerecord (= 2.3.12)
27
- activeresource (= 2.3.12)
28
- activesupport (= 2.3.12)
29
- rake (>= 0.8.3)
30
- rake (0.9.2)
31
- shoulda (2.11.3)
32
-
33
- PLATFORMS
34
- ruby
35
-
36
- DEPENDENCIES
37
- active_helper
38
- cells!
39
- rails (~> 2.3)
40
- shoulda
@@ -1,7 +0,0 @@
1
- class Blog::PostCell < Cell::Rails
2
-
3
- def latest
4
- render
5
- end
6
-
7
- end