usable 3.10.0 → 3.10.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/usable/persistence.rb +3 -3
- data/lib/usable/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 509ece6283292d0389b9cf1eeb740164e7728cbc0ed3c91e7e1ba3337dd12758
|
|
4
|
+
data.tar.gz: c5e29fc015a3516abd247c856de614dc847713adcf2a2bd7c4f42a137f7c5dcb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3904738a7f701b3b3af5a1be00bd441cc9459d1476d7682620e0f9b1a1c4ec5a02962b4d940794fe5ce2a972a05c3d00b15e4c6376d0d83bf89616b7f207340b
|
|
7
|
+
data.tar.gz: 8b2ef88770cb4d24a858c13e41e76842314a779c33ef7de5879d28a2db99c6c70cdb5da77389359f847cfe39b18ae2bb4410ddf70ab8f65142f3e7d9667e5ae7
|
data/lib/usable/persistence.rb
CHANGED
|
@@ -29,7 +29,7 @@ module Usable
|
|
|
29
29
|
elsif usables[name]
|
|
30
30
|
usables[name]
|
|
31
31
|
elsif _config[name]
|
|
32
|
-
usables[name] = if _config[name].is_a?(Hash)
|
|
32
|
+
usables[name] = if _config[name].is_a?(Hash) && _config[name].key?(:class)
|
|
33
33
|
_config[name].fetch(:class).constantize.find(_config[name].fetch(:id))
|
|
34
34
|
else
|
|
35
35
|
_config[name]
|
|
@@ -42,7 +42,7 @@ module Usable
|
|
|
42
42
|
def has?(setting)
|
|
43
43
|
!!send(setting)
|
|
44
44
|
rescue NoMethodError => e
|
|
45
|
-
if
|
|
45
|
+
if ["method `#{setting}'", "method '#{setting}'"].any? { |msg| e.message.include?(msg) }
|
|
46
46
|
false
|
|
47
47
|
else
|
|
48
48
|
raise
|
|
@@ -70,7 +70,7 @@ module Usable
|
|
|
70
70
|
FileUtils.mkdir_p(usables.dir) unless File.directory?(usables.dir)
|
|
71
71
|
filename = self.class.name ? self.class.name.downcase.gsub('::', '_') : 'usable'
|
|
72
72
|
@_config_file = File.join(usables.dir, "#{filename}.yml")
|
|
73
|
-
FileUtils.touch(@_config_file) unless File.
|
|
73
|
+
FileUtils.touch(@_config_file) unless File.exist?(@_config_file)
|
|
74
74
|
@_config_file
|
|
75
75
|
end
|
|
76
76
|
|
data/lib/usable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: usable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.10.
|
|
4
|
+
version: 3.10.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Buckley
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -80,7 +79,6 @@ homepage: https://github.com/ridiculous/usable
|
|
|
80
79
|
licenses:
|
|
81
80
|
- MIT
|
|
82
81
|
metadata: {}
|
|
83
|
-
post_install_message:
|
|
84
82
|
rdoc_options: []
|
|
85
83
|
require_paths:
|
|
86
84
|
- lib
|
|
@@ -95,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
95
93
|
- !ruby/object:Gem::Version
|
|
96
94
|
version: '0'
|
|
97
95
|
requirements: []
|
|
98
|
-
rubygems_version: 3.
|
|
99
|
-
signing_key:
|
|
96
|
+
rubygems_version: 3.7.2
|
|
100
97
|
specification_version: 4
|
|
101
98
|
summary: Mounts and configures modules
|
|
102
99
|
test_files: []
|