shiny_themes 0.0.2 → 0.0.3
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/shiny_themes/theme_config.rb +6 -2
- data/lib/shiny_themes/version.rb +1 -1
- data/test/dummy/config/theme.yml +6 -2
- data/test/dummy/log/development.log +0 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 256fc38d374af5b07407eea15e46e0f7bccb2fd3
|
4
|
+
data.tar.gz: ddf31756d1840f49e73219d066c42b7385fcb367
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dcb337a415fd7ce11204ecfefb436f2554dbbb80f81a98df7bb317dbf47cb08752530ae99d493e70b4f55f5284bafc49a7e77ae6c8b1b60b8c3bc3998e2453d
|
7
|
+
data.tar.gz: bfcdbe15ecec87e562271f4c4d8e83b38712ce1570830fe5588ca8f28206d7f0935bc53ea8176169f74a68f313ddef30ca4fee3a1dcc17f8d72f2fac7780527e
|
@@ -19,7 +19,7 @@ module ShinyThemes
|
|
19
19
|
|
20
20
|
# Load the theme.yml file and merge it with the theme configuration
|
21
21
|
def load
|
22
|
-
new_config = full_config[Rails.env].deep_symbolize_keys!
|
22
|
+
new_config = full_config[Rails.env].try(:deep_symbolize_keys!) || {}
|
23
23
|
# Honor values in config file over defaults
|
24
24
|
@defaults.reject! { |k, _| new_config.keys.include?(k) }
|
25
25
|
Rails.application.config.theme.merge!(@defaults.merge(new_config))
|
@@ -39,7 +39,11 @@ module ShinyThemes
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def full_config
|
42
|
-
|
42
|
+
begin
|
43
|
+
@full_config ||= YAML.load(File.open(config_pathname))
|
44
|
+
rescue Errno::ENOENT
|
45
|
+
{}
|
46
|
+
end
|
43
47
|
end
|
44
48
|
end
|
45
49
|
end
|
data/lib/shiny_themes/version.rb
CHANGED
data/test/dummy/config/theme.yml
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiny_themes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shinylane
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- test/dummy/config/routes.rb
|
79
79
|
- test/dummy/config/secrets.yml
|
80
80
|
- test/dummy/config/theme.yml
|
81
|
+
- test/dummy/log/development.log
|
81
82
|
- test/dummy/log/test.log
|
82
83
|
- test/dummy/public/404.html
|
83
84
|
- test/dummy/public/422.html
|
@@ -149,6 +150,7 @@ test_files:
|
|
149
150
|
- test/dummy/config/secrets.yml
|
150
151
|
- test/dummy/config/theme.yml
|
151
152
|
- test/dummy/config.ru
|
153
|
+
- test/dummy/log/development.log
|
152
154
|
- test/dummy/log/test.log
|
153
155
|
- test/dummy/public/404.html
|
154
156
|
- test/dummy/public/422.html
|