fittings 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/fittings.gemspec +1 -1
  3. data/lib/setting.rb +2 -11
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: caecbb60f8fcd01f6487054124746dab9891db42699a575112fb641c3fbbbbd4
4
- data.tar.gz: eefb06bd4cc4f11384582ee87c6b48870300ca28e9c39cfb51be25b4c8df2fe0
3
+ metadata.gz: b34b7959dc0786ec7cb0a307e047277eec6350dd9d339f30c000debfd4e0beb0
4
+ data.tar.gz: 5cdc9ef6aff8cb263f5c9cc803ec4e05df163e502b84659ee1c4efa24934cabd
5
5
  SHA512:
6
- metadata.gz: e9d4ee552dbe4e19299c57cd70973755203573d0851f0c48af37532c9b97715835fc0a981fa0a9a90fed745c520279a146d5e6761b1bc7beeacced4d024510de
7
- data.tar.gz: 2639d507e51bd6b4b13b3d5730e711cb9fc38267c0d811c996f666ffc98ab3cd2a5ebc6a7b5c1d1007fa17cc6d897e4051620877d5fe71db0b301047855f1543
6
+ metadata.gz: 454b0e050fa243b5db905f9809fcad8f64e2c8725c9586d3abe92b8780c1cf8f45df01825f7b65af515296d01606fcdcde8e8197ca75368172085dfbc38884ac
7
+ data.tar.gz: 84d90e2d33fd91a6c7182288550c355049b9e120ed5777faf9d2ef4b68dcd76adfc75dce6430efb95a9cd500a6bebe63a2686d68474ff31f7f562788440ff430
data/fittings.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fittings"
3
- s.version = "2.0.0"
3
+ s.version = "3.0.0"
4
4
 
5
5
  s.authors = ["Edwin Cruz", "Colin Shield"]
6
6
  s.date = %q{2011-09-06}
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 ||= SettingHash.new
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 = SettingHash.new
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: 2.0.0
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.4.0.dev
132
+ rubygems_version: 3.2.33
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Manage settings per environment