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 +4 -4
- data/lib/bootstrap3_helper/configuration.rb +12 -4
- data/lib/bootstrap3_helper/railtie.rb +4 -2
- data/lib/bootstrap3_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bf8c7130e4ef285f58ed677735798e7095891782e0fcc4b9b8cc0be5e5ffeb
|
4
|
+
data.tar.gz: 4de1b4d4797e2af870b9dbcfb3a59448b0ad94fef36e616ec54de6aa1bf0f78d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
7
|
-
ActiveSupport.on_load(:action_view)
|
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
|
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.
|
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-
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|