blinkist-config 1.0.0 → 1.0.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: fcbcd596ce5bde72a5ffe9ee8b07f772f4034dbc
4
- data.tar.gz: 91711dab272c12e0ec40b4dbc2ccdef1d2ea7995
3
+ metadata.gz: 4cf5bc1176ec1e9eec106cc54d8a178a5d147b88
4
+ data.tar.gz: 8fc749dbc0a13e1d692ae90551fd391ba1bdf960
5
5
  SHA512:
6
- metadata.gz: de38e2672296c3d350d225eceae51f4773fa5deaf4b12a9437f2a98ebbda3bd62626b731be296b604977afcef530ac069cc692c5c9c9b84ba8ed5f1f80ce2a04
7
- data.tar.gz: db98b96b4fdd279187c2130ecd12dd86c5d405038a71090cef298e173c6753110a076be7f077f1d846e5222f7a7f4669a420366b8409f8b89837211c9465a9f6
6
+ metadata.gz: d230f960e1941008ba6f7027337e7fe537565bff1f8b7efaafe2a05e32433d9b84ad139db02999329143f23af4bb7f0d2f1ab8243ae42b11a7a84cba92557b26
7
+ data.tar.gz: c71f8065e3f394ef965e840068d94cc1b603109f9db8d1cf1fb000c02377cd25003d4cb02b059239eefa48e8bf3495711d1abf95c13377775096ed901d5722fb
data/.rubocop.yml CHANGED
@@ -1,9 +1,3 @@
1
- AllCops:
2
- Exclude:
3
- - '**/schema.rb'
4
- - 'bin/**'
5
- - 'vendor/**/*'
6
-
7
1
  Lint/ParenthesesAsGroupedExpression:
8
2
  Enabled: true
9
3
  Exclude:
data/Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
1
  FROM ruby:2.3.1-slim
2
2
 
3
- ENV RAILS_ENV=production
3
+ ENV RAILS_ENV=test
4
4
  ENV LANG en_US.UTF-8
5
5
  ENV LANGUAGE en_US.UTF-8
6
6
  ENV LC_ALL en_US.UTF-8
7
7
  ENV LC_CTYPE en_US.UTF-8
8
8
 
9
- ENV RUNTIME_PACKAGES pkg-config netcat supervisor nodejs git jq uuid-runtime libxslt1-dev build-essential libxml2-dev libxslt1-dev
9
+ ENV RUNTIME_PACKAGES pkg-config git
10
10
 
11
11
  RUN mkdir /tmp/tmpapp
12
12
  WORKDIR /tmp/tmpapp
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in blinkist-config.gemspec
4
4
  gemspec
5
+
6
+ gem "rubocop", "~> 0"
7
+
8
+ group :test do
9
+ gem "codeclimate-test-reporter", "~> 1.0.0"
10
+ gem "simplecov"
11
+ end
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Blinkist::Config
2
2
 
3
+ [![CircleCI](https://circleci.com/gh/blinkist/blinkist-config.svg?style=shield)](https://circleci.com/gh/blinkist/blinkist-config)
4
+ [![Dependency Status](https://www.versioneye.com/user/projects/58abf0e4b4d2a20036950ef0/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/58abf0e4b4d2a20036950ef0)
5
+ [![Code Climate](https://codeclimate.com/github/blinkist/blinkist-config/badges/gpa.svg)](https://codeclimate.com/github/blinkist/blinkist-config)
6
+
3
7
  This GEM allows you to access configuration stores with different adapters. Here're some examples of usage:
4
8
 
5
9
  ### Using the ENV
@@ -92,6 +96,20 @@ docker-compose run rake
92
96
 
93
97
  This will execute rake and run all specs by auto correcting the code with rubocop.
94
98
 
99
+ If you're ready to tag a new version, do this
100
+
101
+ ```
102
+ docker-compose run gem bump -t -v major|minor|patch
103
+ ```
104
+
105
+ To deploy to rubygems.org do this then
106
+
107
+ ```
108
+ docker-compose run gem release
109
+ ```
110
+
111
+ You'll have to have proper rights to access rubygems.org
112
+
95
113
  ## Contributing
96
114
 
97
115
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blinkist-config.
data/Rakefile CHANGED
@@ -3,11 +3,10 @@ require "rspec/core/rake_task"
3
3
  require "rubocop/rake_task"
4
4
 
5
5
  RuboCop::RakeTask.new do |task|
6
- task.options = ["-a"]
7
- task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
6
+ task.options = %w(-a)
8
7
  end
9
8
 
10
9
  RSpec::Core::RakeTask.new(:spec)
11
10
 
12
11
  task(:default).clear
13
- task default: [:rubocop, :spec]
12
+ task default: %i(rubocop spec)
@@ -9,18 +9,17 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Sebastian Schleicher, Blinks Labs GmbH"]
10
10
  spec.email = ["sj@blinkist.com"]
11
11
 
12
- spec.summary = %q{Simple adapter based configuration handler (supports ENV and Consul/Diplomat).}
13
- spec.description = %q{This GEM allows you to keep your configuration class-based by calling Blinkist::Config.get(...) instead of accessing the ENV directly. You can set up different types of adapters to connect to various configuration systems like your ENV or Consul's key-value-store.}
12
+ spec.summary = "Simple adapter based configuration handler (supports ENV and Consul/Diplomat)."
13
+ spec.description = "This GEM allows you to keep your configuration class-based by calling Blinkist::Config.get(...) instead of accessing the ENV directly. You can set up different types of adapters to connect to various configuration systems like your ENV or Consul's key-value-store."
14
14
  spec.homepage = "https://github.com/blinkist/blinkist-config"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.require_paths = ["lib"]
18
+ spec.require_paths = %w(lib)
19
19
 
20
20
  spec.add_development_dependency "bundler", "~> 1.12"
21
- spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_development_dependency "rake", "~> 12.0"
22
22
  spec.add_development_dependency "rspec", "~> 3.0"
23
- spec.add_development_dependency "rubocop", '~> 0'
24
23
 
25
24
  spec.add_runtime_dependency "diplomat", "~> 1"
26
25
  end
@@ -1,5 +1,5 @@
1
1
  module Blinkist
2
2
  class Config
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".freeze
4
4
  end
5
5
  end
@@ -8,9 +8,12 @@ module Blinkist
8
8
  attr_accessor :adapter_type, :logger, :env, :app_name
9
9
 
10
10
  def get(key, default = nil, scope: nil)
11
- adapter ||= Adapter.instance_for adapter_type, env, app_name
12
11
  adapter.get(key, scope: scope) || default
13
12
  end
13
+
14
+ def adapter
15
+ @adapter ||= Adapter.instance_for adapter_type, env, app_name
16
+ end
14
17
  end
15
18
  end
16
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blinkist-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Schleicher, Blinks Labs GmbH
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '12.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '12.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: diplomat
71
57
  requirement: !ruby/object:Gem::Requirement