leather 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/helpers/navigation_helper.rb +1 -1
- data/lib/leather.rb +2 -0
- data/lib/leather/action_controller.rb +39 -0
- data/lib/leather/railtie.rb +12 -0
- data/lib/leather/version.rb +1 -1
- metadata +28 -50
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8f79b99910806fc9988438b2601b5b84eb3f2b17
|
4
|
+
data.tar.gz: b7badea1b713046253f92689fc1ec0459184c9da
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e694d48781b1ed396c541c40bf1f2bb269c927949d070b5bb2adf56d317a01b5f8ccf0427f449cb886ba918e2c1697874c33d580fe09b5e586d86ac8b09be4a2
|
7
|
+
data.tar.gz: fdcf855c6cd940175ab6b9dadb19190754b91b92abf31b687a81b1215f5420e58a1c982e17345fc3d3922ed55f983c7929581fc6d54d47fbc7d846b1fcd7bfae
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module NavigationHelper
|
2
2
|
def active_class(href, options)
|
3
|
-
if (
|
3
|
+
if (options[:nav_id].present? && current_tab?(options[:nav_id][0], options[:nav_id][1])) || current_page?(href)
|
4
4
|
'active'
|
5
5
|
else
|
6
6
|
''
|
data/lib/leather.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Leather
|
2
|
+
module ActionController
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
extend ClassMethods
|
7
|
+
helper_method :current_tab, :current_tab?
|
8
|
+
end
|
9
|
+
|
10
|
+
protected
|
11
|
+
|
12
|
+
def set_tab(name, namespace = nil)
|
13
|
+
tab_stack[namespace || :default] = name
|
14
|
+
end
|
15
|
+
|
16
|
+
def current_tab(namespace = nil)
|
17
|
+
tab_stack[namespace || :default]
|
18
|
+
end
|
19
|
+
|
20
|
+
def current_tab?(name, namespace = nil)
|
21
|
+
current_tab(namespace).to_s == name.to_s
|
22
|
+
end
|
23
|
+
|
24
|
+
def tab_stack
|
25
|
+
@tab_stack ||= {}
|
26
|
+
end
|
27
|
+
|
28
|
+
module ClassMethods
|
29
|
+
def set_tab(*args)
|
30
|
+
options = args.extract_options!
|
31
|
+
name, namespace = args
|
32
|
+
|
33
|
+
before_filter(options) do |controller|
|
34
|
+
controller.send(:set_tab, name, namespace)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/leather/version.rb
CHANGED
metadata
CHANGED
@@ -1,142 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.10
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Van Der Beek
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 4.1.1
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 4.1.1
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bootstrap-sass
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 3.2.0
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 3.2.0
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: devise
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: high_voltage
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: haml-rails
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: sqlite3
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rspec-rails
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: jquery-rails
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
description: Bootstrap tools - UI Kit, Devise Views, and Component Partials
|
@@ -146,6 +129,8 @@ executables: []
|
|
146
129
|
extensions: []
|
147
130
|
extra_rdoc_files: []
|
148
131
|
files:
|
132
|
+
- MIT-LICENSE
|
133
|
+
- Rakefile
|
149
134
|
- app/helpers/navigation_helper.rb
|
150
135
|
- app/views/leather/_dropdown_nav_item.html.haml
|
151
136
|
- app/views/leather/_modal.html.haml
|
@@ -156,9 +141,11 @@ files:
|
|
156
141
|
- app/views/leather/_nav_list.html.haml
|
157
142
|
- app/views/leather/_navbar.html.haml
|
158
143
|
- lib/generators/leather/install/install_generator.rb
|
144
|
+
- lib/leather.rb
|
145
|
+
- lib/leather/action_controller.rb
|
159
146
|
- lib/leather/leather_helpers.rb
|
147
|
+
- lib/leather/railtie.rb
|
160
148
|
- lib/leather/version.rb
|
161
|
-
- lib/leather.rb
|
162
149
|
- lib/tasks/leather_tasks.rake
|
163
150
|
- templates/_devise.css.scss
|
164
151
|
- templates/bootstrap_variables.css.scss
|
@@ -172,37 +159,28 @@ files:
|
|
172
159
|
- templates/views/pages/_table.html.erb
|
173
160
|
- templates/views/pages/home.html.erb
|
174
161
|
- templates/views/pages/ui_kit.html.erb
|
175
|
-
- MIT-LICENSE
|
176
|
-
- Rakefile
|
177
162
|
homepage: https://github.com/dvanderbeek/leather
|
178
163
|
licenses:
|
179
164
|
- MIT
|
165
|
+
metadata: {}
|
180
166
|
post_install_message:
|
181
167
|
rdoc_options: []
|
182
168
|
require_paths:
|
183
169
|
- lib
|
184
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
171
|
requirements:
|
187
|
-
- -
|
172
|
+
- - ">="
|
188
173
|
- !ruby/object:Gem::Version
|
189
174
|
version: '0'
|
190
|
-
segments:
|
191
|
-
- 0
|
192
|
-
hash: 1310215612161269156
|
193
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
176
|
requirements:
|
196
|
-
- -
|
177
|
+
- - ">="
|
197
178
|
- !ruby/object:Gem::Version
|
198
179
|
version: '0'
|
199
|
-
segments:
|
200
|
-
- 0
|
201
|
-
hash: 1310215612161269156
|
202
180
|
requirements: []
|
203
181
|
rubyforge_project:
|
204
|
-
rubygems_version:
|
182
|
+
rubygems_version: 2.2.2
|
205
183
|
signing_key:
|
206
|
-
specification_version:
|
184
|
+
specification_version: 4
|
207
185
|
summary: Bootstrap tools - UI Kit, Devise Views, and Component Partials
|
208
186
|
test_files: []
|