rails_layout 1.0.6 → 1.0.7

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: 789a055991b9c9b5e0d81196a96e830f35faaa3b
4
- data.tar.gz: a8a4e70ae9a9aad01663186a5f7fa444167eccbf
3
+ metadata.gz: 913fa9b0ba9defd19191923a7f8aea57d3cd703c
4
+ data.tar.gz: 46779058a67b6d3f7e6ead5ef26ca05e6568fd6b
5
5
  SHA512:
6
- metadata.gz: 6b2b7ab3ca2b3acac3aadf7fae4414a7b1d2794ecd63e820ebaf3c253f5929f547979f5eb656f3c06fb5916529951064c0587df8e521ff1ac730408a957df0b1
7
- data.tar.gz: 5f80815d397798be0575c69883d67e7fa7969a398f64b71106907f27537c710459ed2164162f0a5247cd5f39e0a5d06db8aa04859fa840a5fa093608d6737151
6
+ metadata.gz: 3390e2e82341dc16307268f493b0eca89ebbb19ab3d132ffd5a495faff4f7edcac53235505da5125651a758c750bd74b85e056100d182bd320efe919293018f0
7
+ data.tar.gz: c8500ff57f65b1f99fc6fafdfe89d7122eb6218394a2b862bbefea491366cb71d534fa0a460faf6984e9b376d349053666c9e60c01dab8e376a5afdeb86e6e63
data/CHANGELOG.textile CHANGED
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h3. 1.0.7 February 15, 2014
4
+
5
+ * generate Devise navigation links when Devise initializer is present
6
+
3
7
  h3. 1.0.6 February 13, 2014
4
8
 
5
9
  * add OmniAuth navigation links
@@ -16,20 +16,14 @@ module Layout
16
16
  append_file 'app/views/layouts/_navigation_links.html.erb', "<li><%= link_to 'About', page_path('about') %></li>\n" if File.exists?("app/views/pages/about.html.#{ext}")
17
17
  # CONTACT
18
18
  append_file 'app/views/layouts/_navigation_links.html.erb', "<li><%= link_to 'Contact', new_contact_path %></li>\n" if File.exists?("app/views/contacts/new.html.#{ext}")
19
- # DEVISE LOGIN and LOGOUT
20
- if Dir.glob("app/views/devise/sessions/new.html.{#{ext},erb}").any?
19
+ # DEVISE
20
+ if File.exists?('config/initializers/devise.rb')
21
21
  append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
22
22
  <% if user_signed_in? %>
23
23
  <li><%= link_to 'Logout', destroy_user_session_path, :method=>'delete' %></li>
24
24
  <% else %>
25
25
  <li><%= link_to 'Login', new_user_session_path %></li>
26
26
  <% end %>
27
- LINKS
28
- end
29
- end
30
- # DEVISE SIGN UP
31
- if Dir.glob("app/views/devise/registrations/new.html.{#{ext},erb}").any?
32
- append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
33
27
  <% if user_signed_in? %>
34
28
  <li><%= link_to 'Edit account', edit_user_registration_path %></li>
35
29
  <% else %>
@@ -38,7 +32,7 @@ LINKS
38
32
  LINKS
39
33
  end
40
34
  end
41
- # USERS LINK
35
+ # USERS
42
36
  if Dir.glob("app/views/users/index.html.{#{ext},erb}").any?
43
37
  append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
44
38
  <% if user_signed_in? %>
@@ -48,7 +42,7 @@ LINKS
48
42
  end
49
43
  end
50
44
  # OMNIAUTH
51
- if Dir.glob("config/initializers/omniauth.rb").any?
45
+ if File.exists?('config/initializers/omniauth.rb')
52
46
  append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
53
47
  <% if user_signed_in? %>
54
48
  <li><%= link_to 'Logout', signout_path %></li>
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
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.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
11
+ date: 2014-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler