rails_layout 1.0.28 → 1.0.29

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e34a5527bcaa16a6da0667377342295fa77fec8
4
- data.tar.gz: 1a989c4335301f2c027268b18d0265894b76bca1
3
+ metadata.gz: 9a81da5a5b87f9b5caef0f99f4ca16d6dc6b18fd
4
+ data.tar.gz: b3fcb507662f6b38a9e718f368756059aa19d202
5
5
  SHA512:
6
- metadata.gz: b5d2bb04acea7cae6d71d9745a0a15ba41401cebaa8aa034c8fb95b112c3e00790a9f153d5bde7c03f68626789677a745b20fb66fe8e9b1cde568ba2c0b9925f
7
- data.tar.gz: cab3b7902c13feaee4d87ed4b1259c54b0c6e6e1f249c83159b9a8b3ebc23e8081fecaf72aa82b9c4031b0daab4920604a209bfe3ab9acc524aa5f0855c14193
6
+ metadata.gz: fb3a46aef15cd0c0d0cbc24829e9d6af3d44dd4b274ba8f94622229c0678e74153c75629382a9a70aca51e35320451ea76a631adb41e5261bae02beeadef0c45
7
+ data.tar.gz: 860e87b2b84cb74c7bb21d19147ce97dca96bdba1c4dbe2af378ca9433f7810f8f27659b1749d4358030a4bcc9cfb61db905c1f1c24c605c30b3c4cd2f0bd728
data/CHANGELOG.textile CHANGED
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h3. 1.0.29 November 23, 2015
4
+
5
+ * add navlink for an admin interface if Thoughbot Administrate gem was selected in Rails Composer
6
+
3
7
  h3. 1.0.28 November 4, 2015
4
8
 
5
9
  * move navigation auth links to a new partial 'app/views/layouts/_nav_links_for_auth.html.erb'
data/README.textile CHANGED
@@ -3,7 +3,7 @@ h1. !http://railsapps.github.io/images/rails-36x36.jpg(RailsLayout Gem)! RailsLa
3
3
  Use this gem to set up layout files for your choice of front-end framework:
4
4
 
5
5
  * Zurb Foundation 5.3
6
- * Bootstrap 3.2
6
+ * Bootstrap 3.3
7
7
 
8
8
  It also will set up "Devise":https://github.com/plataformatec/devise views with styling for Bootstrap or Foundation.
9
9
 
@@ -19,7 +19,7 @@ h4. !http://railsapps.github.io/images/join/join-railsapps.png(Join RailsApps)!:
19
19
 
20
20
  h4. Support the RailsApps Project
21
21
 
22
- If the RailsLayout gem is useful to you, please accept our invitation to "join the RailsApps project":http://railsapps.github.io/. The RailsApps project provides example applications, tutorials, and starter tools, including the RailsLayout gem.
22
+ If the RailsLayout gem is useful to you, please "support the RailsApps project":http://railsapps.github.io/ by purchasing our tutorials. The RailsApps project provides example applications, tutorials, and starter tools, including the RailsLayout gem.
23
23
 
24
24
  h2. Command Summary
25
25
 
@@ -67,7 +67,7 @@ gem 'compass-rails'
67
67
  gem 'zurb-foundation'
68
68
  </pre>
69
69
 
70
- h4. Bootstrap 3.2
70
+ h4. Bootstrap 3.3
71
71
 
72
72
  <pre>
73
73
  gem 'bootstrap-sass'
@@ -142,7 +142,7 @@ You can generate layout files suitable for use with the following front-end fram
142
142
 
143
143
  * @foundation5@ - Zurb Foundation 5.3
144
144
  * @foundation4@ - Zurb Foundation 4.0
145
- * @bootstrap3@ - Bootstrap 3.2
145
+ * @bootstrap3@ - Bootstrap 3.3
146
146
  * @bootstrap2@ - Bootstrap 2.3
147
147
  * @simple@ - simple layout
148
148
  * @none@ - removes all changes
