radiant-archive-extension 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,13 @@
|
|
1
1
|
module ArchiveMenuRenderer
|
2
2
|
def excluded_class_names
|
3
3
|
excluded_from_this = Array(ArchiveMenuRenderer.instance_variable_get(:@excluded_class_names))
|
4
|
-
|
5
|
-
|
4
|
+
excluded_from_this << 'ArchivePage'
|
5
|
+
result = if defined?(super)
|
6
|
+
super + excluded_from_this
|
7
|
+
else
|
8
|
+
excluded_from_this
|
6
9
|
end
|
7
|
-
excluded_from_this
|
10
|
+
excluded_from_this - ['ArchiveDayIndexPage', 'ArchiveMonthIndexPage', 'ArchiveYearIndexPage']
|
8
11
|
end
|
9
12
|
end
|
10
13
|
|
@@ -5,6 +5,11 @@ module AnotherMenuRenderer
|
|
5
5
|
['AnotherPage']
|
6
6
|
end
|
7
7
|
end
|
8
|
+
module ArchiveExcludingMenuRenderer
|
9
|
+
def excluded_class_names
|
10
|
+
['ArchiveDayIndexPage','ArchiveMonthIndexPage','ArchiveYearIndexPage']
|
11
|
+
end
|
12
|
+
end
|
8
13
|
|
9
14
|
describe ArchiveMenuRenderer do
|
10
15
|
context 'excluding classes from child list' do
|
@@ -22,6 +27,22 @@ describe ArchiveMenuRenderer do
|
|
22
27
|
page.excluded_class_names.should include('AnotherPage')
|
23
28
|
end
|
24
29
|
end
|
30
|
+
context 'excluded_class_names' do
|
31
|
+
before{
|
32
|
+
ArchiveMenuRenderer.instance_variable_set(:@excluded_class_names, ['SkippedPage'])
|
33
|
+
}
|
34
|
+
let(:page){
|
35
|
+
page = Object.new
|
36
|
+
page.extend ArchiveExcludingMenuRenderer
|
37
|
+
page.extend ArchiveMenuRenderer
|
38
|
+
page
|
39
|
+
}
|
40
|
+
subject{ page }
|
41
|
+
its(:excluded_class_names){ should_not include('ArchiveDayIndexPage') }
|
42
|
+
its(:excluded_class_names){ should_not include('ArchiveMonthIndexPage') }
|
43
|
+
its(:excluded_class_names){ should_not include('ArchiveYearIndexPage') }
|
44
|
+
its(:excluded_class_names){ should include('ArchivePage') }
|
45
|
+
end
|
25
46
|
end
|
26
47
|
|
27
48
|
describe ArchiveDayIndexMenuRenderer do
|
metadata
CHANGED
@@ -1,33 +1,23 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-archive-extension
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.6
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 5
|
10
|
-
version: 1.0.5
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Radiant CMS Dev Team
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-11-06 00:00:00 Z
|
12
|
+
date: 2011-11-06 00:00:00.000000000Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
14
|
description: Provides page types for news or blog archives.
|
22
|
-
email:
|
15
|
+
email:
|
23
16
|
- radiant@radiantcms.org
|
24
17
|
executables: []
|
25
|
-
|
26
18
|
extensions: []
|
27
|
-
|
28
19
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
20
|
+
files:
|
31
21
|
- app/models/archive_day_index_page.rb
|
32
22
|
- app/models/archive_finder.rb
|
33
23
|
- app/models/archive_menu_renderer.rb
|
@@ -65,38 +55,29 @@ files:
|
|
65
55
|
- .gitignore
|
66
56
|
homepage: http://radiantcms.org
|
67
57
|
licenses: []
|
68
|
-
|
69
58
|
post_install_message:
|
70
59
|
rdoc_options: []
|
71
|
-
|
72
|
-
require_paths:
|
60
|
+
require_paths:
|
73
61
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
63
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
|
81
|
-
- 0
|
82
|
-
version: "0"
|
83
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
69
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
version: "0"
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
92
74
|
requirements: []
|
93
|
-
|
94
75
|
rubyforge_project:
|
95
76
|
rubygems_version: 1.8.6
|
96
77
|
signing_key:
|
97
78
|
specification_version: 3
|
98
79
|
summary: Archive for Radiant CMS
|
99
|
-
test_files:
|
80
|
+
test_files:
|
100
81
|
- spec/datasets/archive_dataset.rb
|
101
82
|
- spec/models/archive_day_index_page_spec.rb
|
102
83
|
- spec/models/archive_menu_renderer_spec.rb
|