cells 3.8.2 → 3.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.textile +4 -0
- data/lib/cell/rails3_0_strategy.rb +4 -0
- data/lib/cell/rails3_1_strategy.rb +4 -0
- data/lib/cells/engines.rb +3 -3
- data/lib/cells/version.rb +1 -1
- data/test/rails/caching_test.rb +5 -25
- metadata +85 -121
data/CHANGES.textile
CHANGED
data/lib/cells/engines.rb
CHANGED
@@ -31,7 +31,7 @@ module Cells
|
|
31
31
|
# end
|
32
32
|
#
|
33
33
|
module Engines
|
34
|
-
extend VersionStrategy # adds #registered_engines.
|
34
|
+
extend VersionStrategy # adds #registered_engines and #existent_directories_for.
|
35
35
|
|
36
36
|
# Appends all <tt>Rails::Engine</tt>s cell-views path to Cell::Base#view_paths
|
37
37
|
#
|
@@ -42,7 +42,7 @@ module Cells
|
|
42
42
|
def self.append_engines_view_paths_for(config)
|
43
43
|
return if config.view_path_engines == false
|
44
44
|
|
45
|
-
engines = config.view_path_engines || registered_engines#::Rails::Application::Railties.engines
|
45
|
+
engines = config.view_path_engines || registered_engines #::Rails::Application::Railties.engines
|
46
46
|
engines.each {|engine| append_engine_view_path!(engine) }
|
47
47
|
end
|
48
48
|
|
@@ -55,7 +55,7 @@ module Cells
|
|
55
55
|
#
|
56
56
|
def self.append_engine_view_path!(engine)
|
57
57
|
engine.paths['app/cell_views'] || engine.paths.add('app/cell_views', :with => 'app/cells')
|
58
|
-
Cell::Rails.append_view_path(engine.paths["app/cell_views"]
|
58
|
+
Cell::Rails.append_view_path(existent_directories_for(engine.paths["app/cell_views"]))
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/lib/cells/version.rb
CHANGED
data/test/rails/caching_test.rb
CHANGED
@@ -28,43 +28,23 @@ class CachingUnitTest < ActiveSupport::TestCase
|
|
28
28
|
|
29
29
|
context ".state_cache_key" do
|
30
30
|
should "accept state only" do
|
31
|
-
|
32
|
-
assert_equal "cells/Array/director/count/", @class.state_cache_key(:count)
|
33
|
-
else
|
34
|
-
assert_equal "cells/director/count/", @class.state_cache_key(:count)
|
35
|
-
end
|
31
|
+
assert_equal "cells/director/count/", @class.state_cache_key(:count)
|
36
32
|
end
|
37
33
|
|
38
34
|
should "accept hash as key parts" do
|
39
|
-
|
40
|
-
assert_equal "cells/Array/director/count/a=1&b=2", @class.state_cache_key(:count, :b=>2, :a=>1)
|
41
|
-
else
|
42
|
-
assert_equal "cells/director/count/a=1&b=2", @class.state_cache_key(:count, :b=>2, :a=>1)
|
43
|
-
end
|
35
|
+
assert_equal "cells/director/count/a=1&b=2", @class.state_cache_key(:count, :b=>2, :a=>1)
|
44
36
|
end
|
45
37
|
|
46
38
|
should "accept array as key parts" do
|
47
|
-
|
48
|
-
assert_equal "cells/Array/director/count/Array/1/2/3", @class.state_cache_key(:count, [1,2,3])
|
49
|
-
else
|
50
|
-
assert_equal "cells/director/count/1/2/3", @class.state_cache_key(:count, [1,2,3])
|
51
|
-
end
|
39
|
+
assert_equal "cells/director/count/1/2/3", @class.state_cache_key(:count, [1,2,3])
|
52
40
|
end
|
53
41
|
|
54
42
|
should "accept string as key parts" do
|
55
|
-
|
56
|
-
assert_equal "cells/Array/director/count/1/2", @class.state_cache_key(:count, "1/2")
|
57
|
-
else
|
58
|
-
assert_equal "cells/director/count/1/2", @class.state_cache_key(:count, "1/2")
|
59
|
-
end
|
43
|
+
assert_equal "cells/director/count/1/2", @class.state_cache_key(:count, "1/2")
|
60
44
|
end
|
61
45
|
|
62
46
|
should "accept nil as key parts" do
|
63
|
-
|
64
|
-
assert_equal "cells/Array/director/count/", @class.state_cache_key(:count, nil)
|
65
|
-
else
|
66
|
-
assert_equal "cells/director/count/", @class.state_cache_key(:count, nil)
|
67
|
-
end
|
47
|
+
assert_equal "cells/director/count/", @class.state_cache_key(:count, nil)
|
68
48
|
end
|
69
49
|
end
|
70
50
|
|
metadata
CHANGED
@@ -1,140 +1,113 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 3
|
7
|
-
- 8
|
8
|
-
- 2
|
9
|
-
version: 3.8.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.8.3
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Nick Sutterer
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: actionpack
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &78710300 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 3
|
30
|
-
- 0
|
31
|
-
version: "3.0"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: railties
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: *78710300
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: railties
|
27
|
+
requirement: &78710010 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
29
|
+
requirements:
|
40
30
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
- 3
|
44
|
-
- 0
|
45
|
-
version: "3.0"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
46
33
|
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rake
|
50
34
|
prerelease: false
|
51
|
-
|
35
|
+
version_requirements: *78710010
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
38
|
+
requirement: &78709820 !ruby/object:Gem::Requirement
|
52
39
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
- 0
|
58
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
59
44
|
type: :development
|
60
|
-
version_requirements: *id003
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: shoulda
|
63
45
|
prerelease: false
|
64
|
-
|
46
|
+
version_requirements: *78709820
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: shoulda
|
49
|
+
requirement: &78709590 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
70
|
-
- 0
|
71
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
72
55
|
type: :development
|
73
|
-
version_requirements: *id004
|
74
|
-
- !ruby/object:Gem::Dependency
|
75
|
-
name: haml
|
76
56
|
prerelease: false
|
77
|
-
|
57
|
+
version_requirements: *78709590
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: haml
|
60
|
+
requirement: &78709380 !ruby/object:Gem::Requirement
|
78
61
|
none: false
|
79
|
-
requirements:
|
80
|
-
- -
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
|
83
|
-
- 0
|
84
|
-
version: "0"
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
85
66
|
type: :development
|
86
|
-
version_requirements: *id005
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: slim
|
89
67
|
prerelease: false
|
90
|
-
|
68
|
+
version_requirements: *78709380
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: slim
|
71
|
+
requirement: &78709170 !ruby/object:Gem::Requirement
|
91
72
|
none: false
|
92
|
-
requirements:
|
93
|
-
- -
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
|
96
|
-
- 0
|
97
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
98
77
|
type: :development
|
99
|
-
version_requirements: *id006
|
100
|
-
- !ruby/object:Gem::Dependency
|
101
|
-
name: tzinfo
|
102
78
|
prerelease: false
|
103
|
-
|
79
|
+
version_requirements: *78709170
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: tzinfo
|
82
|
+
requirement: &78708950 !ruby/object:Gem::Requirement
|
104
83
|
none: false
|
105
|
-
requirements:
|
106
|
-
- -
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
|
109
|
-
- 0
|
110
|
-
version: "0"
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
111
88
|
type: :development
|
112
|
-
version_requirements: *id007
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: minitest
|
115
89
|
prerelease: false
|
116
|
-
|
90
|
+
version_requirements: *78708950
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: minitest
|
93
|
+
requirement: &78708700 !ruby/object:Gem::Requirement
|
117
94
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
segments:
|
122
|
-
- 2
|
123
|
-
- 8
|
124
|
-
- 1
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
125
98
|
version: 2.8.1
|
126
99
|
type: :development
|
127
|
-
|
128
|
-
|
129
|
-
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *78708700
|
102
|
+
description: Cells are view components for Rails. They are lightweight controllers,
|
103
|
+
can be rendered in views and thus provide an elegant and fast way for encapsulation
|
104
|
+
and component-orientation.
|
105
|
+
email:
|
130
106
|
- apotonick@gmail.com
|
131
107
|
executables: []
|
132
|
-
|
133
108
|
extensions: []
|
134
|
-
|
135
109
|
extra_rdoc_files: []
|
136
|
-
|
137
|
-
files:
|
110
|
+
files:
|
138
111
|
- .gitignore
|
139
112
|
- .travis.yml
|
140
113
|
- CHANGES.textile
|
@@ -252,37 +225,28 @@ files:
|
|
252
225
|
- test/rails/view_test.rb
|
253
226
|
- test/test_case_test.rb
|
254
227
|
- test/test_helper.rb
|
255
|
-
has_rdoc: true
|
256
228
|
homepage: http://cells.rubyforge.org
|
257
229
|
licenses: []
|
258
|
-
|
259
230
|
post_install_message:
|
260
231
|
rdoc_options: []
|
261
|
-
|
262
|
-
require_paths:
|
232
|
+
require_paths:
|
263
233
|
- lib
|
264
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
234
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
265
235
|
none: false
|
266
|
-
requirements:
|
267
|
-
- -
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
|
270
|
-
|
271
|
-
version: "0"
|
272
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
|
+
requirements:
|
237
|
+
- - ! '>='
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: '0'
|
240
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
273
241
|
none: false
|
274
|
-
requirements:
|
275
|
-
- -
|
276
|
-
- !ruby/object:Gem::Version
|
277
|
-
|
278
|
-
- 0
|
279
|
-
version: "0"
|
242
|
+
requirements:
|
243
|
+
- - ! '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
280
246
|
requirements: []
|
281
|
-
|
282
247
|
rubyforge_project:
|
283
|
-
rubygems_version: 1.
|
248
|
+
rubygems_version: 1.8.10
|
284
249
|
signing_key:
|
285
250
|
specification_version: 3
|
286
251
|
summary: View Components for Rails.
|
287
252
|
test_files: []
|
288
|
-
|