@@ -156,20 +156,21 @@ The RailsLayout gem generates application layout files:
156
156
  * app/views/layouts/_navigation.html.erb
157
157
  * app/views/layouts/_navigation_links.html.erb
158
158
 
159
+ If Devise or OmniAuth is installed, there will be an additional file:
160
+
161
+ * app/views/layouts/_nav_links_for_auth.html.erb
162
+
159
163
  Additionally, when the @simple@ option is selected:
160
164
 
161
165
  * app/assets/stylesheets/simple.css
162
166
 
163
167
  h4. Note About the Navigation Partials
164
168
 
165
- Two navigation partials are created:
166
-
167
- * app/views/layouts/_navigation_links.html.erb
168
- * app/views/layouts/_navigation.html.erb
169
+ The *_navigation.html.erb* file contains framework-specific styling. Separating the files makes it easy to change the front-end framework without disturbing the links.
169
170
 
170
171
  The *_navigation_links.html.erb* file is only a list of links. You can add additional links to this file as needed. It contains no framework-specific styling.
171
172
 
172
- The *_navigation.html.erb* file contains framework-specific styling. Separating the files makes it easy to change the front-end framework without disturbing the links.
173
+ The *_nav_links_for_auth.html.erb* file is created if Devise or OmniAuth is installed.
173
174
 
174
175
  h4. Support for ERB, Haml, or Slim
175
176
 
@@ -264,9 +265,9 @@ and modify the file:
264
265
 
265
266
  * "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/install/templates/foundation4-application.js
266
267
 
267
- h3. Bootstrap 3.2 Layout
268
+ h3. Bootstrap 3.3 Layout
268
269
 
269
- To create layout files for use with Bootstrap 3.2:
270
+ To create layout files for use with Bootstrap 3.3:
270
271
 
271
272
  <pre>
272
273
  $ rails generate layout:install bootstrap3
@@ -379,7 +380,7 @@ This command is used to populate the navigation bar in starter applications crea
379
380
  $ rails generate layout:navigation --force
380
381
  </pre>
381
382
 
382
- Here's an example of a file *app/views/layouts/_navigation_links.html.erb* appropriate for Devise:
383
+ Here's an example of a file *app/views/layouts/_nav_links_for_auth.html.erb* appropriate for Devise:
383
384
 
384
385
  <pre>
385
386
  <%# add navigation links to this file %>
@@ -400,11 +401,7 @@ Here's an example of a file *app/views/layouts/_navigation_links.html.erb* appro
400
401
  <% end %>
401
402
  </pre>
402
403
 
403
- The full set of links will be created if the following files are found in your application:
404
-
405
- * app/views/devise/sessions/new.html.erb
406
- * app/views/devise/registrations/new.html.erb
407
- * app/views/users/index.html.erb
404
+ The full set of links will be created if initialization files are found for Devise or OmniAuth.
408
405
 
409
406
  h2. The "layout:devise" Command
410
407
 
@@ -67,6 +67,13 @@ LINKS
67
67
  navlink = " <li><%= link_to 'Admin', '/admin' %></li>"
68
68
  inject_into_file 'app/views/layouts/_nav_links_for_auth.html.erb', navlink + "\n", :after => "<% if current_user.try(:admin?) %>\n"
69
69
  end
70
+ # ADMINSTRATE (administrative dashboard)
71
+ if File.exists?('config/railscomposer.yml')
72
+ if Rails.application.config_for(:railscomposer)['dashboard'] == 'administrate'
73
+ navlink = " <li><%= link_to 'Admin', '/admin' %></li>"
74
+ inject_into_file 'app/views/layouts/_nav_links_for_auth.html.erb', navlink + "\n", :after => "<% if current_user.try(:admin?) %>\n"
75
+ end
76
+ end
70
77
  end
71
78
 
72
79
  def modify_layout_for_auth_links
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "1.0.28"
2
+ VERSION = "1.0.29"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.28
4
+ version: 1.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-04 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler