bootstrap3_helper 3.0.0 → 3.0.1

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
  SHA256:
3
- metadata.gz: 4052a52cedf01461e605010a66bbf78a2f1741e4046a755495226edeccff6027
4
- data.tar.gz: 538817f6096634dcfead3335a03198f34bcecc987d95d22561f79e34553ffa50
3
+ metadata.gz: b4bf8c7130e4ef285f58ed677735798e7095891782e0fcc4b9b8cc0be5e5ffeb
4
+ data.tar.gz: 4de1b4d4797e2af870b9dbcfb3a59448b0ad94fef36e616ec54de6aa1bf0f78d
5
5
  SHA512:
6
- metadata.gz: bc609fbe4d4cb0d76fcd70155ee21b9edb27741cd4b590bacce764408d34ca4fc47232ba4458fb6a657c9c4894a7310675ac6d774ae6ad567a31724b8fd52ebb
7
- data.tar.gz: c6e1cdca50954072d204055706352aca4ee29abaa394749d1c623b2ce9eb43d970c3d5da51663cd641ccee0a98382459ebf4ee8f169ef3acc044186940c7b17b
6
+ metadata.gz: 93fc72762c550db6deb1864bbb678275da47192b9a9429d54d26de7dc3eab93f15301e481849d4beedfd1f199656f4a9fc4ddd507445f363866653652f80f47e
7
+ data.tar.gz: 3b627ae82825902360e04fcd3e8ab6a79a4ede3492dd37cd62aca54801e788c3336b3ed4ad4603de6699c18b117e89de8c22ea93f46e1766e750b0ea28982903
@@ -7,14 +7,14 @@ module Bootstrap3Helper
7
7
  #
8
8
  class Configuration
9
9
  DEFAULT_SETTINGS = {
10
- autoload_in_all_views: true,
11
- accodions: {
10
+ autoload_in_views: true,
11
+ accodions: {
12
12
  header: :div,
13
13
  body: :div,
14
14
  footer: :div,
15
15
  title: :h4
16
16
  },
17
- panels: {
17
+ panels: {
18
18
  header: :div,
19
19
  body: :div,
20
20
  footer: :div,
@@ -30,7 +30,15 @@ module Bootstrap3Helper
30
30
  # @return [ClassName]
31
31
  #
32
32
  def initialize(_args = {})
33
- @autoload_in_all_views = true
33
+ DEFAULT_SETTINGS.each { |key, value| instance_variable_set("@#{key}", value) }
34
+ end
35
+
36
+ # Simple predicate method
37
+ #
38
+ # @return [Boolean]
39
+ #
40
+ def autoload_in_views?
41
+ @autoload_in_views
34
42
  end
35
43
  end
36
44
  end
@@ -3,8 +3,10 @@ module Bootstrap3Helper
3
3
  # - Used to tie into the ActionView
4
4
  #
5
5
  class Railtie < Rails::Railtie
6
- initializer 'bootsrap3_helper' do
7
- ActiveSupport.on_load(:action_view) { include Bootstrap3Helper }
6
+ config.after_initialize do
7
+ ActiveSupport.on_load(:action_view) do
8
+ include Bootstrap3Helper if Bootstrap3Helper.config.autoload_in_views?
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -1,3 +1,3 @@
1
1
  module Bootstrap3Helper
2
- VERSION = '3.0.0'.freeze
2
+ VERSION = '3.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap3_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert David
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails