rails_layout 1.0.19 → 1.0.20
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 +4 -4
- data/CHANGELOG.textile +4 -0
- data/lib/generators/layout/navigation/navigation_generator.rb +14 -18
- data/lib/rails_layout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e64744c20d753039c9cd6f7f4f265c03ee873da5
|
|
4
|
+
data.tar.gz: 5412d21ea097dbef9823a7f2949819526fcaee95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6360f95afec10ef1c440ee43f0b8fdc74ba175985a725500d5c81a17e1e0aa172fa3f5fb76c518b977e6459412b56c3be9d9945a2162787eb8e735a936e86820
|
|
7
|
+
data.tar.gz: da6cfbef17d88dfb3ebe8dfed8a65b4a45dfdd2bff705360df1795e11b9c439f426e93b5ceff1b093abbbcc1857d7400b8357c2b2dad5788fb2f6473e3ae89da
|
data/CHANGELOG.textile
CHANGED
|
@@ -26,46 +26,42 @@ module Layout
|
|
|
26
26
|
<li><%= link_to 'Sign in', new_user_session_path %></li>
|
|
27
27
|
<li><%= link_to 'Sign up', new_user_registration_path %></li>
|
|
28
28
|
<% end %>
|
|
29
|
+
LINKS
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
# OMNIAUTH
|
|
33
|
+
if File.exists?('config/initializers/omniauth.rb')
|
|
34
|
+
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
35
|
+
<% if user_signed_in? %>
|
|
36
|
+
<li><%= link_to 'Sign out', signout_path %></li>
|
|
37
|
+
<% else %>
|
|
38
|
+
<li><%= link_to 'Sign in', signin_path %></li>
|
|
39
|
+
<% end %>
|
|
29
40
|
LINKS
|
|
30
41
|
end
|
|
31
42
|
end
|
|
32
43
|
# USERS
|
|
33
|
-
if
|
|
44
|
+
if Dir.glob("app/views/users/index.html.{#{ext},erb}").any?
|
|
34
45
|
if User.column_names.include? 'role'
|
|
35
46
|
# suitable for role-based authorization
|
|
36
|
-
|
|
37
|
-
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
47
|
+
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
38
48
|
<% if user_signed_in? %>
|
|
39
49
|
<% if current_user.admin? %>
|
|
40
50
|
<li><%= link_to 'Users', users_path %></li>
|
|
41
51
|
<% end %>
|
|
42
52
|
<% end %>
|
|
43
53
|
LINKS
|
|
44
|
-
end
|
|
45
54
|
end
|
|
46
55
|
else
|
|
47
56
|
# suitable for simple authentication
|
|
48
|
-
|
|
49
|
-
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
57
|
+
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
50
58
|
<% if user_signed_in? %>
|
|
51
59
|
<li><%= link_to 'Users', users_path %></li>
|
|
52
60
|
<% end %>
|
|
53
61
|
LINKS
|
|
54
|
-
end
|
|
55
62
|
end
|
|
56
63
|
end
|
|
57
64
|
end
|
|
58
|
-
# OMNIAUTH
|
|
59
|
-
if File.exists?('config/initializers/omniauth.rb')
|
|
60
|
-
append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
|
|
61
|
-
<% if user_signed_in? %>
|
|
62
|
-
<li><%= link_to 'Sign out', signout_path %></li>
|
|
63
|
-
<% else %>
|
|
64
|
-
<li><%= link_to 'Sign in', signin_path %></li>
|
|
65
|
-
<% end %>
|
|
66
|
-
LINKS
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
65
|
end
|
|
70
66
|
|
|
71
67
|
def add_tests
|
data/lib/rails_layout/version.rb
CHANGED
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.
|
|
4
|
+
version: 1.0.20
|
|
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-06-
|
|
11
|
+
date: 2014-06-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|