navi 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -15,7 +15,7 @@ gem "ordered_tree", ">= 0.1.6"
15
15
  # :test and :cucumber environments!
16
16
  #
17
17
  # Just remember to uncomment them when you publish (or make a pull request).
18
- group :development, :test, :cucumber do
18
+ #group :development, :test, :cucumber do
19
19
  gem "rspec", "~> 2.6.0"
20
20
  gem "bundler", "~> 1.0.0"
21
21
  gem "jeweler", "~> 1.5.2"
@@ -39,10 +39,10 @@ group :development, :test, :cucumber do
39
39
  gem 'capybara', ">= 1.0.0.rc1"
40
40
  gem 'database_cleaner'
41
41
  gem 'launchy'
42
- gem 'machinist', :path => "/home/ramon/source/machinist"
42
+ gem 'machinist'
43
43
  gem 'faker'
44
44
  gem 'guard-cucumber', '0.3.4'
45
45
  gem 'libnotify'
46
46
  gem 'rb-inotify'
47
47
  gem 'nifty-generators'
48
- end
48
+ #end
data/Gemfile.lock CHANGED
@@ -1,8 +1,3 @@
1
- PATH
2
- remote: /home/ramon/source/machinist
3
- specs:
4
- machinist (1.0.6)
5
-
6
1
  GEM
7
2
  remote: http://rubygems.org/
8
3
  specs:
@@ -101,6 +96,7 @@ GEM
101
96
  configuration (>= 0.0.5)
102
97
  rake (>= 0.8.1)
103
98
  libnotify (0.5.5)
99
+ machinist (1.0.6)
104
100
  mail (2.2.19)
105
101
  activesupport (>= 2.3.6)
106
102
  i18n (>= 0.4.0)
@@ -187,7 +183,7 @@ DEPENDENCIES
187
183
  jquery-rails (>= 1.0.3)
188
184
  launchy
189
185
  libnotify
190
- machinist!
186
+ machinist
191
187
  nifty-generators
192
188
  ordered_tree (>= 0.1.6)
193
189
  rails (= 3.0.7)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
data/lib/navi/helpers.rb CHANGED
@@ -7,18 +7,15 @@
7
7
  # context
8
8
  module Navi
9
9
  module Helpers
10
+ # Don't declare @renderer in here, or else it won't play nicely with Rails.
11
+
10
12
  def self.included(base)
11
13
  #puts "Navi::Helpers was included into #{base}"
12
14
  end
13
15
 
14
- def navi_render(collection)
15
- renderer.render(collection)
16
- end
17
-
18
- private
19
-
20
- def renderer
21
- @renderer ||= Navi.renderer.new(self)
16
+ def navi_render(collection, *args)
17
+ @navi_renderer ||= Navi.renderer.new(self)
18
+ @navi_renderer.render(collection, *args)
22
19
  end
23
20
  end
24
21
  end
@@ -2,9 +2,11 @@ module Navi
2
2
  module Renderers
3
3
  class SimpleNavigation < Navi::Renderers::Base
4
4
 
5
- def render(collection)
6
- items = create_dynamic_items(collection)
7
- @template.render_navigation :items => items, :expand_all => true
5
+ def render(collection, *args)
6
+ options = Hash[*args]
7
+ options[:expand_all] ||= true
8
+ options[:items] ||= create_dynamic_items(collection)
9
+ @template.render_navigation options
8
10
  end
9
11
 
10
12
  private
data/navi.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{navi}
8
- s.version = "0.0.15"
8
+ s.version = "0.0.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ramon Tayag"]
12
- s.date = %q{2011-06-16}
12
+ s.date = %q{2011-06-22}
13
13
  s.description = %q{Allows you to save menu items in the database. You can create your own renderer.}
14
14
  s.email = %q{ramon@tayag.net}
