bootstrap-navbar 1.0.0.pre7 → 1.0.0.pre8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bcb9a4cb1be226518e16e708ff935a7120fd4a6f
4
- data.tar.gz: 8404f2511e9f70624572815bdce02f25577277e4
3
+ metadata.gz: a32dd31868e0ace9697468bd0705c163ee94265e
4
+ data.tar.gz: 87c339d440b1fff10aa4a0540b6089f42b67bb62
5
5
  SHA512:
6
- metadata.gz: 2b9248812ff3c84489ce2e9b15bd85d43662ae456ede2bd13be170790db0fc97c41a4cec758ac7e6b5a798a45d3b37f01c1578a1e3a475ae39d9049c0b8f0fbe
7
- data.tar.gz: 7d59882129bbff2b4d121fcc2905a116b52296502a836eb1354d5b78f2e506e90f5d824df28d74d874c24a3257fb5683104c9022492c296d8517deda32dfa286
6
+ metadata.gz: 526f6c444e4a3a4a89b924ea8702c28de5138891d0f9608c760339ca5e64f1e691c1210e3c831f464ea28f5ba9e090b1e4b98bb3d029b0f8339cd4c3ca8d0c12
7
+ data.tar.gz: 9db4133c32ad30c4d7ab29bea5ebd3c7faf9943f1d200aac4248d5b236a525acd06b1176b053676e955a5cf0f677548e898e27cf1f253bb515d323585782ecc3
@@ -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
- attribute_hash = { class: css_classes.join(' '), role: 'form' }
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
@@ -1,3 +1,3 @@
1
1
  module BootstrapNavbar
2
- VERSION = '1.0.0.pre7'
2
+ VERSION = '1.0.0.pre8'
3
3
  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.pre7
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-08 00:00:00.000000000 Z
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