navi 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.gitignore +1 -0
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +3 -0
  4. data/Gemfile +6 -1
  5. data/Gemfile.lock +117 -134
  6. data/README.md +8 -0
  7. data/features/step_definitions/category_steps.rb +1 -1
  8. data/features/step_definitions/page_steps.rb +1 -1
  9. data/features/support/env.rb +7 -2
  10. data/lib/navi.rb +2 -1
  11. data/lib/navi/renderers/base.rb +12 -10
  12. data/lib/navi/renderers/simple_navigation.rb +6 -32
  13. data/lib/navi/renderers/simple_navigation/dynamic_item.rb +18 -0
  14. data/lib/navi/renderers/simple_navigation/dynamic_items.rb +26 -0
  15. data/lib/navi/renderers/simple_navigation/generates_uri.rb +32 -0
  16. data/lib/navi/renderers/simple_navigation/renderer.rb +27 -0
  17. data/lib/navi/version.rb +1 -1
  18. data/navi.gemspec +6 -17
  19. data/spec/dummy/app/assets/javascripts/application.js +1 -1
  20. data/spec/dummy/app/controllers/categories_controller.rb +4 -4
  21. data/spec/dummy/app/controllers/menu_items_controller.rb +11 -4
  22. data/spec/dummy/app/controllers/pages_controller.rb +5 -4
  23. data/spec/dummy/app/views/layouts/application.html.erb +1 -1
  24. data/spec/dummy/config/application.rb +0 -1
  25. data/spec/dummy/config/navigation.rb +0 -0
  26. data/spec/dummy/db/seeds.rb +4 -6
  27. data/spec/dummy/vendor/assets/javascripts/nestedSortable.js +382 -0
  28. data/spec/navi/navi_spec.rb +3 -3
  29. data/spec/navi/navigable_spec.rb +2 -2
  30. data/spec/navi/navigator_spec.rb +7 -7
  31. data/spec/navi/renderers/simple_navigation/dynamic_item_spec.rb +49 -0
  32. data/spec/navi/renderers/simple_navigation/dynamic_items_spec.rb +30 -0
  33. data/spec/navi/renderers/simple_navigation/generates_uri_spec.rb +57 -0
  34. data/spec/navi/renderers/simple_navigation/renderer_spec.rb +41 -0
  35. metadata +229 -142
  36. data/.rvmrc +0 -1
  37. data/spec/navi/renderers/simple_navigation_spec.rb +0 -49
@@ -13,8 +13,8 @@ describe Navi do
13
13
  end
14
14
  end
15
15
 
16
- it "should default to Navi::Renderers::SimpleNavigation" do
17
- Navi.renderer.should == Navi::Renderers::SimpleNavigation
16
+ it "should default to Navi::Renderers::SimpleNavigation::Renderer" do
17
+ Navi.renderer.should == Navi::Renderers::SimpleNavigation::Renderer
18
18
  end
19
19
 
20
20
  it "should allow customization" do
@@ -68,7 +68,7 @@ describe Navi do
68
68
 
69
69
  describe "#to_navigator!" do
70
70
  it "should immediately create the navigator item" do
71
- category = Factory :category
71
+ category = FactoryGirl.create(:category)
72
72
  navigator = category.to_navigator!
73
73
  navigator.should_not be_new_record
74
74
  end
@@ -4,7 +4,7 @@ describe "Navigable" do
4
4
  context "when deleted" do
5
5
  context "and the navigator has a navigable item" do
6
6
  before do
7
- page = Factory :page, :name => "Page name"
7
+ page = FactoryGirl.create(:page, name: "Page name")
8
8
  @menu_item = page.to_navigator!
9
9
  page.destroy
10
10
  @menu_item.reload
@@ -24,7 +24,7 @@ describe "Navigable" do
24
24
 
25
25
  context "and the navigable has no navigator item" do
26
26
  before do
27
- @page = Factory :page, :name => "Page name"
27
+ @page = FactoryGirl.create(:page, name: "Page name")
28
28
  end
29
29
 
30
30
  it "should not blow up" do
@@ -7,7 +7,7 @@ describe MenuItem do
7
7
  MenuItem.new.should_not be_valid
8
8
  MenuItem.new(:label => "Something").should_not be_valid
9
9
  MenuItem.new(:url => "Something").should_not be_valid
10
- MenuItem.new(:navigable => Factory(:page)).should be_valid
10
+ MenuItem.new(:navigable => FactoryGirl.create(:page)).should be_valid
11
11
  MenuItem.new(:label => "", :url => "").should_not be_valid
12
12
  MenuItem.new(:label => "Not blank", :url => "Some url").should be_valid
13
13
  end
@@ -38,9 +38,9 @@ describe MenuItem do
38
38
  "site_id = #{site_id}"
39
39
  end
40
40
  end
41
- Factory(:menu_item, :site_id => 1)
42
- Factory(:menu_item, :site_id => 2)
43
- menu_item = Factory(:menu_item, :site_id => 1)
41
+ FactoryGirl.create(:menu_item, :site_id => 1)
42
+ FactoryGirl.create(:menu_item, :site_id => 2)
43
+ menu_item = FactoryGirl.create(:menu_item, :site_id => 1)
44
44
  menu_item.position.should == 2
45
45
  end
46
46
 
@@ -48,9 +48,9 @@ describe MenuItem do
48
48
  MenuItem.class_eval do
49
49
  ordered_tree :scope => :site
50
50
  end
51
- Factory(:menu_item, :site_id => 3).position.should == 1
52
- Factory(:menu_item, :site_id => 4)
53
- menu_item = Factory(:menu_item, :site_id => 3)
51
+ FactoryGirl.create(:menu_item, :site_id => 3).position.should == 1
52
+ FactoryGirl.create(:menu_item, :site_id => 4)
53
+ menu_item = FactoryGirl.create(:menu_item, :site_id => 3)
54
54
  menu_item.position.should == 2
55
55
  end
56
56
  end
@@ -0,0 +1,49 @@
1
+ require 'spec_helper'
2
+
3
+ describe Navi::Renderers::SimpleNavigation::DynamicItem do
4
+
5
+ let(:template) { double }
6
+
7
+ let(:nav_item) do
8
+ OpenStruct.new(title: 'nav title',
9
+ label: 'item label',
10
+ children: ['child1', 'child2'])
11
+ end
12
+
13
+ subject { described_class.new(template, nav_item, namespace: 'namespace') }
14
+
15
+ before do
16
+ template.stub(:dom_id).with(nav_item) { 'best_dom_id' }
17
+
18
+ Navi::Renderers::SimpleNavigation::GeneratesUri.stub(:execute).
19
+ with(template, nav_item, namespace: 'namespace').
20
+ and_return('my generated url')
21
+
22
+ @dynamic_items = ['dynamic', 'items']
23
+ Navi::Renderers::SimpleNavigation::DynamicItems.stub(:new).
24
+ with(template, nav_item.children, namespace: 'namespace').
25
+ and_return(@dynamic_items)
26
+ end
27
+
28
+ it "should set the key based on the template's dom_id of the nav item" do
29
+ expect(subject[:key]).to eq(:best_dom_id)
30
+ end
31
+
32
+ it 'should set the name from the nav item label' do
33
+ expect(subject[:name]).to eq('item label')
34
+ end
35
+
36
+ it 'should set the url' do
37
+ expect(subject[:url]).to eq('my generated url')
38
+ end
39
+
40
+ it 'should set the options title and class' do
41
+ expect(subject[:options]).to eq({title: 'nav title',
42
+ class: 'open_struct'})
43
+ end
44
+
45
+ it 'should set the items based on the objects given' do
46
+ expect(subject[:items]).to eq(@dynamic_items)
47
+ end
48
+
49
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ describe Navi::Renderers::SimpleNavigation::DynamicItems do
4
+
5
+ describe 'initialization' do
6
+ it 'should be an array of DynamicItem objects, passing any options' do
7
+ template = double
8
+
9
+ nav_item_1 = double
10
+ nav_item_2 = double
11
+ nav_items = [nav_item_1, nav_item_2]
12
+
13
+ dynamic_item_1 = double
14
+ Navi::Renderers::SimpleNavigation::DynamicItem.
15
+ stub(:new).with(template, nav_item_1, extra: 'options').
16
+ and_return(dynamic_item_1)
17
+
18
+ dynamic_item_2 = double
19
+ Navi::Renderers::SimpleNavigation::DynamicItem.
20
+ stub(:new).with(template, nav_item_2, extra: 'options').
21
+ and_return(dynamic_item_2)
22
+
23
+ dynamic_items = described_class.new(template, nav_items, extra: 'options')
24
+ expect(dynamic_items.size).to eq(2)
25
+ expect(dynamic_items[0]).to eq(dynamic_item_1)
26
+ expect(dynamic_items[1]).to eq(dynamic_item_2)
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+
3
+ describe Navi::Renderers::SimpleNavigation::GeneratesUri do
4
+
5
+ describe '.execute' do
6
+ subject { described_class.execute(template, item) }
7
+ let(:template) { OpenStruct.new }
8
+ let(:item) { OpenStruct.new(url: url) }
9
+
10
+ context 'navigation item url is a string' do
11
+ let(:url) { '/a/string' }
12
+ it { should == '/a/string' }
13
+ end
14
+
15
+ context 'navigation item is not a string' do
16
+ let(:url) { OpenStruct.new }
17
+
18
+ context 'without a namespace' do
19
+ before do
20
+ template.stub(:polymorphic_path).with([url]) { '/generated/path' }
21
+ end
22
+
23
+ it 'should build the URL using the template polymorphic path' do
24
+ expect(subject).to eq('/generated/path')
25
+ end
26
+ end
27
+
28
+ context 'given a single namespace' do
29
+ subject { described_class.execute(template, item, namespace: :admin) }
30
+
31
+ before do
32
+ template.stub(:polymorphic_path).with([:admin, url]) { '/admin/generated/path' }
33
+ end
34
+
35
+ it 'should build the URL using the template polymorphic path' do
36
+ expect(subject).to eq('/admin/generated/path')
37
+ end
38
+ end
39
+
40
+ context 'given multiple namespaces' do
41
+ subject do
42
+ described_class.execute(template, item, namespace: [:super, :admin])
43
+ end
44
+
45
+ before do
46
+ template.stub(:polymorphic_path).with([:super, :admin, url]).
47
+ and_return('/super/admin/generated/path')
48
+ end
49
+
50
+ it 'should build the URL using the template polymorphic path' do
51
+ expect(subject).to eq('/super/admin/generated/path')
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+
3
+ # SimpleNavigation can accept a array of hashes like so
4
+ #[
5
+ #{:key => :main, :name => 'Main', :url => '/main', :options => {your options here}, :items => [
6
+ #{:key => :sub1, :name => 'Submenu 1', :url => '/sub1'},
7
+ #{:key => :sub2, :name => 'Submenu 2', :url => '/sub2'}
8
+ #]}, {...next primary item...}
9
+ #]
10
+ #
11
+ # That means this is the output we need if we want to get it working with SimpleNavigation.
12
+
13
+ describe Navi::Renderers::SimpleNavigation::Renderer do
14
+
15
+ describe '#render' do
16
+ before do
17
+ @template = OpenStruct.new
18
+ @controller = OpenStruct.new(view_context: @template)
19
+ @context = OpenStruct.new(controller: @controller)
20
+ end
21
+
22
+ it 'should call render_navigation' do
23
+ rendered_navigation = "rendered navigation"
24
+
25
+ items = ['items']
26
+ dynamic_items = ['dynamic items']
27
+ Navi::Renderers::SimpleNavigation::DynamicItems.
28
+ stub(:new).with(@template, items, namespace: 'admin').
29
+ and_return(dynamic_items)
30
+
31
+ @template.stub(:render_navigation).
32
+ with(expand_all: true, items: dynamic_items).
33
+ and_return(rendered_navigation)
34
+
35
+ renderer = described_class.new(@context)
36
+ result = renderer.render(items, namespace: 'admin')
37
+ expect(result).to eq('rendered navigation')
38
+ end
39
+ end
40
+
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
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-02-19 00:00:00.000000000Z
12
+ date: 2013-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &71496270 !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.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *71496270
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: activerecord
27
- requirement: &71495990 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,87 +37,63 @@ dependencies:
32
37
  version: 3.0.0
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *71495990
36
- - !ruby/object:Gem::Dependency
37
- name: ordered_tree
38
- requirement: &71495600 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
39
41
  none: false
40
42
  requirements:
41
43
  - - ! '>='
42
44
  - !ruby/object:Gem::Version
43
- version: 0.1.6
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: *71495600
45
+ version: 3.0.0
47
46
  - !ruby/object:Gem::Dependency
48
- name: rspec
49
- requirement: &71495120 !ruby/object:Gem::Requirement
47
+ name: ordered_tree
48
+ requirement: !ruby/object:Gem::Requirement
50
49
  none: false
51
50
  requirements:
52
- - - ~>
51
+ - - ! '>='
53
52
  - !ruby/object:Gem::Version
54
- version: 2.6.0
55
- type: :development
53
+ version: 0.1.6
54
+ type: :runtime
56
55
  prerelease: false
57
- version_requirements: *71495120
58
- - !ruby/object:Gem::Dependency
59
- name: bundler
60
- requirement: &71494710 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
61
57
  none: false
62
58
  requirements:
63
- - - ~>
59
+ - - ! '>='
64
60
  - !ruby/object:Gem::Version
65
- version: 1.0.0
66
- type: :development
67
- prerelease: false
68
- version_requirements: *71494710
61
+ version: 0.1.6
69
62
  - !ruby/object:Gem::Dependency
70
63
  name: simple-navigation
71
- requirement: &71494330 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
72
65
  none: false
73
66
  requirements:
74
- - - =
67
+ - - ~>
75
68
  - !ruby/object:Gem::Version
76
- version: 3.2.0
77
- type: :development
69
+ version: 3.11.0
70
+ type: :runtime
78
71
  prerelease: false
79
- version_requirements: *71494330
80
- - !ruby/object:Gem::Dependency
81
- name: inherited_resources
82
- requirement: &71493890 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
83
73
  none: false
84
74
  requirements:
85
75
  - - ~>
86
76
  - !ruby/object:Gem::Version
87
- version: 1.3.0
88
- type: :development
89
- prerelease: false
90
- version_requirements: *71493890
77
+ version: 3.11.0
91
78
  - !ruby/object:Gem::Dependency
92
- name: guard-rspec
93
- requirement: &71493600 !ruby/object:Gem::Requirement
79
+ name: easy_class_to_instance_method
80
+ requirement: !ruby/object:Gem::Requirement
94
81
  none: false
95
82
  requirements:
96
- - - ! '>='
83
+ - - '='
97
84
  - !ruby/object:Gem::Version
98
- version: '0'
99
- type: :development
85
+ version: 0.0.1
86
+ type: :runtime
100
87
  prerelease: false
101
- version_requirements: *71493600
102
- - !ruby/object:Gem::Dependency
103
- name: libnotify
104
- requirement: &71493250 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
105
89
  none: false
106
90
  requirements:
107
- - - ! '>='
91
+ - - '='
108
92
  - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: *71493250
93
+ version: 0.0.1
113
94
  - !ruby/object:Gem::Dependency
114
- name: rb-inotify
115
- requirement: &71492760 !ruby/object:Gem::Requirement
95
+ name: sqlite3
96
+ requirement: !ruby/object:Gem::Requirement
116
97
  none: false
117
98
  requirements:
118
99
  - - ! '>='
@@ -120,98 +101,79 @@ dependencies:
120
101
  version: '0'
121
102
  type: :development
122
103
  prerelease: false
123
- version_requirements: *71492760
124
- - !ruby/object:Gem::Dependency
125
- name: sqlite3
126
- requirement: &71492240 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
127
105
  none: false
128
106
  requirements:
129
107
  - - ! '>='
130
108
  - !ruby/object:Gem::Version
131
109
  version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: *71492240
135
110
  - !ruby/object:Gem::Dependency
136
- name: apotomo
137
- requirement: &71491680 !ruby/object:Gem::Requirement
111
+ name: rails
112
+ requirement: !ruby/object:Gem::Requirement
138
113
  none: false
139
114
  requirements:
140
115
  - - ~>
141
116
  - !ruby/object:Gem::Version
142
- version: 1.2.2
117
+ version: 3.2.0
143
118
  type: :development
144
119
  prerelease: false
145
- version_requirements: *71491680
146
- - !ruby/object:Gem::Dependency
147
- name: rails
148
- requirement: &71491240 !ruby/object:Gem::Requirement
120
+ version_requirements: !ruby/object:Gem::Requirement
149
121
  none: false
150
122
  requirements:
151
123
  - - ~>
152
124
  - !ruby/object:Gem::Version
153
125
  version: 3.2.0
154
- type: :development
155
- prerelease: false
156
- version_requirements: *71491240
157
126
  - !ruby/object:Gem::Dependency
158
- name: haml
159
- requirement: &71490990 !ruby/object:Gem::Requirement
127
+ name: jquery-rails
128
+ requirement: !ruby/object:Gem::Requirement
160
129
  none: false
161
130
  requirements:
162
- - - ! '>='
131
+ - - ~>
163
132
  - !ruby/object:Gem::Version
164
- version: '0'
133
+ version: 2.2.1
165
134
  type: :development
166
135
  prerelease: false
167
- version_requirements: *71490990
168
- - !ruby/object:Gem::Dependency
169
- name: simple-navigation
170
- requirement: &71490490 !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
171
137
  none: false
172
138
  requirements:
173
- - - =
139
+ - - ~>
174
140
  - !ruby/object:Gem::Version
175
- version: 3.2.0
176
- type: :development
177
- prerelease: false
178
- version_requirements: *71490490
141
+ version: 2.2.1
179
142
  - !ruby/object:Gem::Dependency
180
- name: jquery-rails
181
- requirement: &71490060 !ruby/object:Gem::Requirement
143
+ name: rspec-rails
144
+ requirement: !ruby/object:Gem::Requirement
182
145
  none: false
183
146
  requirements:
184
147
  - - ~>
185
148
  - !ruby/object:Gem::Version
186
- version: 2.0.0
149
+ version: 2.13.2
187
150
  type: :development
188
151
  prerelease: false
189
- version_requirements: *71490060
190
- - !ruby/object:Gem::Dependency
191
- name: rspec-rails
192
- requirement: &71489660 !ruby/object:Gem::Requirement
152
+ version_requirements: !ruby/object:Gem::Requirement
193
153
  none: false
194
154
  requirements:
195
155
  - - ~>
196
156
  - !ruby/object:Gem::Version
197
- version: 2.6.1
198
- type: :development
199
- prerelease: false
200
- version_requirements: *71489660
157
+ version: 2.13.2
201
158
  - !ruby/object:Gem::Dependency
202
159
  name: cucumber-rails
203
- requirement: &71485240 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
204
161
  none: false
205
162
  requirements:
206
- - - =
163
+ - - '='
207
164
  - !ruby/object:Gem::Version
208
165
  version: 0.5.2
209
166
  type: :development
210
167
  prerelease: false
211
- version_requirements: *71485240
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 0.5.2
212
174
  - !ruby/object:Gem::Dependency
213
175
  name: cucumber
214
- requirement: &71484950 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
215
177
  none: false
216
178
  requirements:
217
179
  - - ! '>='
@@ -219,10 +181,31 @@ dependencies:
219
181
  version: '0'
220
182
  type: :development
221
183
  prerelease: false
222
- version_requirements: *71484950
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: selenium-webdriver
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
223
206
  - !ruby/object:Gem::Dependency
224
207
  name: capybara
225
- requirement: &71484560 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
226
209
  none: false
227
210
  requirements:
228
211
  - - ! '>='
@@ -230,10 +213,15 @@ dependencies:
230
213
  version: 1.0.0.rc1
231
214
  type: :development
232
215
  prerelease: false
233
- version_requirements: *71484560
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: 1.0.0.rc1
234
222
  - !ruby/object:Gem::Dependency
235
223
  name: database_cleaner
236
- requirement: &71484310 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
237
225
  none: false
238
226
  requirements:
239
227
  - - ! '>='
@@ -241,10 +229,15 @@ dependencies:
241
229
  version: '0'
242
230
  type: :development
243
231
  prerelease: false
244
- version_requirements: *71484310
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
245
238
  - !ruby/object:Gem::Dependency
246
239
  name: launchy
247
- requirement: &71483940 !ruby/object:Gem::Requirement
240
+ requirement: !ruby/object:Gem::Requirement
248
241
  none: false
