strikeroff-simple-navigation 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Manifest +29 -0
- data/README +30 -0
- data/Rakefile +23 -0
- data/generators/navigation_config/USAGE +1 -0
- data/generators/navigation_config/navigation_config_generator.rb +8 -0
- data/generators/navigation_config/templates/config/navigation.rb +55 -0
- data/init.rb +1 -0
- data/install.rb +5 -0
- data/lib/simple_navigation/configuration.rb +66 -0
- data/lib/simple_navigation/controller_methods.rb +79 -0
- data/lib/simple_navigation/helpers.rb +82 -0
- data/lib/simple_navigation/item.rb +89 -0
- data/lib/simple_navigation/item_container.rb +119 -0
- data/lib/simple_navigation/renderer/base.rb +44 -0
- data/lib/simple_navigation/renderer/list.rb +31 -0
- data/lib/simple_navigation.rb +118 -0
- data/rails/init.rb +3 -0
- data/spec/lib/simple_navigation/configuration_spec.rb +162 -0
- data/spec/lib/simple_navigation/controller_methods_spec.rb +73 -0
- data/spec/lib/simple_navigation/helpers_spec.rb +125 -0
- data/spec/lib/simple_navigation/item_container_spec.rb +315 -0
- data/spec/lib/simple_navigation/item_spec.rb +344 -0
- data/spec/lib/simple_navigation/renderer/base_spec.rb +60 -0
- data/spec/lib/simple_navigation/renderer/list_spec.rb +134 -0
- data/spec/lib/simple_navigation_spec.rb +235 -0
- data/spec/spec_helper.rb +17 -0
- data/strikeroff-simple-navigation.gemspec +33 -0
- data/uninstall.rb +1 -0
- metadata +107 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
+
|
3
|
+
describe SimpleNavigation::Renderer::Base do
|
4
|
+
before(:each) do
|
5
|
+
@controller = stub(:controller)
|
6
|
+
SimpleNavigation.stub!(:controller).and_return(@controller)
|
7
|
+
@base_renderer = SimpleNavigation::Renderer::Base.new
|
8
|
+
end
|
9
|
+
it "should inclue ActionView::Helpers::UrlHelper" do
|
10
|
+
@base_renderer.should respond_to(:link_to)
|
11
|
+
end
|
12
|
+
it "should include ActionView::Helpers::TagHelper" do
|
13
|
+
@base_renderer.should respond_to(:content_tag)
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'delegated methods' do
|
17
|
+
it {@base_renderer.should respond_to(:form_authenticity_token)}
|
18
|
+
it {@base_renderer.should respond_to(:protect_against_forgery?)}
|
19
|
+
it {@base_renderer.should respond_to(:request_forgery_protection_token)}
|
20
|
+
end
|
21
|
+
|
22
|
+
describe 'initialize' do
|
23
|
+
it {@base_renderer.controller.should == @controller}
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'controller_method' do
|
27
|
+
context 'delegate a single method' do
|
28
|
+
before(:each) do
|
29
|
+
@base_renderer.class_eval do
|
30
|
+
controller_method :my_method
|
31
|
+
end
|
32
|
+
end
|
33
|
+
it 'should delegate a controller_method to the controller' do
|
34
|
+
@controller.should_receive(:my_method)
|
35
|
+
@base_renderer.my_method
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'delegate multiple methods' do
|
40
|
+
before(:each) do
|
41
|
+
@base_renderer.class_eval do
|
42
|
+
controller_method :test1, :test2
|
43
|
+
end
|
44
|
+
end
|
45
|
+
it 'should delegate all controller_methods to the controller' do
|
46
|
+
@controller.should_receive(:test1)
|
47
|
+
@base_renderer.test1
|
48
|
+
@controller.should_receive(:test2)
|
49
|
+
@base_renderer.test2
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'render' do
|
55
|
+
it "be subclass responsability" do
|
56
|
+
lambda {@base_renderer.render(:container)}.should raise_error('subclass responsibility')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
+
require 'html/document' unless defined? HTML::Document
|
3
|
+
|
4
|
+
describe SimpleNavigation::Renderer::List do
|
5
|
+
|
6
|
+
describe 'render' do
|
7
|
+
|
8
|
+
def sub_items
|
9
|
+
[
|
10
|
+
[:subnav1, 'subnav1', 'subnav1_url', {}, nil],
|
11
|
+
[:subnav2, 'subnav2', 'subnav2_url', {}, nil]
|
12
|
+
]
|
13
|
+
end
|
14
|
+
|
15
|
+
def primary_items
|
16
|
+
[
|
17
|
+
[:users, 'users', 'first_url', {:id => 'my_id'}, nil],
|
18
|
+
[:invoices, 'invoices', 'second_url', {}, nil],
|
19
|
+
[:accounts, 'accounts', 'third_url', {:style => 'float:right'}, nil]
|
20
|
+
]
|
21
|
+
end
|
22
|
+
|
23
|
+
def primary_container
|
24
|
+
container = SimpleNavigation::ItemContainer.new(0)
|
25
|
+
container.dom_id = 'nav_dom_id'
|
26
|
+
container.dom_class = 'nav_dom_class'
|
27
|
+
@items = primary_items.map {|params| SimpleNavigation::Item.new(container, *params)}
|
28
|
+
@items.each {|i| i.stub!(:selected? => false)}
|
29
|
+
container.instance_variable_set(:@items, @items)
|
30
|
+
primary_item(:invoices) {|item| item.instance_variable_set(:@sub_navigation, subnav_container)}
|
31
|
+
container
|
32
|
+
end
|
33
|
+
|
34
|
+
def primary_item(key)
|
35
|
+
yield @items.find {|i| i.key == key}
|
36
|
+
end
|
37
|
+
|
38
|
+
def select_item(key)
|
39
|
+
primary_item(key) {|item| item.stub!(:selected? => true)}
|
40
|
+
end
|
41
|
+
|
42
|
+
def subnav_container
|
43
|
+
container = SimpleNavigation::ItemContainer.new(1)
|
44
|
+
items = sub_items.map {|params| SimpleNavigation::Item.new(container, *params)}
|
45
|
+
items.each {|i| i.stub!(:selected? => false)}
|
46
|
+
container.instance_variable_set(:@items, items)
|
47
|
+
container
|
48
|
+
end
|
49
|
+
|
50
|
+
def render(current_nav=nil, include_subnav=false)
|
51
|
+
primary_navigation = primary_container
|
52
|
+
select_item(current_nav) if current_nav
|
53
|
+
@renderer = SimpleNavigation::Renderer::List.new
|
54
|
+
HTML::Document.new(@renderer.render(primary_navigation, include_subnav)).root
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should render a ul-tag around the items" do
|
58
|
+
HTML::Selector.new('ul').select(render).should have(1).entries
|
59
|
+
end
|
60
|
+
it "the rendered ul-tag should have the specified dom_id" do
|
61
|
+
HTML::Selector.new('ul#nav_dom_id').select(render).should have(1).entries
|
62
|
+
end
|
63
|
+
it "the rendered ul-tag should have the specified class" do
|
64
|
+
HTML::Selector.new('ul.nav_dom_class').select(render).should have(1).entries
|
65
|
+
end
|
66
|
+
it "should render a li tag for each item" do
|
67
|
+
HTML::Selector.new('li').select(render).should have(3).entries
|
68
|
+
end
|
69
|
+
it "should render an a-tag inside each li-tag" do
|
70
|
+
HTML::Selector.new('li a').select(render).should have(3).entries
|
71
|
+
end
|
72
|
+
it "should pass the specified html_options to the li element" do
|
73
|
+
HTML::Selector.new('li[style=float:right]').select(render).should have(1).entries
|
74
|
+
end
|
75
|
+
it "should give the li the id specified in the html_options" do
|
76
|
+
HTML::Selector.new('li#my_id').select(render).should have(1).entries
|
77
|
+
end
|
78
|
+
it "should give the li the default id (stringified key) if no id is specified in the html_options" do
|
79
|
+
HTML::Selector.new('ul li#invoices').select(render).should have(1).entries
|
80
|
+
end
|
81
|
+
it "should not apply the the default id where there is an id specified in the html_options" do
|
82
|
+
HTML::Selector.new('ul li#users').select(render).should be_empty
|
83
|
+
end
|
84
|
+
|
85
|
+
context 'with current_navigation set' do
|
86
|
+
it "should mark the matching li-item as selected (with the css_class specified in configuration)" do
|
87
|
+
HTML::Selector.new('li.selected').select(render(:invoices)).should have(1).entries
|
88
|
+
end
|
89
|
+
it "should also mark the links inside the selected li's as selected" do
|
90
|
+
HTML::Selector.new('li.selected a.selected').select(render(:invoices)).should have(1).entries
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
context 'without current_navigation set' do
|
96
|
+
it "should not mark any of the items as selected" do
|
97
|
+
HTML::Selector.new('li.selected').select(render).should be_empty
|
98
|
+
end
|
99
|
+
it "should not mark any links as selected" do
|
100
|
+
HTML::Selector.new('a.selected').select(render).should be_empty
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
context 'nested sub_navigation' do
|
105
|
+
it "should nest the current_primary's subnavigation inside the selected li-element" do
|
106
|
+
HTML::Selector.new('li.selected ul li').select(render(:invoices, true)).should have(2).entries
|
107
|
+
end
|
108
|
+
it "should be possible to identify sub items using an html selector (using ids)" do
|
109
|
+
HTML::Selector.new('#invoices #subnav1').select(render(:invoices, true)).should have(1).entries
|
110
|
+
end
|
111
|
+
context 'render_all_levels = false' do
|
112
|
+
before(:each) do
|
113
|
+
SimpleNavigation.config.render_all_levels = false
|
114
|
+
end
|
115
|
+
it "should not render the invoices submenu if the user-primary is active" do
|
116
|
+
HTML::Selector.new('#invoices #subnav1').select(render(:users, true)).should be_empty
|
117
|
+
HTML::Selector.new('#invoices #subnav2').select(render(:users, true)).should be_empty
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
context 'render_all_levels = true' do
|
122
|
+
before(:each) do
|
123
|
+
SimpleNavigation.config.render_all_levels = true
|
124
|
+
end
|
125
|
+
it "should render the invoices submenu even if the user-primary is active" do
|
126
|
+
HTML::Selector.new('#invoices #subnav1').select(render(:users, true)).should have(1).entry
|
127
|
+
HTML::Selector.new('#invoices #subnav2').select(render(:users, true)).should have(1).entry
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|
@@ -0,0 +1,235 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe SimpleNavigation do
|
4
|
+
|
5
|
+
describe 'config_files' do
|
6
|
+
before(:each) do
|
7
|
+
SimpleNavigation.config_files = {}
|
8
|
+
end
|
9
|
+
it "should be an empty hash after loading the module" do
|
10
|
+
SimpleNavigation.config_files.should == {}
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'config_file_name' do
|
15
|
+
before(:each) do
|
16
|
+
SimpleNavigation.config_file_path = 'path_to_config'
|
17
|
+
end
|
18
|
+
context 'for :default navigation_context' do
|
19
|
+
it "should return the path to default config file" do
|
20
|
+
SimpleNavigation.config_file_name.should == 'path_to_config/navigation.rb'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'for other navigation_context' do
|
25
|
+
it "should return the path to the config file matching the specified context" do
|
26
|
+
SimpleNavigation.config_file_name(:my_other_context).should == 'path_to_config/my_other_context_navigation.rb'
|
27
|
+
end
|
28
|
+
it "should convert camelcase-contexts to underscore" do
|
29
|
+
SimpleNavigation.config_file_name(:WhyWouldYouDoThis).should == 'path_to_config/why_would_you_do_this_navigation.rb'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'load_config' do
|
35
|
+
context 'config_file_path is set' do
|
36
|
+
before(:each) do
|
37
|
+
SimpleNavigation.config_file_path = 'path_to_config'
|
38
|
+
#SimpleNavigation.stub!(:config_file_name => 'path_to_config/navigation.rb')
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'config_file does exist' do
|
42
|
+
before(:each) do
|
43
|
+
File.stub!(:exists?).and_return(true)
|
44
|
+
IO.stub!(:read).and_return('file_content')
|
45
|
+
end
|
46
|
+
it "should not raise an error" do
|
47
|
+
lambda{SimpleNavigation.load_config}.should_not raise_error
|
48
|
+
end
|
49
|
+
it "should read the specified config file from disc" do
|
50
|
+
IO.should_receive(:read).with('path_to_config/navigation.rb')
|
51
|
+
SimpleNavigation.load_config
|
52
|
+
end
|
53
|
+
it "should store the read content in the module (default context)" do
|
54
|
+
SimpleNavigation.should_receive(:config_file_name).with(:default).twice
|
55
|
+
SimpleNavigation.load_config
|
56
|
+
SimpleNavigation.config_files[:default].should == 'file_content'
|
57
|
+
end
|
58
|
+
it "should store the content in the module (non default context)" do
|
59
|
+
SimpleNavigation.should_receive(:config_file_name).with(:my_context).twice
|
60
|
+
SimpleNavigation.load_config(:my_context)
|
61
|
+
SimpleNavigation.config_files[:my_context].should == 'file_content'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context 'config_file does not exist' do
|
66
|
+
before(:each) do
|
67
|
+
File.stub!(:exists?).and_return(false)
|
68
|
+
end
|
69
|
+
it {lambda{SimpleNavigation.load_config}.should raise_error}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'config_file_path is not set' do
|
74
|
+
before(:each) do
|
75
|
+
SimpleNavigation.config_file_path = nil
|
76
|
+
end
|
77
|
+
it {lambda{SimpleNavigation.load_config}.should raise_error}
|
78
|
+
end
|
79
|
+
|
80
|
+
describe 'regarding caching of the config-files' do
|
81
|
+
before(:each) do
|
82
|
+
IO.stub!(:read).and_return('file_content')
|
83
|
+
SimpleNavigation.config_file_path = 'path_to_config'
|
84
|
+
File.stub!(:exists? => true)
|
85
|
+
end
|
86
|
+
context "RAILS_ENV undefined" do
|
87
|
+
before(:each) do
|
88
|
+
::RAILS_ENV = nil
|
89
|
+
end
|
90
|
+
it "should load the config file twice" do
|
91
|
+
IO.should_receive(:read).twice
|
92
|
+
SimpleNavigation.load_config
|
93
|
+
SimpleNavigation.load_config
|
94
|
+
end
|
95
|
+
end
|
96
|
+
context "RAILS_ENV defined" do
|
97
|
+
before(:each) do
|
98
|
+
::RAILS_ENV = 'production'
|
99
|
+
end
|
100
|
+
context "RAILS_ENV=production" do
|
101
|
+
it "should load the config file only once" do
|
102
|
+
IO.should_receive(:read).once
|
103
|
+
SimpleNavigation.load_config
|
104
|
+
SimpleNavigation.load_config
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
context "RAILS_ENV=development" do
|
109
|
+
before(:each) do
|
110
|
+
::RAILS_ENV = 'development'
|
111
|
+
end
|
112
|
+
it "should load the config file twice" do
|
113
|
+
IO.should_receive(:read).twice
|
114
|
+
SimpleNavigation.load_config
|
115
|
+
SimpleNavigation.load_config
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
context "RAILS_ENV=test" do
|
120
|
+
before(:each) do
|
121
|
+
::RAILS_ENV = 'test'
|
122
|
+
end
|
123
|
+
it "should load the config file twice" do
|
124
|
+
IO.should_receive(:read).twice
|
125
|
+
SimpleNavigation.load_config
|
126
|
+
SimpleNavigation.load_config
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
after(:each) do
|
131
|
+
SimpleNavigation.config_files = {}
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
describe 'config' do
|
137
|
+
it {SimpleNavigation.config.should == SimpleNavigation::Configuration.instance}
|
138
|
+
end
|
139
|
+
|
140
|
+
describe 'current_navigation_for' do
|
141
|
+
before(:each) do
|
142
|
+
@controller = stub(:controller)
|
143
|
+
SimpleNavigation.stub!(:controller => @controller)
|
144
|
+
end
|
145
|
+
it "should access the correct instance_var in the controller" do
|
146
|
+
@controller.should_receive(:instance_variable_get).with(:@sn_current_navigation_1)
|
147
|
+
SimpleNavigation.current_navigation_for(1)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe 'active_item_container_for' do
|
152
|
+
before(:each) do
|
153
|
+
@primary = stub(:primary)
|
154
|
+
SimpleNavigation.config.stub!(:primary_navigation => @primary)
|
155
|
+
end
|
156
|
+
it "should call active_item_container_for on the primary_navigation with the specified level" do
|
157
|
+
@primary.should_receive(:active_item_container_for).with(1)
|
158
|
+
SimpleNavigation.active_item_container_for 1
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
describe 'handle_explicit_navigation' do
|
163
|
+
def args(*args)
|
164
|
+
SimpleNavigation.stub!(:explicit_navigation_args => args.compact.empty? ? nil : args)
|
165
|
+
end
|
166
|
+
|
167
|
+
before(:each) do
|
168
|
+
@controller = stub(:controller)
|
169
|
+
SimpleNavigation.stub!(:controller => @controller)
|
170
|
+
end
|
171
|
+
|
172
|
+
context 'with explicit navigation set' do
|
173
|
+
context 'list of navigations' do
|
174
|
+
before(:each) do
|
175
|
+
args :first, :second, :third
|
176
|
+
end
|
177
|
+
it "should set the correct instance var in the controller" do
|
178
|
+
@controller.should_receive(:instance_variable_set).with(:@sn_current_navigation_3, :third)
|
179
|
+
SimpleNavigation.handle_explicit_navigation
|
180
|
+
end
|
181
|
+
end
|
182
|
+
context 'single navigation' do
|
183
|
+
context 'specified key is a valid navigation item' do
|
184
|
+
before(:each) do
|
185
|
+
@primary = stub(:primary, :level_for_item => 2)
|
186
|
+
SimpleNavigation.stub!(:primary_navigation => @primary)
|
187
|
+
args :key
|
188
|
+
end
|
189
|
+
it "should set the correct instance var in the controller" do
|
190
|
+
@controller.should_receive(:instance_variable_set).with(:@sn_current_navigation_2, :key)
|
191
|
+
SimpleNavigation.handle_explicit_navigation
|
192
|
+
end
|
193
|
+
end
|
194
|
+
context 'specified key is an invalid navigation item' do
|
195
|
+
before(:each) do
|
196
|
+
@primary = stub(:primary, :level_for_item => nil)
|
197
|
+
SimpleNavigation.stub!(:primary_navigation => @primary)
|
198
|
+
args :key
|
199
|
+
end
|
200
|
+
it "should not raise an ArgumentError" do
|
201
|
+
lambda {SimpleNavigation.handle_explicit_navigation}.should_not raise_error(ArgumentError)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
context 'hash with level' do
|
206
|
+
before(:each) do
|
207
|
+
args :level_2 => :key
|
208
|
+
end
|
209
|
+
it "should set the correct instance var in the controller" do
|
210
|
+
@controller.should_receive(:instance_variable_set).with(:@sn_current_navigation_2, :key)
|
211
|
+
SimpleNavigation.handle_explicit_navigation
|
212
|
+
end
|
213
|
+
end
|
214
|
+
context 'hash with multiple_levels' do
|
215
|
+
before(:each) do
|
216
|
+
args :level_2 => :key, :level_1 => :bla
|
217
|
+
end
|
218
|
+
it "should set the correct instance var in the controller" do
|
219
|
+
@controller.should_receive(:instance_variable_set).with(:@sn_current_navigation_2, :key)
|
220
|
+
SimpleNavigation.handle_explicit_navigation
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
context 'without explicit navigation set' do
|
225
|
+
before(:each) do
|
226
|
+
args nil
|
227
|
+
end
|
228
|
+
it "should not set the current_navigation instance var in the controller" do
|
229
|
+
@controller.should_not_receive(:instance_variable_set)
|
230
|
+
SimpleNavigation.handle_explicit_navigation
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
RAILS_ENV = "test" unless defined? RAILS_ENV
|
3
|
+
require 'rubygems'
|
4
|
+
require 'spec'
|
5
|
+
require 'active_support'
|
6
|
+
require 'action_controller'
|
7
|
+
|
8
|
+
RAILS_ROOT = './' unless defined? RAILS_ROOT
|
9
|
+
|
10
|
+
$:.unshift File.dirname(__FILE__)
|
11
|
+
$:.unshift File.join(File.dirname(__FILE__), '../lib')
|
12
|
+
|
13
|
+
require 'simple_navigation'
|
14
|
+
|
15
|
+
# Spec::Runner.configure do |config|
|
16
|
+
# no special config
|
17
|
+
# endx
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{strikeroff-simple-navigation}
|
5
|
+
s.version = "2.0.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Vesov Ilya"]
|
9
|
+
s.date = %q{2009-11-01}
|
10
|
+
s.description = %q{strikeroff-simple-navigation}
|
11
|
+
s.email = %q{strikeroff@gmail.com}
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG", "lib/simple_navigation/configuration.rb", "lib/simple_navigation/controller_methods.rb", "lib/simple_navigation/helpers.rb", "lib/simple_navigation/item.rb", "lib/simple_navigation/item_container.rb", "lib/simple_navigation/renderer/base.rb", "lib/simple_navigation/renderer/list.rb", "lib/simple_navigation.rb", "README"]
|
13
|
+
s.files = ["CHANGELOG", "generators/navigation_config/navigation_config_generator.rb", "generators/navigation_config/templates/config/navigation.rb", "generators/navigation_config/USAGE", "init.rb", "install.rb", "lib/simple_navigation/configuration.rb", "lib/simple_navigation/controller_methods.rb", "lib/simple_navigation/helpers.rb", "lib/simple_navigation/item.rb", "lib/simple_navigation/item_container.rb", "lib/simple_navigation/renderer/base.rb", "lib/simple_navigation/renderer/list.rb", "lib/simple_navigation.rb", "Manifest", "rails/init.rb", "Rakefile", "README", "spec/lib/simple_navigation/configuration_spec.rb", "spec/lib/simple_navigation/controller_methods_spec.rb", "spec/lib/simple_navigation/helpers_spec.rb", "spec/lib/simple_navigation/item_container_spec.rb", "spec/lib/simple_navigation/item_spec.rb", "spec/lib/simple_navigation/renderer/base_spec.rb", "spec/lib/simple_navigation/renderer/list_spec.rb", "spec/lib/simple_navigation_spec.rb", "spec/spec_helper.rb", "strikeroff-simple-navigation.gemspec", "uninstall.rb"]
|
14
|
+
s.homepage = %q{http://github.com/strikeroff}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Strikeroff-simple-navigation", "--main", "README", "-c utf-8"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{strikeroff-simple-navigation}
|
18
|
+
s.rubygems_version = %q{1.3.5}
|
19
|
+
s.summary = %q{strikeroff-simple-navigation}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
23
|
+
s.specification_version = 3
|
24
|
+
|
25
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
26
|
+
s.add_development_dependency(%q<echoe>, [">= 0"])
|
27
|
+
else
|
28
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
29
|
+
end
|
30
|
+
else
|
31
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
32
|
+
end
|
33
|
+
end
|
data/uninstall.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Uninstall hook code here
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: strikeroff-simple-navigation
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vesov Ilya
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-11-01 00:00:00 +04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: echoe
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
description: strikeroff-simple-navigation
|
26
|
+
email: strikeroff@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- CHANGELOG
|
33
|
+
- lib/simple_navigation/configuration.rb
|
34
|
+
- lib/simple_navigation/controller_methods.rb
|
35
|
+
- lib/simple_navigation/helpers.rb
|
36
|
+
- lib/simple_navigation/item.rb
|
37
|
+
- lib/simple_navigation/item_container.rb
|
38
|
+
- lib/simple_navigation/renderer/base.rb
|
39
|
+
- lib/simple_navigation/renderer/list.rb
|
40
|
+
- lib/simple_navigation.rb
|
41
|
+
- README
|
42
|
+
files:
|
43
|
+
- CHANGELOG
|
44
|
+
- generators/navigation_config/navigation_config_generator.rb
|
45
|
+
- generators/navigation_config/templates/config/navigation.rb
|
46
|
+
- generators/navigation_config/USAGE
|
47
|
+
- init.rb
|
48
|
+
- install.rb
|
49
|
+
- lib/simple_navigation/configuration.rb
|
50
|
+
- lib/simple_navigation/controller_methods.rb
|
51
|
+
- lib/simple_navigation/helpers.rb
|
52
|
+
- lib/simple_navigation/item.rb
|
53
|
+
- lib/simple_navigation/item_container.rb
|
54
|
+
- lib/simple_navigation/renderer/base.rb
|
55
|
+
- lib/simple_navigation/renderer/list.rb
|
56
|
+
- lib/simple_navigation.rb
|
57
|
+
- Manifest
|
58
|
+
- rails/init.rb
|
59
|
+
- Rakefile
|
60
|
+
- README
|
61
|
+
- spec/lib/simple_navigation/configuration_spec.rb
|
62
|
+
- spec/lib/simple_navigation/controller_methods_spec.rb
|
63
|
+
- spec/lib/simple_navigation/helpers_spec.rb
|
64
|
+
- spec/lib/simple_navigation/item_container_spec.rb
|
65
|
+
- spec/lib/simple_navigation/item_spec.rb
|
66
|
+
- spec/lib/simple_navigation/renderer/base_spec.rb
|
67
|
+
- spec/lib/simple_navigation/renderer/list_spec.rb
|
68
|
+
- spec/lib/simple_navigation_spec.rb
|
69
|
+
- spec/spec_helper.rb
|
70
|
+
- strikeroff-simple-navigation.gemspec
|
71
|
+
- uninstall.rb
|
72
|
+
has_rdoc: true
|
73
|
+
homepage: http://github.com/strikeroff
|
74
|
+
licenses: []
|
75
|
+
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options:
|
78
|
+
- --line-numbers
|
79
|
+
- --inline-source
|
80
|
+
- --title
|
81
|
+
- Strikeroff-simple-navigation
|
82
|
+
- --main
|
83
|
+
- README
|
84
|
+
- -c utf-8
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
92
|
+
version:
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: "1.2"
|
98
|
+
version:
|
99
|
+
requirements: []
|
100
|
+
|
101
|
+
rubyforge_project: strikeroff-simple-navigation
|
102
|
+
rubygems_version: 1.3.5
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: strikeroff-simple-navigation
|
106
|
+
test_files: []
|
107
|
+
|