fittings 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fittings.gemspec +1 -1
- data/lib/setting.rb +2 -11
- 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: b34b7959dc0786ec7cb0a307e047277eec6350dd9d339f30c000debfd4e0beb0
|
4
|
+
data.tar.gz: 5cdc9ef6aff8cb263f5c9cc803ec4e05df163e502b84659ee1c4efa24934cabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 454b0e050fa243b5db905f9809fcad8f64e2c8725c9586d3abe92b8780c1cf8f45df01825f7b65af515296d01606fcdcde8e8197ca75368172085dfbc38884ac
|
7
|
+
data.tar.gz: 84d90e2d33fd91a6c7182288550c355049b9e120ed5777faf9d2ef4b68dcd76adfc75dce6430efb95a9cd500a6bebe63a2686d68474ff31f7f562788440ff430
|
data/fittings.gemspec
CHANGED
data/lib/setting.rb
CHANGED
@@ -8,12 +8,6 @@ class Setting
|
|
8
8
|
class FileError < RuntimeError; end
|
9
9
|
class AlreadyLoaded < RuntimeError; end
|
10
10
|
|
11
|
-
class SettingHash < Hash
|
12
|
-
include Hashie::Extensions::IndifferentAccess
|
13
|
-
include Hashie::Extensions::KeyConversion
|
14
|
-
include Hashie::Extensions::DeepMerge
|
15
|
-
end
|
16
|
-
|
17
11
|
include Singleton
|
18
12
|
|
19
13
|
attr_reader :available_settings
|
@@ -88,7 +82,7 @@ class Setting
|
|
88
82
|
#=================================================================
|
89
83
|
|
90
84
|
def initialize
|
91
|
-
@available_settings ||=
|
85
|
+
@available_settings ||= Hashie::Mash.quiet(:default).new
|
92
86
|
end
|
93
87
|
|
94
88
|
def has_key?(key)
|
@@ -106,9 +100,6 @@ class Setting
|
|
106
100
|
end
|
107
101
|
|
108
102
|
v = @available_settings[name]
|
109
|
-
if v.is_a?(Hash)
|
110
|
-
v = SettingHash[v]
|
111
|
-
end
|
112
103
|
if block_given?
|
113
104
|
v = yield(v, args)
|
114
105
|
end
|
@@ -155,7 +146,7 @@ class Setting
|
|
155
146
|
|
156
147
|
def load(params)
|
157
148
|
# reset settings hash
|
158
|
-
@available_settings =
|
149
|
+
@available_settings = Hashie::Mash.quiet(:default).new
|
159
150
|
@loaded = false
|
160
151
|
|
161
152
|
files = []
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fittings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edwin Cruz
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.2.33
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Manage settings per environment
|