dry-configurable 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/.travis.yml +8 -0
- data/LICENSE +0 -1
- data/lib/dry/configurable/version.rb +1 -1
- data/lib/dry/configurable.rb +6 -7
- data/lib/dry-configurable.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbbc7ef5946aeb5c65bbb665c46f83889bb96bd3
|
4
|
+
data.tar.gz: c07ffda1dbf3139f8ee01c5fdf1c58256f7dfa69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 978be50370afebe7518aad050bac45771d2fc7d48b45159537d4f6d8998deb3297ce26f0c6eb04214cf6f3dfc039f599b69b521c0aa6bfed993ea59bc301f634
|
7
|
+
data.tar.gz: d532e06d2d8236f3c1bad62d416300621a9bb30ec769743987faeaf67fcab743bd04593dccf466dbfeff801ca99c47877f8f591904c8babd066d9ee92c15250a
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -20,3 +20,11 @@ matrix:
|
|
20
20
|
allow_failures:
|
21
21
|
- rvm: ruby-head
|
22
22
|
- rvm: jruby-head
|
23
|
+
notifications:
|
24
|
+
email: false
|
25
|
+
webhooks:
|
26
|
+
urls:
|
27
|
+
- https://webhooks.gitter.im/e/19098b4253a72c9796db
|
28
|
+
on_success: change # options: [always|never|change] default: always
|
29
|
+
on_failure: always # options: [always|never|change] default: always
|
30
|
+
on_start: false # default: false
|
data/LICENSE
CHANGED
@@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
18
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
19
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
20
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
s
|
data/lib/dry/configurable.rb
CHANGED
@@ -26,8 +26,12 @@ module Dry
|
|
26
26
|
module Configurable
|
27
27
|
# @private
|
28
28
|
def self.extended(base)
|
29
|
-
|
30
|
-
|
29
|
+
attr_reader :_settings
|
30
|
+
|
31
|
+
base.class_eval do
|
32
|
+
@_config_mutex = Mutex.new
|
33
|
+
@_settings = ThreadSafe::Cache.new
|
34
|
+
end
|
31
35
|
end
|
32
36
|
# Return configuration
|
33
37
|
#
|
@@ -71,11 +75,6 @@ module Dry
|
|
71
75
|
|
72
76
|
private
|
73
77
|
|
74
|
-
# @private
|
75
|
-
def _settings
|
76
|
-
@_settings_mutex.synchronize { @_settings ||= ThreadSafe::Cache.new }
|
77
|
-
end
|
78
|
-
|
79
78
|
# @private
|
80
79
|
def _config_for(&block)
|
81
80
|
config_klass = Class.new { extend Dry::Configurable }
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'dry/configurable'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-configurable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thread_safe
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- README.md
|
84
84
|
- Rakefile
|
85
85
|
- dry-configurable.gemspec
|
86
|
+
- lib/dry-configurable.rb
|
86
87
|
- lib/dry/configurable.rb
|
87
88
|
- lib/dry/configurable/config.rb
|
88
89
|
- lib/dry/configurable/version.rb
|