249
242
  requirements:
250
243
  - - ! '>='
@@ -252,32 +245,31 @@ dependencies:
252
245
  version: '0'
253
246
  type: :development
254
247
  prerelease: false
255
- version_requirements: *71483940
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
256
254
  - !ruby/object:Gem::Dependency
257
255
  name: guard-cucumber
258
- requirement: &71483570 !ruby/object:Gem::Requirement
256
+ requirement: !ruby/object:Gem::Requirement
259
257
  none: false
260
258
  requirements:
261
- - - =
259
+ - - '='
262
260
  - !ruby/object:Gem::Version
263
261
  version: 0.3.4
264
262
  type: :development
265
263
  prerelease: false
266
- version_requirements: *71483570
267
- - !ruby/object:Gem::Dependency
268
- name: libnotify
269
- requirement: &71483280 !ruby/object:Gem::Requirement
264
+ version_requirements: !ruby/object:Gem::Requirement
270
265
  none: false
271
266
  requirements:
272
- - - ! '>='
267
+ - - '='
273
268
  - !ruby/object:Gem::Version
274
- version: '0'
275
- type: :development
276
- prerelease: false
277
- version_requirements: *71483280
269
+ version: 0.3.4
278
270
  - !ruby/object:Gem::Dependency
279
- name: rb-inotify
280
- requirement: &71482950 !ruby/object:Gem::Requirement
271
+ name: nifty-generators
272
+ requirement: !ruby/object:Gem::Requirement
281
273
  none: false
282
274
  requirements:
283
275
  - - ! '>='
@@ -285,40 +277,28 @@ dependencies:
285
277
  version: '0'
286
278
  type: :development
287
279
  prerelease: false
288
- version_requirements: *71482950
289
- - !ruby/object:Gem::Dependency
290
- name: nifty-generators
291
- requirement: &71482520 !ruby/object:Gem::Requirement
280
+ version_requirements: !ruby/object:Gem::Requirement
292
281
  none: false
293
282
  requirements:
294
283
  - - ! '>='
295
284
  - !ruby/object:Gem::Version
296
285
  version: '0'
297
- type: :development
298
- prerelease: false
299
- version_requirements: *71482520
300
286
  - !ruby/object:Gem::Dependency
301
287
  name: factory_girl
302
- requirement: &71481890 !ruby/object:Gem::Requirement
288
+ requirement: !ruby/object:Gem::Requirement
303
289
  none: false
304
290
  requirements:
305
291
  - - ~>
306
292
  - !ruby/object:Gem::Version
307
- version: 2.5.1
293
+ version: 4.2.0
308
294
  type: :development
309
295
  prerelease: false
310
- version_requirements: *71481890
311
- - !ruby/object:Gem::Dependency
312
- name: ruby-debug19
313
- requirement: &71481250 !ruby/object:Gem::Requirement
296
+ version_requirements: !ruby/object:Gem::Requirement
314
297
  none: false
315
298
  requirements:
316
- - - ! '>='
299
+ - - ~>
317
300
  - !ruby/object:Gem::Version
318
- version: '0'
319
- type: :development
320
- prerelease: false
321
- version_requirements: *71481250
301
+ version: 4.2.0
322
302
  description: Allows you to save menu items in the database. You can create your own
323
303
  renderer.
324
304
  email:
@@ -330,7 +310,8 @@ files:
330
310
  - .document
331
311
  - .gitignore
332
312
  - .rspec
333
- - .rvmrc
313
+ - .ruby-version
314
+ - CHANGELOG.md
334
315
  - Gemfile
335
316
  - Gemfile.lock
336
317
  - Guardfile
@@ -356,6 +337,10 @@ files:
356
337
  - lib/navi/railtie.rb
357
338
  - lib/navi/renderers/base.rb
358
339
  - lib/navi/renderers/simple_navigation.rb
340
+ - lib/navi/renderers/simple_navigation/dynamic_item.rb
341
+ - lib/navi/renderers/simple_navigation/dynamic_items.rb
342
+ - lib/navi/renderers/simple_navigation/generates_uri.rb
343
+ - lib/navi/renderers/simple_navigation/renderer.rb
359
344
  - lib/navi/version.rb
360
345
  - navi.gemspec
361
346
  - spec/dummy/Rakefile
@@ -416,6 +401,7 @@ files:
416
401
  - spec/dummy/config/initializers/session_store.rb
417
402
  - spec/dummy/config/initializers/wrap_parameters.rb
418
403
  - spec/dummy/config/locales/en.yml
404
+ - spec/dummy/config/navigation.rb
419
405
  - spec/dummy/config/routes.rb
420
406
  - spec/dummy/db/migrate/20110607155019_create_menu_items.rb
421
407
  - spec/dummy/db/migrate/20110607155202_create_categories.rb
@@ -429,12 +415,16 @@ files:
429
415
  - spec/dummy/public/500.html
430
416
  - spec/dummy/public/favicon.ico
431
417
  - spec/dummy/script/rails
418
+ - spec/dummy/vendor/assets/javascripts/nestedSortable.js
432
419
  - spec/factories.rb
433
420
  - spec/navi/helpers_spec.rb
434
421
  - spec/navi/navi_spec.rb
435
422
  - spec/navi/navigable_spec.rb
436
423
  - spec/navi/navigator_spec.rb
437
- - spec/navi/renderers/simple_navigation_spec.rb
424
+ - spec/navi/renderers/simple_navigation/dynamic_item_spec.rb
425
+ - spec/navi/renderers/simple_navigation/dynamic_items_spec.rb
426
+ - spec/navi/renderers/simple_navigation/generates_uri_spec.rb
427
+ - spec/navi/renderers/simple_navigation/renderer_spec.rb
438
428
  - spec/spec_helper.rb
439
429
  homepage: https://github.com/ramontayag/navi
440
430
  licenses: []
@@ -448,16 +438,113 @@ required_ruby_version: !ruby/object:Gem::Requirement
448
438
  - - ! '>='
449
439
  - !ruby/object:Gem::Version
450
440
  version: '0'
441
+ segments:
442
+ - 0
443
+ hash: -1974444900987985059
451
444
  required_rubygems_version: !ruby/object:Gem::Requirement
452
445
  none: false
453
446
  requirements:
454
447
  - - ! '>='
455
448
  - !ruby/object:Gem::Version
456
449
  version: '0'
450
+ segments:
451
+ - 0
452
+ hash: -1974444900987985059
457
453
  requirements: []
458
454
  rubyforge_project: navi
459
- rubygems_version: 1.8.11
455
+ rubygems_version: 1.8.25
460
456
  signing_key:
461
457
  specification_version: 3
462
458
  summary: Database-backed menu
463
- test_files: []
459
+ test_files:
460
+ - features/create_menu_items.feature
461
+ - features/step_definitions/category_steps.rb
462
+ - features/step_definitions/menu_item_steps.rb
463
+ - features/step_definitions/page_steps.rb
464
+ - features/step_definitions/web_steps.rb
465
+ - features/support/env.rb
466
+ - features/support/paths.rb
467
+ - features/support/selectors.rb
468
+ - spec/dummy/Rakefile
469
+ - spec/dummy/app/assets/javascripts/application.js
470
+ - spec/dummy/app/assets/javascripts/jquery-ui.js
471
+ - spec/dummy/app/assets/javascripts/jquery-ui.min.js
472
+ - spec/dummy/app/assets/javascripts/jquery.js
473
+ - spec/dummy/app/assets/javascripts/jquery.min.js
474
+ - spec/dummy/app/assets/javascripts/jquery_ujs.js
475
+ - spec/dummy/app/assets/javascripts/menu_items/index.js
476
+ - spec/dummy/app/assets/stylesheets/application.css
477
+ - spec/dummy/app/controllers/application_controller.rb
478
+ - spec/dummy/app/controllers/categories_controller.rb
479
+ - spec/dummy/app/controllers/menu_items_controller.rb
480
+ - spec/dummy/app/controllers/pages_controller.rb
481
+ - spec/dummy/app/helpers/application_helper.rb
482
+ - spec/dummy/app/mailers/.gitkeep
483
+ - spec/dummy/app/models/.gitkeep
484
+ - spec/dummy/app/models/category.rb
485
+ - spec/dummy/app/models/menu_item.rb
486
+ - spec/dummy/app/models/page.rb
487
+ - spec/dummy/app/views/categories/_form.html.haml
488
+ - spec/dummy/app/views/categories/edit.html.haml
489
+ - spec/dummy/app/views/categories/index.html.haml
490
+ - spec/dummy/app/views/categories/new.html.haml
491
+ - spec/dummy/app/views/layouts/application.html.erb
492
+ - spec/dummy/app/views/menu_items/edit.html.haml
493
+ - spec/dummy/app/views/menu_items/index.html.haml
494
+ - spec/dummy/app/views/pages/_form.html.haml
495
+ - spec/dummy/app/views/pages/edit.html.haml
496
+ - spec/dummy/app/views/pages/index.html.haml
497
+ - spec/dummy/app/views/pages/new.html.haml
498
+ - spec/dummy/app/widgets/menu_editor/category/form/.display.html.haml.swo
499
+ - spec/dummy/app/widgets/menu_editor/category/form/display.html.haml
500
+ - spec/dummy/app/widgets/menu_editor/category/form_widget.rb
501
+ - spec/dummy/app/widgets/menu_editor/display.html.haml
502
+ - spec/dummy/app/widgets/menu_editor/page/form/.display.html.haml.swo
503
+ - spec/dummy/app/widgets/menu_editor/page/form/display.html.haml
504
+ - spec/dummy/app/widgets/menu_editor/page/form_widget.rb
505
+ - spec/dummy/app/widgets/menu_editor/tree/display.html.haml
506
+ - spec/dummy/app/widgets/menu_editor/tree/item.html.haml
507
+ - spec/dummy/app/widgets/menu_editor/tree/items.html.haml
508
+ - spec/dummy/app/widgets/menu_editor/tree_widget.rb
509
+ - spec/dummy/app/widgets/menu_editor_widget.rb
510
+ - spec/dummy/config.ru
511
+ - spec/dummy/config/application.rb
512
+ - spec/dummy/config/boot.rb
513
+ - spec/dummy/config/database.yml
514
+ - spec/dummy/config/environment.rb
515
+ - spec/dummy/config/environments/development.rb
516
+ - spec/dummy/config/environments/production.rb
517
+ - spec/dummy/config/environments/test.rb
518
+ - spec/dummy/config/initializers/backtrace_silencers.rb
519
+ - spec/dummy/config/initializers/inflections.rb
520
+ - spec/dummy/config/initializers/mime_types.rb
521
+ - spec/dummy/config/initializers/navi.rb
522
+ - spec/dummy/config/initializers/secret_token.rb
523
+ - spec/dummy/config/initializers/session_store.rb
524
+ - spec/dummy/config/initializers/wrap_parameters.rb
525
+ - spec/dummy/config/locales/en.yml
526
+ - spec/dummy/config/navigation.rb
527
+ - spec/dummy/config/routes.rb
528
+ - spec/dummy/db/migrate/20110607155019_create_menu_items.rb
529
+ - spec/dummy/db/migrate/20110607155202_create_categories.rb
530
+ - spec/dummy/db/migrate/20110607160052_create_pages.rb
531
+ - spec/dummy/db/schema.rb
532
+ - spec/dummy/db/seeds.rb
533
+ - spec/dummy/lib/assets/.gitkeep
534
+ - spec/dummy/log/.gitkeep
535
+ - spec/dummy/public/404.html
536
+ - spec/dummy/public/422.html
537
+ - spec/dummy/public/500.html
538
+ - spec/dummy/public/favicon.ico
539
+ - spec/dummy/script/rails
540
+ - spec/dummy/vendor/assets/javascripts/nestedSortable.js
541
+ - spec/factories.rb
542
+ - spec/navi/helpers_spec.rb
543
+ - spec/navi/navi_spec.rb
544
+ - spec/navi/navigable_spec.rb
545
+ - spec/navi/navigator_spec.rb
546
+ - spec/navi/renderers/simple_navigation/dynamic_item_spec.rb
547
+ - spec/navi/renderers/simple_navigation/dynamic_items_spec.rb
548
+ - spec/navi/renderers/simple_navigation/generates_uri_spec.rb
549
+ - spec/navi/renderers/simple_navigation/renderer_spec.rb
550
+ - spec/spec_helper.rb