tiny_navigation 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -22,7 +22,28 @@ This will place the tiny_navigation.rb config file into your config directory.
22
22
  == Usage
23
23
 
24
24
  TinyNavigation provides an easy-to-use DSL for defining navigation structures;
25
- these structures are defined in config/tiny_navigation.rb.
25
+ these structures are defined in config/tiny_navigation.rb and are accessed
26
+ via a single method: <tt>navigation</tt>. For example, provided the following
27
+ configuration:
28
+
29
+ navigation :main do
30
+ item "Store", :to => "products#index"
31
+ item "Blog", :to => "blog#index"
32
+ end
33
+
34
+ the code for accessing this structure would be:
35
+
36
+ navigation :main
37
+
38
+ The resulting structure could be used to generate the markup. For example:
39
+
40
+ content_tag :ul, :class => :tabs do
41
+ (navigation(:main).items.map do |item|
42
+ content_tag :li do
43
+ link_to item.name, item.url, :class => item.selected? ? :selected : ""
44
+ end
45
+ end).join("")
46
+ end
26
47
 
27
48
  === Here are a few things TinyNavigation WILL do:
28
49
 
@@ -69,7 +90,7 @@ these structures are defined in config/tiny_navigation.rb.
69
90
  Now, when we render the navigation items we can call <tt>align</tt> on
70
91
  the item to get its value:
71
92
 
72
- navigation(:main).each do |item|
93
+ navigation(:main).items.each do |item|
73
94
  if item.align == :right
74
95
  ...
75
96
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
Binary file
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tiny_navigation}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Coroutine", "Tim Lowrimore"]
12
- s.date = %q{2010-05-13}
12
+ s.date = %q{2010-05-14}
13
13
  s.description = %q{TinyNavigation makes it easy to define site navigation using a small DSL.}
14
14
  s.email = %q{gems@coroutine.com}
15
15
  s.extra_rdoc_files = [
@@ -21,14 +21,17 @@ Gem::Specification.new do |s|
21
21
  "Rakefile",
22
22
  "VERSION",
23
23
  "generators/tiny_navigation/USAGE",
24
- "generators/tiny_navigation/tiny_navigation_generator.rb",
25
24
  "generators/tiny_navigation/templates/tiny_navigation.rb",
25
+ "generators/tiny_navigation/tiny_navigation_generator.rb",
26
26
  "init.rb",
27
27
  "lib/tiny_navigation.rb",
28
28
  "lib/tiny_navigation/item.rb",
29
29
  "lib/tiny_navigation/navigation.rb",
30
+ "pkg/simple_navigation-0.1.0.gem",
31
+ "pkg/tiny_navigation-0.1.0.gem",
30
32
  "test/navigation_test.rb",
31
33
  "test/test_helper.rb",
34
+ "tiny_navigation.gemspec",
32
35
  "uninstall.rb"
33
36
  ]
34
37
  s.homepage = %q{http://github.com/coroutine/tiny_navigation}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Coroutine
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-13 00:00:00 -05:00
18
+ date: 2010-05-14 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -40,9 +40,10 @@ files:
40
40
  - lib/tiny_navigation/item.rb
41
41
  - lib/tiny_navigation/navigation.rb
42
42
  - pkg/simple_navigation-0.1.0.gem
43
- - simple_navigation.gemspec
43
+ - pkg/tiny_navigation-0.1.0.gem
44
44
  - test/navigation_test.rb
45
45
  - test/test_helper.rb
46
+ - tiny_navigation.gemspec
46
47
  - uninstall.rb
47
48
  has_rdoc: true
48
49
  homepage: http://github.com/coroutine/tiny_navigation