dry-configurable 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68654aa9fe106abbb5840cdbedaa7ae6cd86a7f3
4
- data.tar.gz: 9058ab1704a9c97cc0de7d259104a7160f03e573
3
+ metadata.gz: 58a630055aefd53b2ec5d0261f353e9779dcab8f
4
+ data.tar.gz: 42b5d3dddc4d819a6e80adcd3d9b341fed1cbea0
5
5
  SHA512:
6
- metadata.gz: c63b583a23cd93074b6480948e3af6a7ceb28f1e672e923a2eb7fc2bd833207944c584e3784d3787b12924e05a5f0e1200b47b415d2d5b6c586f8d41ba2770d6
7
- data.tar.gz: f1129fea2e774fe5705fa8e4133093d41ad564ab63f8598e256213c5fe7f9dcb98a423b5dc0eb61a75fb282150489441f467d41228b9fc80336bd7e806eda9bb
6
+ metadata.gz: d13cd68936ab7a5f96ed705011b1bd5cfb8112091a825fa2fb38e3afe4fdfd72be2f2646504dd00c543bc95ef310e1bb67b1a3d129c683a0d73b63ab3d31a0f0
7
+ data.tar.gz: 5ac518f3fc7f260431a9b5122045c6a53b32929529c2384618ef870fc2da399e9ffa4cc66d20239258a7422c14501b16431fcbe0aac26e9bba940bd0bf63d77f
@@ -0,0 +1,23 @@
1
+ engines:
2
+ rubocop:
3
+ enabled: true
4
+ checks:
5
+ Rubocop/Metrics/LineLength:
6
+ enabled: true
7
+ max: 120
8
+ Rubocop/Style/Documentation:
9
+ enabled: false
10
+ Rubocop/Lint/HandleExceptions:
11
+ enabled: true
12
+ exclude:
13
+ - rakelib/*.rake
14
+ Rubocop/Style/FileName:
15
+ enabled: true
16
+ exclude:
17
+ - lib/dry-configurable.rb
18
+ ratings:
19
+ paths:
20
+ - lib/**/*.rb
21
+ exclude_paths:
22
+ - spec/**/*
23
+ - examples/**/*
@@ -0,0 +1 @@
1
+ 2.0.0-p247
@@ -3,8 +3,7 @@ sudo: false
3
3
  cache: bundler
4
4
  bundler_args: --without console
5
5
  script:
6
- - bundle exec rspec
7
- - bundle exec rubocop
6
+ - bundle exec rake spec
8
7
  rvm:
9
8
  - 2.0
10
9
  - 2.1
data/Gemfile CHANGED
@@ -2,6 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ group :test do
6
+ gem 'codeclimate-test-reporter', platform: :rbx
7
+ end
8
+
5
9
  group :tools do
6
10
  gem 'rubocop'
7
11
  gem 'guard'
data/README.md CHANGED
@@ -1,11 +1,16 @@
1
- # dry-configurable <a href="https://gitter.im/dry-rb/chat" target="_blank">![Join the chat at https://gitter.im/dry-rb/chat](https://badges.gitter.im/Join%20Chat.svg)</a>
2
-
3
- <a href="https://rubygems.org/gems/dry-configurable" target="_blank">![Gem Version](https://badge.fury.io/rb/dry-configurable.svg)</a>
4
- <a href="https://travis-ci.org/dry-rb/dry-configurable" target="_blank">![Build Status](https://travis-ci.org/dry-rb/dry-configurable.svg?branch=master)</a>
5
- <a href="https://gemnasium.com/dry-rb/dry-configurable" target="_blank">![Dependency Status](https://gemnasium.com/dry-rb/dry-configurable.svg)</a>
6
- <a href="https://codeclimate.com/github/dry-rb/dry-configurable" target="_blank">![Code Climate](https://codeclimate.com/github/dry-rb/dry-configurable/badges/gpa.svg)</a>
7
- <a href="http://inch-ci.org/github/dry-rb/dry-configurable" target="_blank">![Documentation Status](http://inch-ci.org/github/dry-rb/dry-configurable.svg?branch=master&style=flat)</a>
8
-
1
+ [gitter]: https://gitter.im/dry-rb/chat
2
+ [gem]: https://rubygems.org/gems/dry-configurable
3
+ [travis]: https://travis-ci.org/dry-rb/dry-configurable
4
+ [code_climate]: https://codeclimate.com/github/dry-rb/dry-configurable
5
+ [inch]: http://inch-ci.org/github/dry-rb/dry-configurable
6
+
7
+ # dry-configurable [![Join the Gitter chat](https://badges.gitter.im/Join%20Chat.svg)][gitter]
8
+
9
+ [![Gem Version](https://img.shields.io/gem/v/dry-configurable.svg)][gem]
10
+ [![Build Status](https://img.shields.io/travis/dry-rb/dry-configurable.svg)][travis]
11
+ [![Code Climate](https://img.shields.io/codeclimate/github/dry-rb/dry-configurable.svg)][code_climate]
12
+ [![Test Coverage](https://img.shields.io/codeclimate/coverage/github/dry-rb/dry-configurable.svg)][code_climate]
13
+ [![API Documentation Coverage](http://inch-ci.org/github/dry-rb/dry-configurable.svg)][inch]
9
14
 
10
15
  ## Synopsis
11
16
 
@@ -48,9 +48,9 @@ module Dry
48
48
  #
49
49
  # @api public
50
50
  def config
51
+ return @_config if defined?(@_config)
51
52
  @_config_mutex.synchronize do
52
- return @_config if defined?(@_config)
53
- @_config = Config.new(*_settings.keys).new(*_settings.values) unless _settings.empty?
53
+ @_config ||= Config.new(*_settings.keys).new(*_settings.values) unless _settings.empty?
54
54
  end
55
55
  end
56
56
 
@@ -1,7 +1,7 @@
1
1
  module Dry
2
2
  module Configurable
3
3
  # @private
4
- class Config < Struct
4
+ class Config < ::Struct
5
5
  end
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  module Dry
2
2
  module Configurable
3
3
  # @api public
4
- VERSION = '0.1.6'.freeze
4
+ VERSION = '0.1.7'.freeze
5
5
  end
6
6
  end
@@ -5,3 +5,8 @@ require 'dry/configurable'
5
5
  Dir[Pathname(__FILE__).dirname.join('support/**/*.rb').to_s].each do |file|
6
6
  require file
7
7
  end
8
+
9
+ if RUBY_ENGINE == 'rbx'
10
+ require 'codeclimate-test-reporter'
11
+ CodeClimate::TestReporter.start
12
+ end
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.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-28 00:00:00.000000000 Z
11
+ date: 2016-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -73,10 +73,12 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - .codeclimate.yml
76
77
  - .gitignore
77
78
  - .rspec
78
79
  - .rubocop.yml
79
80
  - .rubocop_todo.yml
81
+ - .ruby-version
80
82
  - .travis.yml
81
83
  - Gemfile
82
84
  - LICENSE