trap 0.0.1 → 1.0.0
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/lib/trap/helpers/bootstrap_helper.rb +23 -0
- data/lib/trap/version.rb +1 -1
- data/lib/trap.rb +1 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a868c88fe829672a906f026eef464625fe63662f
|
|
4
|
+
data.tar.gz: 48ea4bf781f5eb68710f197a190773e2a959c5c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1a925558ee5f4ea2543ad4d58d2843c407458fdce6356de8830d1c0693a9fc1f940b1b354fd6d3375fbd00286c8f30120168d431caf517d7e56a9a07ded468c
|
|
7
|
+
data.tar.gz: bc677123fcaf1eae8ae6d8ff0601230d6fa52fcd93ed6ae22d78665768653b465b601cf911820f6f4a8a521c900984bdc24c9881b81f7bf95e2658227abe8d62
|
|
@@ -8,6 +8,29 @@ module BootstrapHelper
|
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
def dropdown(text, icon = nil, &block)
|
|
12
|
+
content_tag :li, class: :drowdown do
|
|
13
|
+
concat(link_to('#', class: 'dropdown-toggle', data: { toggle: :dropdown }) do
|
|
14
|
+
if icon
|
|
15
|
+
concat icon_element icon
|
|
16
|
+
concat ' '
|
|
17
|
+
end
|
|
18
|
+
concat text
|
|
19
|
+
unless icon
|
|
20
|
+
concat ' '
|
|
21
|
+
concat content_tag :span, '', class: :caret
|
|
22
|
+
end
|
|
23
|
+
end)
|
|
24
|
+
concat(content_tag(:ul, class: 'dropdown-menu') do
|
|
25
|
+
yield block
|
|
26
|
+
end)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def icon_element(name)
|
|
31
|
+
content_tag :span, '', class: "glyphicon glyphicon-#{name}"
|
|
32
|
+
end
|
|
33
|
+
|
|
11
34
|
private
|
|
12
35
|
|
|
13
36
|
def is_active?(path, options = {})
|
data/lib/trap/version.rb
CHANGED
data/lib/trap.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
79
79
|
version: '0'
|
|
80
80
|
requirements: []
|
|
81
81
|
rubyforge_project:
|
|
82
|
-
rubygems_version: 2.
|
|
82
|
+
rubygems_version: 2.5.1
|
|
83
83
|
signing_key:
|
|
84
84
|
specification_version: 4
|
|
85
85
|
summary: Bootstrap helpers
|