bootstrap-navbar 1.0.0.pre7 → 1.0.0.pre8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a32dd31868e0ace9697468bd0705c163ee94265e
|
4
|
+
data.tar.gz: 87c339d440b1fff10aa4a0540b6089f42b67bb62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 526f6c444e4a3a4a89b924ea8702c28de5138891d0f9608c760339ca5e64f1e691c1210e3c831f464ea28f5ba9e090b1e4b98bb3d029b0f8339cd4c3ca8d0c12
|
7
|
+
data.tar.gz: 9db4133c32ad30c4d7ab29bea5ebd3c7faf9943f1d200aac4248d5b236a525acd06b1176b053676e955a5cf0f677548e898e27cf1f253bb515d323585782ecc3
|
data/lib/bootstrap-navbar.rb
CHANGED
@@ -15,3 +15,4 @@ require_relative 'bootstrap-navbar/version'
|
|
15
15
|
require_relative 'bootstrap-navbar/helpers'
|
16
16
|
require_relative 'bootstrap-navbar/helpers/bootstrap2'
|
17
17
|
require_relative 'bootstrap-navbar/helpers/bootstrap3'
|
18
|
+
require_relative 'bootstrap-navbar/railtie' if defined?(Rails)
|
@@ -51,7 +51,8 @@ HTML
|
|
51
51
|
css_classes = %w(navbar-form).tap do |css_classes|
|
52
52
|
css_classes << "navbar-#{options[:align]}" if options.has_key?(:align)
|
53
53
|
end
|
54
|
-
|
54
|
+
role = options[:role] || 'form'
|
55
|
+
attribute_hash = { class: css_classes.join(' '), role: role }
|
55
56
|
attributes = attributes_for_tag(attribute_hash)
|
56
57
|
prepare_html <<-HTML.chomp!
|
57
58
|
<form#{attributes}>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bootstrap-navbar'
|
2
|
+
|
3
|
+
module BootstrapNavbar
|
4
|
+
class Railtie < Rails::Railtie
|
5
|
+
config.after_initialize do
|
6
|
+
# If Bootstrap version isn't set yet and the gem bootstrap-sass is loaded, sniff the Bootstrap version from it
|
7
|
+
if BootstrapNavbar.configuration.bootstrap_version.nil? && Gem.loaded_specs.keys.include?('bootstrap-sass')
|
8
|
+
bootstrap_sass_version = Gem.loaded_specs['bootstrap-sass'].version
|
9
|
+
bootstrap_version = bootstrap_sass_version.segments.take(3).join('.')
|
10
|
+
BootstrapNavbar.configure do |config|
|
11
|
+
config.bootstrap_version = bootstrap_version
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-navbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Meurer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- lib/bootstrap-navbar/helpers.rb
|
112
112
|
- lib/bootstrap-navbar/helpers/bootstrap2.rb
|
113
113
|
- lib/bootstrap-navbar/helpers/bootstrap3.rb
|
114
|
+
- lib/bootstrap-navbar/railtie.rb
|
114
115
|
- lib/bootstrap-navbar/version.rb
|
115
116
|
- spec/bootstrap-navbar/helpers/bootstrap2_spec.rb
|
116
117
|
- spec/bootstrap-navbar/helpers/bootstrap3_spec.rb
|