bootstrap-navbar 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bootstrap-navbar/helpers.rb +12 -6
- data/lib/bootstrap-navbar/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cc392ed4fa1d3e83f5fc80c45d3ecdba6f40cc90d461121fd819f1007988041
|
4
|
+
data.tar.gz: 3a38e72073822df3b680f9d83fa3980d5b3d4a934ed4f4284f9a29a421643df7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c784e8696061c9e811d56ee4b4d09fba4f3f8060bad3d7881280664f4c54d4116fca3c9f06a342a82adbb90a278524e446b32b6548529fb15f219fc2333d7a6
|
7
|
+
data.tar.gz: bf113aeb8447827cf56e314a00c861840f76c98849caed084584c273fafb7d26d18aa6be36585c261eb65d2dbd4bfdbfcb7beff1b37a7f0d37186880ccbd5b65
|
@@ -1,13 +1,19 @@
|
|
1
1
|
module BootstrapNavbar::Helpers
|
2
2
|
def self.included(base)
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
BootstrapNavbar.configuration.bootstrap_version ||= begin
|
4
|
+
node_package_config = "node_modules/bootstrap/package.json"
|
5
|
+
|
6
|
+
case
|
7
|
+
when bootstrap_gem = %w(bootstrap bootstrap-sass).detect { |gem| Gem.loaded_specs.keys.include?(gem) }
|
8
|
+
bootstrap_gem_version = Gem.loaded_specs[bootstrap_gem].version
|
9
|
+
bootstrap_gem_version.segments.take(3).join('.')
|
10
|
+
when File.exist?(node_package_config)
|
11
|
+
JSON.load(File.read(node_package_config)).fetch("version")
|
12
|
+
else
|
13
|
+
raise "Could not determine Bootstrap version from gems or Node package."
|
6
14
|
end
|
7
|
-
bootstrap_gem_version = Gem.loaded_specs[bootstrap_gem].version
|
8
|
-
bootstrap_version = bootstrap_gem_version.segments.take(3).join('.')
|
9
|
-
BootstrapNavbar.configuration.bootstrap_version = bootstrap_version
|
10
15
|
end
|
16
|
+
|
11
17
|
helper_version = BootstrapNavbar.configuration.bootstrap_version[0]
|
12
18
|
base.send :include, const_get("Bootstrap#{helper_version}")
|
13
19
|
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: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Meurer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
172
|
+
rubygems_version: 3.4.18
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Helpers to generate a Bootstrap style navbar
|