simple_navigation_renderers 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75c2d6062eed56d76c167e010f5b7aed27febb81
4
- data.tar.gz: a33a8834eab2ee4956a7085b9866c8ce1731ae34
3
+ metadata.gz: 91282c1d4df62662e0eb0aeb067a09a6f47807c2
4
+ data.tar.gz: bf68ec6f8caebe6b16af750b64aad507b81839bb
5
5
  SHA512:
6
- metadata.gz: 6294b0a57fb7f3d55845674ea6cf1e956be576a6ba4c275b07918355af5e39f92644e18630df4cf37125f4770ef05ce83e8d037ad641a527220dfaa84c1d8da1
7
- data.tar.gz: 58c7f34eac95c85d521db3bb89000155907c3445771a68bb71c0a892e153923174f53214a462258dba29312e9f48b78a17b552146cb4e44dca4d7d00943a05b0
6
+ metadata.gz: 06d6eac45592eb6204ab6dde757ac32ec50259cff9a350f31f101a1c989245fc67eb22acabb3b5e12ec49e7476321ec3a744e7757fde47a6a79ef03520b879f9
7
+ data.tar.gz: e66250944f14434a3d40a17a3303b8aa0e869319748dedb1f8f0dfed0298e629b57b0133c64f93c6996bbc5bdf2bd843b840f1ba949a920458b5213ed1e7bd8a
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - "2.0.0"
4
+ - "1.9.3"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.0.2
2
+
3
+ * add Travis CI
4
+ * fix README
5
+
6
+
1
7
  ## v0.0.1
2
8
 
3
9
  * Bootstrap 2 and Bootstrap 3 renderers
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SimpleNavigationRenderers
1
+ # SimpleNavigationRenderers [![Build Status](https://travis-ci.org/ShPakvel/simple_navigation_renderers.png?branch=master)](https://travis-ci.org/ShPakvel/simple_navigation_renderers)
2
2
 
3
3
  This gem adds several [Simple Navigation](https://github.com/andi/simple-navigation) renderers.
4
4
  For now, it is include renderers for:
@@ -11,21 +11,21 @@ With these renderers you can create any bootstrap navigation elements, such as:
11
11
 
12
12
  Add this line to your application's Gemfile:
13
13
 
14
- ```ruby
15
- gem 'simple_navigation_renderers'
16
- ```
14
+ ```ruby
15
+ gem 'simple_navigation_renderers'
16
+ ```
17
17
 
18
18
  and then execute:
19
19
 
20
- ```console
21
- $ bundle
22
- ```
20
+ ```console
21
+ $ bundle
22
+ ```
23
23
 
24
24
  Or install it yourself as:
25
25
 
26
- ```console
27
- $ gem install simple_navigation_renderers
28
- ```
26
+ ```console
27
+ $ gem install simple_navigation_renderers
28
+ ```
29
29
 
30
30
 
31
31
  ## Usage
@@ -74,27 +74,27 @@ If not, you can always look at the [configuration instructions](https://github.c
74
74
  In addition to standard options you can use ones specific for Bootstrap renderers.
75
75
  Lets look at the example:
76
76
 
77
- ```ruby
78
- SimpleNavigation::Configuration.run do |navigation|
79
- navigation.renderer = SimpleNavigationRenderers::Bootstrap3
80
- navigation.items do |primary|
81
- primary.item :news, {icon: "fa fa-fw fa-bullhorn", text: "News"}, news_index_path, highlights_on: :subpath
82
- primary.item :concerts, "Concerts", concerts_path, highlights_on: :subpath
83
- primary.item :video, "Video", videos_path, highlights_on: :subpath
84
- primary.item :info, {icon: "fa fa-fw fa-book", title: "Info"}, info_index_path, divider: true, split: true, highlights_on: :subpath do |info_nav|
85
- info_nav.item :main_info_page, "Main info page", info_path(:main_info_page)
86
- info_nav.item :about_info_page, "About", info_path(:about_info_page)
87
- info_nav.item :misc_info_pages, "Misc.", divider: true do |misc_page|
88
- misc_page.item :header_misc_pages, "Misc. Pages", header: true
89
- Info.all.each do |info_page|
90
- misc_page.item :"#{info_page.permalink}", info_page.title, info_path(info_page)
91
- end
92
- end
93
- info_nav.item :contact_info_page, "Contact", info_path(:contact_info_page), divider: true
77
+ ```ruby
78
+ SimpleNavigation::Configuration.run do |navigation|
79
+ navigation.renderer = SimpleNavigationRenderers::Bootstrap3
80
+ navigation.items do |primary|
81
+ primary.item :news, {icon: "fa fa-fw fa-bullhorn", text: "News"}, news_index_path, highlights_on: :subpath
82
+ primary.item :concerts, "Concerts", concerts_path, highlights_on: :subpath
83
+ primary.item :video, "Video", videos_path, highlights_on: :subpath
84
+ primary.item :info, {icon: "fa fa-fw fa-book", title: "Info"}, info_index_path, divider: true, split: true, highlights_on: :subpath do |info_nav|
85
+ info_nav.item :main_info_page, "Main info page", info_path(:main_info_page)
86
+ info_nav.item :about_info_page, "About", info_path(:about_info_page)
87
+ info_nav.item :misc_info_pages, "Misc.", divider: true do |misc_page|
88
+ misc_page.item :header_misc_pages, "Misc. Pages", header: true
89
+ Info.all.each do |info_page|
90
+ misc_page.item :"#{info_page.permalink}", info_page.title, info_path(info_page)
94
91
  end
95
92
  end
93
+ info_nav.item :contact_info_page, "Contact", info_path(:contact_info_page), divider: true
96
94
  end
97
- ```
95
+ end
96
+ end
97
+ ```
98
98
 
99
99
  Specific options used in the example:
100
100
 
@@ -127,55 +127,55 @@ Specific options used in the example:
127
127
 
128
128
  or you can add them all together:
129
129
 
130
- ```scss
131
- @import "simple_navigation_bootstrap";
132
- ```
130
+ ```scss
131
+ @import "simple_navigation_bootstrap";
132
+ ```
133
133
 
134
134
  #### Result
135
135
 
136
136
  Thus, above example will produce something like following code:
137
137
 
138
- ```html
139
- <ul class="nav navbar-nav">
140
- <li class="active simple-navigation-active-leaf" id="news">
141
- <a href="/news_index_path"><span class="fa fa-fw fa-bullhorn"></span> News</a>
142
- </li>
143
- <li id="concerts"><a href="/concerts_path">Concerts</a></li>
144
- <li id="video"><a href="/videos_path">Video</a></li>
145
- <li class="divider-vertical"></li>
146
- <li class="dropdown-split-left" id="info">
147
- <a href="/info_index_path"><span class="fa fa-fw fa-book" title="Info"></span></a>
148
- </li>
149
- <li class="dropdown dropdown-split-right">
150
- <a class="dropdown-toggle" data-target="#" data-toggle="dropdown" href="#"><b class="caret"></b></a>
151
- <ul class="pull-right dropdown-menu">
152
- <li id="main_info_page"><a href="/info/main_info_page">Main info page</a></li>
153
- <li id="about_info_page"><a href="/info/about_info_page">About</a></li>
154
- <li class="divider"></li>
155
- <li class="dropdown-submenu" id="misc_info_pages">
156
- <a href="#">Misc.</a>
157
- <ul class="dropdown-menu">
158
- <li class="dropdown-header">Misc. Pages</li>
159
- <li id="page1"><a href="/info/page1">Page1</a></li>
160
- <li id="page2"><a href="/info/page2">Page2</a></li>
161
- </ul>
162
- </li>
163
- <li class="divider"></li>
164
- <li id="contact_info_page"><a href="/info/contact_info_page">Contact</a></li>
138
+ ```html
139
+ <ul class="nav navbar-nav">
140
+ <li class="active simple-navigation-active-leaf" id="news">
141
+ <a href="/news_index_path"><span class="fa fa-fw fa-bullhorn"></span> News</a>
142
+ </li>
143
+ <li id="concerts"><a href="/concerts_path">Concerts</a></li>
144
+ <li id="video"><a href="/videos_path">Video</a></li>
145
+ <li class="divider-vertical"></li>
146
+ <li class="dropdown-split-left" id="info">
147
+ <a href="/info_index_path"><span class="fa fa-fw fa-book" title="Info"></span></a>
148
+ </li>
149
+ <li class="dropdown dropdown-split-right">
150
+ <a class="dropdown-toggle" data-target="#" data-toggle="dropdown" href="#"><b class="caret"></b></a>
151
+ <ul class="pull-right dropdown-menu">
152
+ <li id="main_info_page"><a href="/info/main_info_page">Main info page</a></li>
153
+ <li id="about_info_page"><a href="/info/about_info_page">About</a></li>
154
+ <li class="divider"></li>
155
+ <li class="dropdown-submenu" id="misc_info_pages">
156
+ <a href="#">Misc.</a>
157
+ <ul class="dropdown-menu">
158
+ <li class="dropdown-header">Misc. Pages</li>
159
+ <li id="page1"><a href="/info/page1">Page1</a></li>
160
+ <li id="page2"><a href="/info/page2">Page2</a></li>
165
161
  </ul>
166
162
  </li>
163
+ <li class="divider"></li>
164
+ <li id="contact_info_page"><a href="/info/contact_info_page">Contact</a></li>
167
165
  </ul>
168
- ```
166
+ </li>
167
+ </ul>
168
+ ```
169
169
 
170
170
 
171
171
  ## Test
172
172
 
173
173
  Just run following commands:
174
174
 
175
- ```console
176
- $ bundle
177
- $ rake
178
- ```
175
+ ```console
176
+ $ bundle
177
+ $ rake
178
+ ```
179
179
 
180
180
 
181
181
  ## Contributing
@@ -7,5 +7,5 @@ require "simple_navigation_renderers/version"
7
7
  module SimpleNavigationRenderers
8
8
  end
9
9
 
10
- SimpleNavigation.register_renderer :bootstrap2 => SimpleNavigationRenderers::Bootstrap2
11
- SimpleNavigation.register_renderer :bootstrap3 => SimpleNavigationRenderers::Bootstrap3
10
+ SimpleNavigation.register_renderer( bootstrap2: SimpleNavigationRenderers::Bootstrap2 )
11
+ SimpleNavigation.register_renderer( bootstrap3: SimpleNavigationRenderers::Bootstrap3 )
@@ -1,3 +1,3 @@
1
1
  module SimpleNavigationRenderers
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_navigation_renderers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Shpak
@@ -93,6 +93,7 @@ files:
93
93
  - .gitignore
94
94
  - .rspec
95
95
  - .rvmrc
96
+ - .travis.yml
96
97
  - CHANGELOG.md
97
98
  - Gemfile
98
99
  - LICENSE.txt