cells 3.8.4 → 3.8.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.textile CHANGED
@@ -1,3 +1,7 @@
1
+ h2. 3.8.5
2
+
3
+ * Fixing the bad release, sorry for the delay - my laptop got stolen.
4
+
1
5
  h2. 3.8.4
2
6
 
3
7
  * Added @Cell::Rack@ for request-dependent Cells. This is also the new base class for @Cells::Rails@.
data/lib/cell/base.rb CHANGED
@@ -2,36 +2,21 @@ require 'abstract_controller'
2
2
  require 'cell/builder'
3
3
  require 'cell/caching'
4
4
  require 'cell/rendering'
5
+ require 'cell/rails3_0_strategy' if Cells.rails3_0?
6
+ require 'cell/rails3_1_strategy' if Cells.rails3_1_or_more?
5
7
 
6
8
  module Cell
7
9
  class Base < AbstractController::Base
8
- module Utils # TODO: Move to separate file.
9
- def rails3_0?
10
- ::ActionPack::VERSION::MINOR == 0
11
- end
12
-
13
- def rails3_1_or_more?
14
- ::ActionPack::VERSION::MINOR >= 1
15
- end
16
-
17
- def rails3_2_or_more? # FIXME: move to tests.
18
- ::ActionPack::VERSION::MINOR >= 2
19
- end
20
- end
21
-
22
10
  abstract!
23
11
  DEFAULT_VIEW_PATHS = [File.join('app', 'cells')]
24
12
 
25
- extend Builder, Utils
13
+ extend Builder
26
14
  include AbstractController
27
15
  include AbstractController::Rendering, Layouts, Helpers, Callbacks, Translation, Logger
28
16
 
29
- require 'cell/rails3_0_strategy' if rails3_0?
30
- require 'cell/rails3_1_strategy' if rails3_1_or_more?
31
17
  include VersionStrategy
32
18
  include Rendering
33
- #include Caching
34
-
19
+ include Caching
35
20
 
36
21
  class View < ActionView::Base
37
22
  def render(*args, &block)
@@ -4,16 +4,15 @@ module Cell
4
4
  module VersionStrategy
5
5
  extend ActiveSupport::Concern
6
6
 
7
- #include AbstractController::UrlFor # must be included before _routes is set in Railstie.
7
+ include AbstractController::UrlFor # must be included before _routes is set in Railstie.
8
8
 
9
9
 
10
10
  module ClassMethods
11
11
  def view_context_class
12
12
  @view_context_class ||= begin
13
- routes = _routes # if respond_to?(:_routes)
14
- helpers = _helpers# if respond_to?(:_helpers)
15
-
16
- Cell::Base::View.prepare(routes, helpers)
13
+ routes = _routes #if respond_to?(:_routes)
14
+ helpers = _helpers #if respond_to?(:_helpers)
15
+ Cell::Rails::View.prepare(routes, helpers)
17
16
  end
18
17
  end
19
18
  end
data/lib/cells.rb CHANGED
@@ -71,7 +71,17 @@ module Cells
71
71
  yield(Cell::Rails)
72
72
  end
73
73
 
74
+ def self.rails3_0?
75
+ ::Rails::VERSION::MINOR == 0
76
+ end
77
+
78
+ def self.rails3_1_or_more?
79
+ ::Rails::VERSION::MINOR >= 1
80
+ end
74
81
 
82
+ def self.rails3_2_or_more? # FIXME: move to tests.
83
+ ::Rails::VERSION::MINOR >= 2
84
+ end
75
85
  end
76
86
 
77
87
  require 'cell/rails'
data/lib/cells/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cells
2
- VERSION = '3.8.4'
2
+ VERSION = '3.8.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.4
4
+ version: 3.8.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-16 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
16
- requirement: &79267830 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *79267830
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: railties
27
- requirement: &79266900 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '3.0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *79266900
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rake
38
- requirement: &79266060 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *79266060
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: shoulda
49
- requirement: &79264770 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *79264770
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: haml
60
- requirement: &79264410 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *79264410
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: slim
71
- requirement: &79263450 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: '0'
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *79263450
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: tzinfo
82
- requirement: &79261530 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: '0'
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *79261530
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: minitest
93
- requirement: &79258660 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,7 +133,12 @@ dependencies:
98
133
  version: 2.8.1
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *79258660
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 2.8.1
102
142
  description: Cells are view components for Rails. They are lightweight controllers,
103
143
  can be rendered in views and thus provide an elegant and fast way for encapsulation
104
144
  and component-orientation.
@@ -247,8 +287,85 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
287
  version: '0'
248
288
  requirements: []
249
289
  rubyforge_project:
250
- rubygems_version: 1.8.10
290
+ rubygems_version: 1.8.24
251
291
  signing_key:
252
292
  specification_version: 3
253
293
  summary: View Components for Rails.
254
- test_files: []
294
+ test_files:
295
+ - test/app/cells/bad_guitarist/_dii.html.erb
296
+ - test/app/cells/bad_guitarist_cell.rb
297
+ - test/app/cells/bassist/_dii.html.erb
298
+ - test/app/cells/bassist/ahem.html.erb
299
+ - test/app/cells/bassist/compose.html.erb
300
+ - test/app/cells/bassist/contact_form.html.erb
301
+ - test/app/cells/bassist/jam.html.erb
302
+ - test/app/cells/bassist/play.html.erb
303
+ - test/app/cells/bassist/play.js.erb
304
+ - test/app/cells/bassist/pose.html.erb
305
+ - test/app/cells/bassist/promote.html.erb
306
+ - test/app/cells/bassist/provoke.html.erb
307
+ - test/app/cells/bassist/shout.html.erb
308
+ - test/app/cells/bassist/sing.html.haml
309
+ - test/app/cells/bassist/slap.html.erb
310
+ - test/app/cells/bassist/yell.en.html.erb
311
+ - test/app/cells/bassist_cell.rb
312
+ - test/app/cells/club_security.rb
313
+ - test/app/cells/club_security/guard/help.html.erb
314
+ - test/app/cells/club_security/guard_cell.rb
315
+ - test/app/cells/club_security/medic/help.html.erb
316
+ - test/app/cells/club_security/medic_cell.rb
317
+ - test/app/cells/layouts/b.erb
318
+ - test/app/cells/layouts/metal.html.erb
319
+ - test/app/cells/producer/capture.html.erb
320
+ - test/app/cells/producer/content_for.html.erb
321
+ - test/app/cells/shouter/sing.html.erb
322
+ - test/app/cells/trumpeter/promote.html.erb
323
+ - test/app/cells/trumpeter_cell.rb
324
+ - test/cell_generator_test.rb
325
+ - test/cell_module_test.rb
326
+ - test/cells_module_test.rb
327
+ - test/deprecations_test.rb
328
+ - test/dummy/Rakefile
329
+ - test/dummy/app/controllers/application_controller.rb
330
+ - test/dummy/app/controllers/musician_controller.rb
331
+ - test/dummy/app/helpers/application_helper.rb
332
+ - test/dummy/app/views/layouts/application.html.erb
333
+ - test/dummy/app/views/musician/featured.html.erb
334
+ - test/dummy/app/views/musician/featured_with_block.html.erb
335
+ - test/dummy/app/views/musician/hamlet.html.haml
336
+ - test/dummy/config.ru
337
+ - test/dummy/config/application.rb
338
+ - test/dummy/config/boot.rb
339
+ - test/dummy/config/database.yml
340
+ - test/dummy/config/environment.rb
341
+ - test/dummy/config/environments/development.rb
342
+ - test/dummy/config/environments/production.rb
343
+ - test/dummy/config/environments/test.rb
344
+ - test/dummy/config/locales/en.yml
345
+ - test/dummy/config/routes.rb
346
+ - test/dummy/db/test.sqlite3
347
+ - test/dummy/log/production.log
348
+ - test/dummy/log/server.log
349
+ - test/dummy/public/404.html
350
+ - test/dummy/public/422.html
351
+ - test/dummy/public/500.html
352
+ - test/dummy/public/favicon.ico
353
+ - test/dummy/public/javascripts/application.js
354
+ - test/dummy/public/javascripts/controls.js
355
+ - test/dummy/public/javascripts/dragdrop.js
356
+ - test/dummy/public/javascripts/effects.js
357
+ - test/dummy/public/javascripts/prototype.js
358
+ - test/dummy/public/javascripts/rails.js
359
+ - test/dummy/public/stylesheets/.gitkeep
360
+ - test/dummy/script/rails
361
+ - test/helper_test.rb
362
+ - test/rack_test.rb
363
+ - test/rails/caching_test.rb
364
+ - test/rails/capture_test.rb
365
+ - test/rails/cells_test.rb
366
+ - test/rails/integration_test.rb
367
+ - test/rails/render_test.rb
368
+ - test/rails/router_test.rb
369
+ - test/rails/view_test.rb
370
+ - test/test_case_test.rb
371
+ - test/test_helper.rb