tiny_navigation 0.1.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.specification CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_navigation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Coroutine
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-12 00:00:00 -05:00
19
+ date: 2010-07-28 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
data/README.rdoc CHANGED
@@ -1,28 +1,12 @@
1
1
  = Tiny Navigation
2
2
 
3
- == Installation
3
+ TinyNavigation provides an easy-to-use DSL for defining navigation structures.
4
4
 
5
- === As a Plugin
6
5
 
7
- * For Rails 2.x
8
-
9
- script/generate plugin install git@github.com:coroutine/tiny_navigation.git
10
-
11
- === As a gem
12
-
13
- gem install tiny_navigation
14
-
15
-
16
- Then, simply call:
17
-
18
- script/generate tiny_navigation
19
-
20
- This will place the tiny_navigation.rb config file into your config directory.
21
6
 
22
7
  == Usage
23
8
 
24
- TinyNavigation provides an easy-to-use DSL for defining navigation structures;
25
- these structures are defined in config/tiny_navigation.rb and are accessed
9
+ TinyNavigation's structures are defined in config/tiny_navigation.rb and are accessed
26
10
  via a single method: <tt>navigation</tt>. For example, provided the following
27
11
  configuration:
28
12
 
@@ -45,7 +29,9 @@ The resulting structure could be used to generate the markup. For example:
45
29
  end).join("")
46
30
  end
47
31
 
48
- === Here are a few things TinyNavigation WILL do:
32
+
33
+
34
+ == What TinyNavigation WILL do:
49
35
 
50
36
  * It provides the ability to define and map menu items to resources using the
51
37
  convention set forth in the Rails 3 router. For example, to map a menu item
@@ -98,9 +84,9 @@ The resulting structure could be used to generate the markup. For example:
98
84
 
99
85
  * It delegates controller method calls made from within the config file to the
100
86
  current controller. For instance, let's say you're using Ryan Bates' fantastic
101
- CanCan gem for authorization--which adds a some methods to the controller, namely
102
- the <tt>can?</tt> method--and you want to show or hide navigation items based upon
103
- a user's ability. You can do that! Check it:
87
+ {CanCan}[http://rubygems.org/gems/cancan] gem for authorization--which adds a some
88
+ methods to the controller, namely the <tt>can?</tt> method--and you want to show
89
+ or hide navigation items based upon a user's ability. You can do that! Check it:
104
90
 
105
91
  navigation :main do
106
92
  item("Foo", :to => "foos#index") if can? :read, Foo
@@ -113,7 +99,10 @@ The resulting structure could be used to generate the markup. For example:
113
99
  it will take precedence over a controller attribute of the same name, thus
114
100
  hiding access to the controller attribute from within the config file.
115
101
 
116
- === Here are a couple things that TinyNavigation WILL NOT do:
102
+
103
+
104
+
105
+ == What TinyNavigation WILL NOT do:
117
106
 
118
107
  * TinyNavigation makes no attempt at rendering the navigation. That's up
119
108
  to you. You may want to render your nav items into <tt>div</tt> tags, while
@@ -125,4 +114,79 @@ The resulting structure could be used to generate the markup. For example:
125
114
  to the current controller from within config/tiny_navigation.rb, you can
126
115
  do that.
127
116
 
128
- Copyright (c) 2010 Coroutine, released under the MIT license
117
+
118
+
119
+ == Helpful Links
120
+
121
+ * <b>Repository:</b> http://github.com/coroutine/tiny_navigation
122
+ * <b>Gem:</b> http://rubygems.org/gems/tiny_navigation
123
+ * <b>Authors:</b> http://coroutine.com
124
+
125
+
126
+
127
+ == Installation & Generators (Rails 3)
128
+
129
+ Install me from RubyGems.org by adding a gem dependency to your Gemfile. Bundler does
130
+ the rest.
131
+
132
+ gem "tiny_navigation"
133
+
134
+ $ bundle install
135
+
136
+ Then generate the required config file.
137
+
138
+ $ rails g tiny_navigation
139
+
140
+
141
+
142
+ == Installation & Generators (Rails 2)
143
+
144
+ Install as a gem from RubyGems.org and add a gem dependency in the appropriate file.
145
+
146
+ $ gem install tiny_navigation
147
+
148
+ Or install as a plugin.
149
+
150
+ $ script/plugin install git://github.com/coroutine/tiny_navigation.git
151
+
152
+ Either way, then generate the required config file.
153
+
154
+ $ script/generate tiny_navigation
155
+
156
+
157
+
158
+ == Gemroll
159
+
160
+ Other gems by Coroutine include:
161
+
162
+ * {acts_as_current}[http://github.com/coroutine/acts_as_current]
163
+ * {acts_as_label}[http://github.com/coroutine/acts_as_label]
164
+ * {acts_as_list_with_sti_support}[http://github.com/coroutine/acts_as_list_with_sti_support]
165
+ * {delayed_form_observer}[http://github.com/coroutine/delayed_form_observer]
166
+ * {kenny_dialoggins}[http://github.com/coroutine/kenny_dialoggins]
167
+ * {michael_hintbuble}[http://github.com/coroutine/michael_hintbuble]
168
+
169
+
170
+
171
+ == License
172
+
173
+ Copyright (c) 2010 {Coroutine LLC}[http://coroutine.com].
174
+
175
+ Permission is hereby granted, free of charge, to any person obtaining
176
+ a copy of this software and associated documentation files (the
177
+ "Software"), to deal in the Software without restriction, including
178
+ without limitation the rights to use, copy, modify, merge, publish,
179
+ distribute, sublicense, and/or sell copies of the Software, and to
180
+ permit persons to whom the Software is furnished to do so, subject to
181
+ the following conditions:
182
+
183
+ The above copyright notice and this permission notice shall be
184
+ included in all copies or substantial portions of the Software.
185
+
186
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
187
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
188
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
189
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
190
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
191
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
192
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 1.0.0
@@ -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.3"
8
+ s.version = "1.0.0"
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-07-28}
12
+ s.date = %q{2010-10-10}
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 = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_navigation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
- - 0
8
7
  - 1
9
- - 3
10
- version: 0.1.3
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Coroutine
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-28 00:00:00 -05:00
19
+ date: 2010-10-10 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency