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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39217854850d56cee715e92520f5861a2523bf80
4
- data.tar.gz: 5ddd51d321b5b85646d4b85c74e8bdbd446c2bab
3
+ metadata.gz: bbbc7ef5946aeb5c65bbb665c46f83889bb96bd3
4
+ data.tar.gz: c07ffda1dbf3139f8ee01c5fdf1c58256f7dfa69
5
5
  SHA512:
6
- metadata.gz: 4e550fbe606b298cdb69cca90629cf83feb5aaada297f617803b6fa255a430f47be9562044f8e522aea8c9c0ec55f09857c03804e8209f57e3dbd625fdcd3698
7
- data.tar.gz: ec8339404b10d09b36fb1e06d46087590df1fda88e2a9758082ac50eb2072abf3f63e0a0988390b4d9e9bdc58d54322b3657da8cc31b359f41b855cbddcf45fc
6
+ metadata.gz: 978be50370afebe7518aad050bac45771d2fc7d48b45159537d4f6d8998deb3297ce26f0c6eb04214cf6f3dfc039f599b69b521c0aa6bfed993ea59bc301f634
7
+ data.tar.gz: d532e06d2d8236f3c1bad62d416300621a9bb30ec769743987faeaf67fcab743bd04593dccf466dbfeff801ca99c47877f8f591904c8babd066d9ee92c15250a
data/.rubocop.yml CHANGED
@@ -10,3 +10,7 @@ Style/Documentation:
10
10
  Lint/HandleExceptions:
11
11
  Exclude:
12
12
  - rakelib/*.rake
13
+
14
+ Style/FileName:
15
+ Exclude:
16
+ - lib/dry-configurable.rb
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
@@ -1,6 +1,6 @@
1
1
  module Dry
2
2
  module Configurable
3
3
  # @api public
4
- VERSION = '0.1.0'.freeze
4
+ VERSION = '0.1.1'.freeze
5
5
  end
6
6
  end
@@ -26,8 +26,12 @@ module Dry
26
26
  module Configurable
27
27
  # @private
28
28
  def self.extended(base)
29
- base.instance_variable_set(:@_config_mutex, Mutex.new)
30
- base.instance_variable_set(:@_settings_mutex, Mutex.new)
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.0
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-06-10 00:00:00.000000000 Z
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