vp-themes 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vp/pears/vp_theme.rb +8 -0
- data/lib/vp/themes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aece4516dea752a0ca497d3e2d63cb37b09fd8c6a46e9052ead80641a9fe07b8
|
4
|
+
data.tar.gz: e357aa243bb464f6fa871db1f09dccbc21843c7199680cf2fdfb917e38799329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 279cd8f69933ba345f8aadb0df74b14704cf8f21db858494ec64a13173df1bfb887acc24ddfacdba15d8aa8e4a56f9fd1dc46ddd426be8a5a78625462ccc657e
|
7
|
+
data.tar.gz: a2d8aac9faf28492138e3523cbcae1beaf490b6fed17ef4a66ba8e4fee2ae5d9b37b6a02ed77b719e32fef7b932ccfdb387d175236fa6d639e19b295ae4e6f40
|
data/lib/vp/pears/vp_theme.rb
CHANGED
@@ -3,6 +3,8 @@ module Vp
|
|
3
3
|
module Pears
|
4
4
|
class VpTheme < ::Pears::Provider::LocalFile
|
5
5
|
class InvalidVpTheme < StandardError; end;
|
6
|
+
|
7
|
+
# Get all
|
6
8
|
THEMES = Dir[
|
7
9
|
"#{__FILE__}".split('/')
|
8
10
|
.slice(0..-4)
|
@@ -23,6 +25,12 @@ module Vp
|
|
23
25
|
raise InvalidVpTheme.new(name) unless file.present?
|
24
26
|
|
25
27
|
super(file, on_failure: on_failure)
|
28
|
+
rescue InvalidVpTheme => e
|
29
|
+
if on_failure == :null
|
30
|
+
@data = {}
|
31
|
+
else
|
32
|
+
raise e
|
33
|
+
end
|
26
34
|
end
|
27
35
|
end
|
28
36
|
|
data/lib/vp/themes/version.rb
CHANGED