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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae340ec10d941708a38d6e780fbca4dfc5e8c0bb5ad8d298b6c878aa8a8a0488
4
- data.tar.gz: f9af62705e941e551cc67f600ee85527cafb8806b990a355b9365573bd180d70
3
+ metadata.gz: 0cc392ed4fa1d3e83f5fc80c45d3ecdba6f40cc90d461121fd819f1007988041
4
+ data.tar.gz: 3a38e72073822df3b680f9d83fa3980d5b3d4a934ed4f4284f9a29a421643df7
5
5
  SHA512:
6
- metadata.gz: 4c1f91305af0eb3be5dc7fb62088252e936dce5f54bcb51d37270b00ee45ca050c55a8698c156e2c906c43b802f231d8a02c463d1c66d27cbdfbaff9e3582272
7
- data.tar.gz: 754164f984fb18dfd737fa1fd3ace7328919c383d476702fc2645df60561853e21515960c2b73a1a94aecacc5f9b1d3c173e53a516b7e3c70b3048d7115fcddb
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
- if BootstrapNavbar.configuration.bootstrap_version.nil?
4
- unless bootstrap_gem = %w(bootstrap bootstrap-sass).detect { |gem| Gem.loaded_specs.keys.include?(gem) }
5
- raise 'Bootstrap version is not configured.'
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
@@ -1,3 +1,3 @@
1
1
  module BootstrapNavbar
2
- VERSION = '3.2.1'
2
+ VERSION = '3.2.2'
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: 3.2.1
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: 2022-09-21 00:00:00.000000000 Z
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.3.13
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