15
15
  s.extra_rdoc_files = [
@@ -183,34 +183,34 @@ Gem::Specification.new do |s|
183
183
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
184
184
  s.add_runtime_dependency(%q<activerecord>, [">= 3.0.0"])
185
185
  s.add_runtime_dependency(%q<ordered_tree>, [">= 0.1.6"])
186
- s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
187
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
188
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
189
- s.add_development_dependency(%q<rcov>, [">= 0"])
190
- s.add_development_dependency(%q<simple-navigation>, ["= 3.2.0"])
191
- s.add_development_dependency(%q<inherited_resources>, [">= 0"])
192
- s.add_development_dependency(%q<guard-rspec>, [">= 0"])
193
- s.add_development_dependency(%q<libnotify>, [">= 0"])
194
- s.add_development_dependency(%q<rb-inotify>, [">= 0"])
195
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
196
- s.add_development_dependency(%q<rake>, ["= 0.8.7"])
197
- s.add_development_dependency(%q<apotomo>, ["= 1.1.1"])
198
- s.add_development_dependency(%q<rails>, ["= 3.0.7"])
199
- s.add_development_dependency(%q<haml>, [">= 0"])
200
- s.add_development_dependency(%q<simple-navigation>, ["= 3.2.0"])
201
- s.add_development_dependency(%q<jquery-rails>, [">= 1.0.3"])
202
- s.add_development_dependency(%q<rspec-rails>, ["= 2.6.1"])
203
- s.add_development_dependency(%q<cucumber-rails>, ["= 0.5.2"])
204
- s.add_development_dependency(%q<cucumber>, [">= 0"])
205
- s.add_development_dependency(%q<capybara>, [">= 1.0.0.rc1"])
206
- s.add_development_dependency(%q<database_cleaner>, [">= 0"])
207
- s.add_development_dependency(%q<launchy>, [">= 0"])
208
- s.add_development_dependency(%q<machinist>, [">= 0"])
209
- s.add_development_dependency(%q<faker>, [">= 0"])
210
- s.add_development_dependency(%q<guard-cucumber>, ["= 0.3.4"])
211
- s.add_development_dependency(%q<libnotify>, [">= 0"])
212
- s.add_development_dependency(%q<rb-inotify>, [">= 0"])
213
- s.add_development_dependency(%q<nifty-generators>, [">= 0"])
186
+ s.add_runtime_dependency(%q<rspec>, ["~> 2.6.0"])
187
+ s.add_runtime_dependency(%q<bundler>, ["~> 1.0.0"])
188
+ s.add_runtime_dependency(%q<jeweler>, ["~> 1.5.2"])
189
+ s.add_runtime_dependency(%q<rcov>, [">= 0"])
190
+ s.add_runtime_dependency(%q<simple-navigation>, ["= 3.2.0"])
191
+ s.add_runtime_dependency(%q<inherited_resources>, [">= 0"])
192
+ s.add_runtime_dependency(%q<guard-rspec>, [">= 0"])
193
+ s.add_runtime_dependency(%q<libnotify>, [">= 0"])
194
+ s.add_runtime_dependency(%q<rb-inotify>, [">= 0"])
195
+ s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
196
+ s.add_runtime_dependency(%q<rake>, ["= 0.8.7"])
197
+ s.add_runtime_dependency(%q<apotomo>, ["= 1.1.1"])
198
+ s.add_runtime_dependency(%q<rails>, ["= 3.0.7"])
199
+ s.add_runtime_dependency(%q<haml>, [">= 0"])
200
+ s.add_runtime_dependency(%q<simple-navigation>, ["= 3.2.0"])
201
+ s.add_runtime_dependency(%q<jquery-rails>, [">= 1.0.3"])
202
+ s.add_runtime_dependency(%q<rspec-rails>, ["= 2.6.1"])
203
+ s.add_runtime_dependency(%q<cucumber-rails>, ["= 0.5.2"])
204
+ s.add_runtime_dependency(%q<cucumber>, [">= 0"])
205
+ s.add_runtime_dependency(%q<capybara>, [">= 1.0.0.rc1"])
206
+ s.add_runtime_dependency(%q<database_cleaner>, [">= 0"])
207
+ s.add_runtime_dependency(%q<launchy>, [">= 0"])
208
+ s.add_runtime_dependency(%q<machinist>, [">= 0"])
209
+ s.add_runtime_dependency(%q<faker>, [">= 0"])
210
+ s.add_runtime_dependency(%q<guard-cucumber>, ["= 0.3.4"])
211
+ s.add_runtime_dependency(%q<libnotify>, [">= 0"])
212
+ s.add_runtime_dependency(%q<rb-inotify>, [">= 0"])
213
+ s.add_runtime_dependency(%q<nifty-generators>, [">= 0"])
214
214
  else
215
215
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
216
216
  s.add_dependency(%q<activerecord>, [">= 3.0.0"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ramon Tayag
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-16 00:00:00 +08:00
18
+ date: 2011-06-22 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -67,7 +67,7 @@ dependencies:
67
67
  version_requirements: *id003
68
68
  prerelease: false
69
69
  - !ruby/object:Gem::Dependency
70
- type: :development
70
+ type: :runtime
71
71
  requirement: &id004 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
@@ -83,7 +83,7 @@ dependencies:
83
83
  version_requirements: *id004
84
84
  prerelease: false
85
85
  - !ruby/object:Gem::Dependency
86
- type: :development
86
+ type: :runtime
87
87
  requirement: &id005 !ruby/object:Gem::Requirement
88
88
  none: false
89
89
  requirements:
@@ -99,7 +99,7 @@ dependencies:
99
99
  version_requirements: *id005
100
100
  prerelease: false
101
101
  - !ruby/object:Gem::Dependency
102
- type: :development
102
+ type: :runtime
103
103
  requirement: &id006 !ruby/object:Gem::Requirement
104
104
  none: false
105
105
  requirements:
@@ -115,7 +115,7 @@ dependencies:
115
115
  version_requirements: *id006
116
116
  prerelease: false
117
117
  - !ruby/object:Gem::Dependency
118
- type: :development
118
+ type: :runtime
119
119
  requirement: &id007 !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
@@ -129,7 +129,7 @@ dependencies:
129
129
  version_requirements: *id007
130
130
  prerelease: false
131
131
  - !ruby/object:Gem::Dependency
132
- type: :development
132
+ type: :runtime
133
133
  requirement: &id008 !ruby/object:Gem::Requirement
134
134
  none: false
135
135
  requirements:
@@ -145,7 +145,7 @@ dependencies:
145
145
  version_requirements: *id008
146
146
  prerelease: false
147
147
  - !ruby/object:Gem::Dependency
148
- type: :development
148
+ type: :runtime
149
149
  requirement: &id009 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
@@ -159,7 +159,7 @@ dependencies:
159
159
  version_requirements: *id009
160
160
  prerelease: false
161
161
  - !ruby/object:Gem::Dependency
162
- type: :development
162
+ type: :runtime
163
163
  requirement: &id010 !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements:
@@ -173,7 +173,7 @@ dependencies:
173
173
  version_requirements: *id010
174
174
  prerelease: false
175
175
  - !ruby/object:Gem::Dependency
176
- type: :development
176
+ type: :runtime
177
177
  requirement: &id011 !ruby/object:Gem::Requirement
178
178
  none: false
179
179
  requirements:
@@ -187,7 +187,7 @@ dependencies:
187
187
  version_requirements: *id011
188
188
  prerelease: false
189
189
  - !ruby/object:Gem::Dependency
190
- type: :development
190
+ type: :runtime
191
191
  requirement: &id012 !ruby/object:Gem::Requirement
192
192
  none: false
193
193
  requirements:
@@ -201,7 +201,7 @@ dependencies:
201
201
  version_requirements: *id012
202
202
  prerelease: false
203
203
  - !ruby/object:Gem::Dependency
204
- type: :development
204
+ type: :runtime
205
205
  requirement: &id013 !ruby/object:Gem::Requirement
206
206
  none: false
207
207
  requirements:
@@ -215,7 +215,7 @@ dependencies:
215
215
  version_requirements: *id013
216
216
  prerelease: false
217
217
  - !ruby/object:Gem::Dependency
218
- type: :development
218
+ type: :runtime
219
219
  requirement: &id014 !ruby/object:Gem::Requirement
220
220
  none: false
221
221
  requirements:
@@ -231,7 +231,7 @@ dependencies:
231
231
  version_requirements: *id014
232
232
  prerelease: false
233
233
  - !ruby/object:Gem::Dependency
234
- type: :development
234
+ type: :runtime
235
235
  requirement: &id015 !ruby/object:Gem::Requirement
236
236
  none: false
237
237
  requirements:
@@ -247,7 +247,7 @@ dependencies:
247
247
  version_requirements: *id015
248
248
  prerelease: false
249
249
  - !ruby/object:Gem::Dependency
250
- type: :development
250
+ type: :runtime
251
251
  requirement: &id016 !ruby/object:Gem::Requirement
252
252
  none: false
253
253
  requirements:
@@ -263,7 +263,7 @@ dependencies:
263
263
  version_requirements: *id016
264
264
  prerelease: false
265
265
  - !ruby/object:Gem::Dependency
266
- type: :development
266
+ type: :runtime
267
267
  requirement: &id017 !ruby/object:Gem::Requirement
268
268
  none: false
269
269
  requirements:
@@ -277,7 +277,7 @@ dependencies:
277
277
  version_requirements: *id017
278
278
  prerelease: false
279
279
  - !ruby/object:Gem::Dependency
280
- type: :development
280
+ type: :runtime
281
281
  requirement: &id018 !ruby/object:Gem::Requirement
282
282
  none: false
283
283
  requirements:
@@ -293,7 +293,7 @@ dependencies:
293
293
  version_requirements: *id018
294
294
  prerelease: false
295
295
  - !ruby/object:Gem::Dependency
296
- type: :development
296
+ type: :runtime
297
297
  requirement: &id019 !ruby/object:Gem::Requirement
298
298
  none: false
299
299
  requirements:
@@ -309,7 +309,7 @@ dependencies:
309
309
  version_requirements: *id019
310
310
  prerelease: false
311
311
  - !ruby/object:Gem::Dependency
312
- type: :development
312
+ type: :runtime
313
313
  requirement: &id020 !ruby/object:Gem::Requirement
314
314
  none: false
315
315
  requirements:
@@ -325,7 +325,7 @@ dependencies:
325
325
  version_requirements: *id020
326
326
  prerelease: false
327
327
  - !ruby/object:Gem::Dependency
328
- type: :development
328
+ type: :runtime
329
329
  requirement: &id021 !ruby/object:Gem::Requirement
330
330
  none: false
331
331
  requirements:
@@ -341,7 +341,7 @@ dependencies:
341
341
  version_requirements: *id021
342
342
  prerelease: false
343
343
  - !ruby/object:Gem::Dependency
344
- type: :development
344
+ type: :runtime
345
345
  requirement: &id022 !ruby/object:Gem::Requirement
346
346
  none: false
347
347
  requirements:
@@ -355,7 +355,7 @@ dependencies:
355
355
  version_requirements: *id022
356
356
  prerelease: false
357
357
  - !ruby/object:Gem::Dependency
358
- type: :development
358
+ type: :runtime
359
359
  requirement: &id023 !ruby/object:Gem::Requirement
360
360
  none: false
361
361
  requirements:
@@ -373,7 +373,7 @@ dependencies:
373
373
  version_requirements: *id023
374
374
  prerelease: false
375
375
  - !ruby/object:Gem::Dependency
376
- type: :development
376
+ type: :runtime
377
377
  requirement: &id024 !ruby/object:Gem::Requirement
378
378
  none: false
379
379
  requirements:
@@ -387,7 +387,7 @@ dependencies:
387
387
  version_requirements: *id024
388
388
  prerelease: false
389
389
  - !ruby/object:Gem::Dependency
390
- type: :development
390
+ type: :runtime
391
391
  requirement: &id025 !ruby/object:Gem::Requirement
392
392
  none: false
393
393
  requirements:
@@ -401,7 +401,7 @@ dependencies:
401
401
  version_requirements: *id025
402
402
  prerelease: false
403
403
  - !ruby/object:Gem::Dependency
404
- type: :development
404
+ type: :runtime
405
405
  requirement: &id026 !ruby/object:Gem::Requirement
406
406
  none: false
407
407
  requirements:
@@ -415,7 +415,7 @@ dependencies:
415
415
  version_requirements: *id026
416
416
  prerelease: false
417
417
  - !ruby/object:Gem::Dependency
418
- type: :development
418
+ type: :runtime
419
419
  requirement: &id027 !ruby/object:Gem::Requirement
420
420
  none: false
421
421
  requirements:
@@ -429,7 +429,7 @@ dependencies:
429
429
  version_requirements: *id027
430
430
  prerelease: false
431
431
  - !ruby/object:Gem::Dependency
432
- type: :development
432
+ type: :runtime
433
433
  requirement: &id028 !ruby/object:Gem::Requirement
434
434
  none: false
435
435
  requirements:
@@ -445,7 +445,7 @@ dependencies:
445
445
  version_requirements: *id028
446
446
  prerelease: false
447
447
  - !ruby/object:Gem::Dependency
448
- type: :development
448
+ type: :runtime
449
449
  requirement: &id029 !ruby/object:Gem::Requirement
450
450
  none: false
451
451
  requirements:
@@ -459,7 +459,7 @@ dependencies:
459
459
  version_requirements: *id029
460
460
  prerelease: false
461
461
  - !ruby/object:Gem::Dependency
462
- type: :development
462
+ type: :runtime
463
463
  requirement: &id030 !ruby/object:Gem::Requirement
464
464
  none: false
465
465
  requirements:
@@ -473,7 +473,7 @@ dependencies:
473
473
  version_requirements: *id030
474
474
  prerelease: false
475
475
  - !ruby/object:Gem::Dependency
476
- type: :development
476
+ type: :runtime
477
477
  requirement: &id031 !ruby/object:Gem::Requirement
478
478
  none: false
479
479
  requirements: