qonfig 0.0.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -2
- data/.jrubyrc +1 -0
- data/.rspec +1 -1
- data/.rubocop.yml +15 -0
- data/.travis.yml +43 -4
- data/CHANGELOG.md +121 -0
- data/Gemfile +4 -2
- data/LICENSE.txt +1 -1
- data/README.md +1060 -19
- data/Rakefile +18 -4
- data/bin/console +5 -11
- data/bin/rspec +55 -0
- data/bin/setup +1 -0
- data/gemfiles/with_external_deps.gemfile +8 -0
- data/gemfiles/without_external_deps.gemfile +5 -0
- data/lib/qonfig.rb +22 -2
- data/lib/qonfig/command_set.rb +67 -0
- data/lib/qonfig/commands.rb +15 -0
- data/lib/qonfig/commands/add_nested_option.rb +45 -0
- data/lib/qonfig/commands/add_option.rb +41 -0
- data/lib/qonfig/commands/base.rb +12 -0
- data/lib/qonfig/commands/compose.rb +37 -0
- data/lib/qonfig/commands/expose_yaml.rb +159 -0
- data/lib/qonfig/commands/load_from_env.rb +95 -0
- data/lib/qonfig/commands/load_from_env/value_converter.rb +84 -0
- data/lib/qonfig/commands/load_from_json.rb +56 -0
- data/lib/qonfig/commands/load_from_self.rb +73 -0
- data/lib/qonfig/commands/load_from_yaml.rb +58 -0
- data/lib/qonfig/configurable.rb +116 -0
- data/lib/qonfig/data_set.rb +213 -0
- data/lib/qonfig/data_set/class_builder.rb +27 -0
- data/lib/qonfig/data_set/validator.rb +7 -0
- data/lib/qonfig/dsl.rb +122 -0
- data/lib/qonfig/errors.rb +111 -0
- data/lib/qonfig/loaders.rb +9 -0
- data/lib/qonfig/loaders/basic.rb +38 -0
- data/lib/qonfig/loaders/json.rb +24 -0
- data/lib/qonfig/loaders/yaml.rb +24 -0
- data/lib/qonfig/plugins.rb +65 -0
- data/lib/qonfig/plugins/abstract.rb +13 -0
- data/lib/qonfig/plugins/access_mixin.rb +38 -0
- data/lib/qonfig/plugins/registry.rb +125 -0
- data/lib/qonfig/plugins/toml.rb +26 -0
- data/lib/qonfig/plugins/toml/commands/expose_toml.rb +146 -0
- data/lib/qonfig/plugins/toml/commands/load_from_toml.rb +49 -0
- data/lib/qonfig/plugins/toml/data_set.rb +19 -0
- data/lib/qonfig/plugins/toml/dsl.rb +27 -0
- data/lib/qonfig/plugins/toml/loaders/toml.rb +24 -0
- data/lib/qonfig/plugins/toml/tomlrb_fixes.rb +92 -0
- data/lib/qonfig/plugins/toml/uploaders/toml.rb +25 -0
- data/lib/qonfig/settings.rb +457 -0
- data/lib/qonfig/settings/builder.rb +18 -0
- data/lib/qonfig/settings/key_guard.rb +71 -0
- data/lib/qonfig/settings/lock.rb +60 -0
- data/lib/qonfig/uploaders.rb +10 -0
- data/lib/qonfig/uploaders/base.rb +18 -0
- data/lib/qonfig/uploaders/file.rb +55 -0
- data/lib/qonfig/uploaders/json.rb +35 -0
- data/lib/qonfig/uploaders/yaml.rb +93 -0
- data/lib/qonfig/version.rb +7 -1
- data/qonfig.gemspec +29 -17
- metadata +122 -16
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.2.0
|
5
|
+
module Qonfig::Settings::Builder
|
6
|
+
class << self
|
7
|
+
# @param commands [Qonfig::CommandSet]
|
8
|
+
# @return [Qonfig::Settings]
|
9
|
+
#
|
10
|
+
# @api private
|
11
|
+
# @since 0.2.0
|
12
|
+
def build(commands)
|
13
|
+
Qonfig::Settings.new.tap do |settings|
|
14
|
+
commands.each { |command| command.call(settings) }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.2.0
|
5
|
+
class Qonfig::Settings::KeyGuard
|
6
|
+
class << self
|
7
|
+
# @param key [String, Symbol, Object]
|
8
|
+
# @return [void]
|
9
|
+
#
|
10
|
+
# @raise [Qonfig::ArgumentError]
|
11
|
+
# @raise [Qonfig::CoreMethodIntersectionError]
|
12
|
+
#
|
13
|
+
# @api private
|
14
|
+
# @since 0.2.0
|
15
|
+
def prevent_incomparabilities!(key)
|
16
|
+
new(key).prevent_incomparabilities!
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [String, Symbol, Object]
|
21
|
+
#
|
22
|
+
# @api private
|
23
|
+
# @sicne 0.2.0
|
24
|
+
attr_reader :key
|
25
|
+
|
26
|
+
# @param key [String, Symbol, Object]
|
27
|
+
#
|
28
|
+
# @api private
|
29
|
+
# @since 0.2.0
|
30
|
+
def initialize(key)
|
31
|
+
@key = key
|
32
|
+
end
|
33
|
+
|
34
|
+
# @return [void]
|
35
|
+
#
|
36
|
+
# @raise [Qonfig::ArgumentError]
|
37
|
+
# @raise [Qonfig::CoreMethodIntersectionError]
|
38
|
+
#
|
39
|
+
# @api private
|
40
|
+
# @since 0.2.0
|
41
|
+
def prevent_incomparabilities!
|
42
|
+
prevent_incompatible_key_type!
|
43
|
+
prevent_core_method_intersection!
|
44
|
+
end
|
45
|
+
|
46
|
+
# @return [void]
|
47
|
+
#
|
48
|
+
# @raise [Qonfig::ArgumentError]
|
49
|
+
#
|
50
|
+
# @api private
|
51
|
+
# @since 0.2.0
|
52
|
+
def prevent_incompatible_key_type!
|
53
|
+
raise(
|
54
|
+
Qonfig::ArgumentError,
|
55
|
+
'Setting key should be a symbol or a string!'
|
56
|
+
) unless key.is_a?(Symbol) || key.is_a?(String)
|
57
|
+
end
|
58
|
+
|
59
|
+
# @return [void]
|
60
|
+
#
|
61
|
+
# @raise [Qonfig::CoreMethodIntersectionError]
|
62
|
+
#
|
63
|
+
# @api private
|
64
|
+
# @since 0.2.0
|
65
|
+
def prevent_core_method_intersection!
|
66
|
+
raise(
|
67
|
+
Qonfig::CoreMethodIntersectionError,
|
68
|
+
"<#{key}> key can not be used since this is a private core method"
|
69
|
+
) if Qonfig::Settings::CORE_METHODS.include?(key.to_s)
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.2.0
|
5
|
+
class Qonfig::Settings::Lock
|
6
|
+
# @api private
|
7
|
+
# @since 0.2.0
|
8
|
+
def initialize
|
9
|
+
@definition_lock = Mutex.new
|
10
|
+
@access_lock = Mutex.new
|
11
|
+
@merge_lock = Mutex.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# @param instructions [Proc]
|
15
|
+
# @return [Object]
|
16
|
+
#
|
17
|
+
# @api private
|
18
|
+
# @since 0.2.0
|
19
|
+
def thread_safe_definition(&instructions)
|
20
|
+
definition_lock.synchronize(&instructions)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param instructions [Proc]
|
24
|
+
# @return [Object]
|
25
|
+
#
|
26
|
+
# @api private
|
27
|
+
# @since 0.2.0
|
28
|
+
def thread_safe_access(&instructions)
|
29
|
+
access_lock.synchronize(&instructions)
|
30
|
+
end
|
31
|
+
|
32
|
+
# @param instructions [Proc]
|
33
|
+
# @return [Object]
|
34
|
+
#
|
35
|
+
# @api private
|
36
|
+
# @since 0.2.0
|
37
|
+
def thread_safe_merge(&instructions)
|
38
|
+
merge_lock.synchronize(&instructions)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
# @return [Mutex]
|
44
|
+
#
|
45
|
+
# @api private
|
46
|
+
# @since 0.2.0
|
47
|
+
attr_reader :definition_lock
|
48
|
+
|
49
|
+
# @return [Mutex]
|
50
|
+
#
|
51
|
+
# @api private
|
52
|
+
# @since 0.2.0
|
53
|
+
attr_reader :access_lock
|
54
|
+
|
55
|
+
# @return [Mutex]
|
56
|
+
#
|
57
|
+
# @api private
|
58
|
+
# @since 0.2.0
|
59
|
+
attr_reader :merge_lock
|
60
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.11.0
|
5
|
+
class Qonfig::Uploaders::Base
|
6
|
+
class << self
|
7
|
+
# @param settings [Qonfig::Settings]
|
8
|
+
# @param options [Hash<Symbol,Any>]
|
9
|
+
# @param value_procssor [Block]
|
10
|
+
# @return [void]
|
11
|
+
#
|
12
|
+
# @api private
|
13
|
+
# @since 0.11.0
|
14
|
+
def upload(settings, options: {}, &value_processor)
|
15
|
+
nil # NOTE: consciously return nil (for clarity)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.11.0
|
5
|
+
class Qonfig::Uploaders::File < Qonfig::Uploaders::Base
|
6
|
+
# @return [String]
|
7
|
+
#
|
8
|
+
# @api private
|
9
|
+
# @since 0.11.0
|
10
|
+
FILE_OPENING_MODE = 'w'
|
11
|
+
|
12
|
+
# @return [String]
|
13
|
+
#
|
14
|
+
# @api private
|
15
|
+
# @since 0.11.0
|
16
|
+
EMPTY_SETTINGS_REPRESENTATION = ''
|
17
|
+
|
18
|
+
# @return [Hash]
|
19
|
+
#
|
20
|
+
# @api private
|
21
|
+
# @since 0.11.0
|
22
|
+
DEFAULT_OPTIONS = {}.freeze
|
23
|
+
|
24
|
+
class << self
|
25
|
+
# @param settings [Qonfig::Settings]
|
26
|
+
# @param options [Hash<Symbol|String,Any>]
|
27
|
+
# @param value_processor [Block]
|
28
|
+
# @option path [String]
|
29
|
+
# @return [void]
|
30
|
+
#
|
31
|
+
# @api private
|
32
|
+
# @since 0.11.0
|
33
|
+
def upload(settings, path:, options: self::DEFAULT_OPTIONS, &value_processor)
|
34
|
+
::File.open(path, FILE_OPENING_MODE) do |file_descriptor|
|
35
|
+
settings_representation = represent_settings(settings, options, &value_processor)
|
36
|
+
file_descriptor.write(settings_representation)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
# @param settings [Qonfig::Settings]
|
43
|
+
# @param options [Hash<Symbol|String,Any>]
|
44
|
+
# @param value_processor [Block]
|
45
|
+
# @return [String]
|
46
|
+
#
|
47
|
+
# @api private
|
48
|
+
# @since 0.11.0
|
49
|
+
def represent_settings(settings, options, &value_processor)
|
50
|
+
# :nocov:
|
51
|
+
EMPTY_SETTINGS_REPRESENTATION
|
52
|
+
# :nocov:
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.11.0
|
5
|
+
class Qonfig::Uploaders::JSON < Qonfig::Uploaders::File
|
6
|
+
# @return [Hash<Symbol,Any>]
|
7
|
+
#
|
8
|
+
# @api private
|
9
|
+
# @since 0.11.0
|
10
|
+
DEFAULT_OPTIONS = {
|
11
|
+
indent: ' ',
|
12
|
+
space: ' ',
|
13
|
+
object_nl: "\n"
|
14
|
+
}.freeze
|
15
|
+
|
16
|
+
class << self
|
17
|
+
# @param settings [Qonfig::Settings]
|
18
|
+
# @param options [Hash<Symbol,Any>]
|
19
|
+
# @param value_processor [Block]
|
20
|
+
# @return [String]
|
21
|
+
#
|
22
|
+
# @api private
|
23
|
+
# @since 0.11.0
|
24
|
+
def represent_settings(settings, options, &value_processor)
|
25
|
+
settings_hash =
|
26
|
+
if block_given?
|
27
|
+
settings.__to_hash__(transform_value: value_processor)
|
28
|
+
else
|
29
|
+
settings.__to_hash__
|
30
|
+
end
|
31
|
+
|
32
|
+
::JSON.generate(settings_hash, options)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# @api private
|
4
|
+
# @since 0.11.0
|
5
|
+
class Qonfig::Uploaders::YAML < Qonfig::Uploaders::File
|
6
|
+
# @api private
|
7
|
+
# @since 0.11.0
|
8
|
+
class YAMLRepresenter < Psych::Visitors::YAMLTree
|
9
|
+
# Needed for using the '~' symbol used for null value representation in YAML files
|
10
|
+
# (instead of space symbol (' ')) (see psych/lib/psych/visitors/yaml_tree.rb)
|
11
|
+
#
|
12
|
+
# @param object [Any]
|
13
|
+
# @return [Any]
|
14
|
+
#
|
15
|
+
# @api private
|
16
|
+
# @since 0.11.0
|
17
|
+
def visit_NilClass(object) # rubocop:disable Naming/MethodName
|
18
|
+
@emitter.scalar('~', nil, 'tag:yaml.org,2002:null', true, false, Psych::Nodes::Scalar::ANY)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [Hash<Symbol,Any>]
|
23
|
+
#
|
24
|
+
# @api private
|
25
|
+
# @since 0.11.0
|
26
|
+
DEFAULT_OPTIONS = {
|
27
|
+
indentation: 2,
|
28
|
+
line_width: -1,
|
29
|
+
canonical: false,
|
30
|
+
header: false,
|
31
|
+
symbolize_keys: false
|
32
|
+
}.freeze
|
33
|
+
|
34
|
+
# @return [Proc]
|
35
|
+
#
|
36
|
+
# @api private
|
37
|
+
# @since 0.11.0
|
38
|
+
KEY_SYMBOLIZER = -> (value) { value.to_sym }.freeze
|
39
|
+
|
40
|
+
class << self
|
41
|
+
# @param settings [Qonfig::Settings]
|
42
|
+
# @param options [Hash<Symbol,Any>]
|
43
|
+
# @param value_processor [Block]
|
44
|
+
# @return [String]
|
45
|
+
#
|
46
|
+
# @api private
|
47
|
+
# @since 0.11.0
|
48
|
+
def represent_settings(settings, options, &value_processor)
|
49
|
+
settings_hash_opts = hash_representation_options(options, &value_processor)
|
50
|
+
settings_hash = settings.__to_hash__(settings_hash_opts)
|
51
|
+
to_yaml_string(settings_hash, options)
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param options [Hash<Symbol|String,Any>]
|
55
|
+
# @param value_processor [Block]
|
56
|
+
# @return [Hash]
|
57
|
+
#
|
58
|
+
# @api private
|
59
|
+
# @since 0.11.0
|
60
|
+
def hash_representation_options(options, &value_processor)
|
61
|
+
{}.tap do |representation_opts|
|
62
|
+
# NOTE: this case/when with the same logic is only used for better code readbility
|
63
|
+
case
|
64
|
+
# NOTE: options has :symbolize_keys key
|
65
|
+
when options.key?(:symbolize_keys) && !!options[:symbolize_keys]
|
66
|
+
representation_opts[:transform_key] = KEY_SYMBOLIZER
|
67
|
+
# NOTE: options does not have :symbolize_keys key
|
68
|
+
when !options.key?(:symbolize_keys) && DEFAULT_OPTIONS[:symbolize_keys]
|
69
|
+
# :nocov:
|
70
|
+
representation_opts[:transform_key] = KEY_SYMBOLIZER
|
71
|
+
# :nocov:
|
72
|
+
end
|
73
|
+
|
74
|
+
# NOTE: provide value transformer
|
75
|
+
if block_given?
|
76
|
+
representation_opts[:transform_value] = value_processor
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# @param settings_hash [Hash<String|Symbol,Any>]
|
82
|
+
# @param yaml_options [Hash<Symbol,Any>]
|
83
|
+
# @return [String]
|
84
|
+
#
|
85
|
+
# @api private
|
86
|
+
# @since 0.11.0
|
87
|
+
def to_yaml_string(settings_hash, yaml_options)
|
88
|
+
representer = YAMLRepresenter.create(yaml_options)
|
89
|
+
representer << settings_hash
|
90
|
+
representer.tree.yaml(nil, yaml_options)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
data/lib/qonfig/version.rb
CHANGED
data/qonfig.gemspec
CHANGED
@@ -1,27 +1,39 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
1
3
|
|
2
|
-
lib = File.expand_path(
|
4
|
+
lib = File.expand_path('lib', __dir__)
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
6
|
+
require 'qonfig/version'
|
5
7
|
|
6
8
|
Gem::Specification.new do |spec|
|
7
|
-
spec.
|
8
|
-
spec.version = Qonfig::VERSION
|
9
|
-
spec.authors = ["Rustam Ibragimov"]
|
10
|
-
spec.email = ["iamdaiver@icloud.com"]
|
9
|
+
spec.required_ruby_version = '>= 2.3.8'
|
11
10
|
|
12
|
-
spec.
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
spec.
|
11
|
+
spec.name = 'qonfig'
|
12
|
+
spec.version = Qonfig::VERSION
|
13
|
+
spec.authors = ['Rustam Ibragimov']
|
14
|
+
spec.email = ['iamdaiver@icloud.com']
|
15
|
+
spec.summary = 'Config object'
|
16
|
+
spec.description = 'Config. Defined as a class. Used as an instance. ' \
|
17
|
+
'Support for inheritance and composition. ' \
|
18
|
+
'Lazy instantiation. Thread-safe. Command-style DSL. ' \
|
19
|
+
'Extremely simple to define. Extremely simple to use. That\'s all.'
|
20
|
+
spec.homepage = 'https://github.com/0exp/qonfig'
|
21
|
+
spec.license = 'MIT'
|
16
22
|
|
17
|
-
spec.
|
23
|
+
spec.bindir = 'bin'
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ['lib']
|
26
|
+
|
27
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
28
|
f.match(%r{^(test|spec|features)/})
|
19
29
|
end
|
20
|
-
spec.bindir = "exe"
|
21
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = ["lib"]
|
23
30
|
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
31
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
32
|
+
spec.add_development_dependency 'simplecov', '~> 0.16'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.8'
|
34
|
+
spec.add_development_dependency 'armitage-rubocop', '~> 0.73'
|
35
|
+
|
36
|
+
spec.add_development_dependency 'bundler'
|
37
|
+
spec.add_development_dependency 'rake'
|
38
|
+
spec.add_development_dependency 'pry'
|
27
39
|
end
|
metadata
CHANGED
@@ -1,58 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qonfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Ibragimov
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: coveralls
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.8'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: simplecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0.16'
|
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: '
|
40
|
+
version: '0.16'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.8'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: armitage-rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.73'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
-
|
68
|
+
version: '0.73'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Config. Defined as a class. Used as an instance. Support for inheritance
|
112
|
+
and composition. Lazy instantiation. Thread-safe. Command-style DSL. Extremely simple
|
113
|
+
to define. Extremely simple to use. That's all.
|
56
114
|
email:
|
57
115
|
- iamdaiver@icloud.com
|
58
116
|
executables: []
|
@@ -60,16 +118,65 @@ extensions: []
|
|
60
118
|
extra_rdoc_files: []
|
61
119
|
files:
|
62
120
|
- ".gitignore"
|
121
|
+
- ".jrubyrc"
|
63
122
|
- ".rspec"
|
123
|
+
- ".rubocop.yml"
|
64
124
|
- ".travis.yml"
|
125
|
+
- CHANGELOG.md
|
65
126
|
- CODE_OF_CONDUCT.md
|
66
127
|
- Gemfile
|
67
128
|
- LICENSE.txt
|
68
129
|
- README.md
|
69
130
|
- Rakefile
|
70
131
|
- bin/console
|
132
|
+
- bin/rspec
|
71
133
|
- bin/setup
|
134
|
+
- gemfiles/with_external_deps.gemfile
|
135
|
+
- gemfiles/without_external_deps.gemfile
|
72
136
|
- lib/qonfig.rb
|
137
|
+
- lib/qonfig/command_set.rb
|
138
|
+
- lib/qonfig/commands.rb
|
139
|
+
- lib/qonfig/commands/add_nested_option.rb
|
140
|
+
- lib/qonfig/commands/add_option.rb
|
141
|
+
- lib/qonfig/commands/base.rb
|
142
|
+
- lib/qonfig/commands/compose.rb
|
143
|
+
- lib/qonfig/commands/expose_yaml.rb
|
144
|
+
- lib/qonfig/commands/load_from_env.rb
|
145
|
+
- lib/qonfig/commands/load_from_env/value_converter.rb
|
146
|
+
- lib/qonfig/commands/load_from_json.rb
|
147
|
+
- lib/qonfig/commands/load_from_self.rb
|
148
|
+
- lib/qonfig/commands/load_from_yaml.rb
|
149
|
+
- lib/qonfig/configurable.rb
|
150
|
+
- lib/qonfig/data_set.rb
|
151
|
+
- lib/qonfig/data_set/class_builder.rb
|
152
|
+
- lib/qonfig/data_set/validator.rb
|
153
|
+
- lib/qonfig/dsl.rb
|
154
|
+
- lib/qonfig/errors.rb
|
155
|
+
- lib/qonfig/loaders.rb
|
156
|
+
- lib/qonfig/loaders/basic.rb
|
157
|
+
- lib/qonfig/loaders/json.rb
|
158
|
+
- lib/qonfig/loaders/yaml.rb
|
159
|
+
- lib/qonfig/plugins.rb
|
160
|
+
- lib/qonfig/plugins/abstract.rb
|
161
|
+
- lib/qonfig/plugins/access_mixin.rb
|
162
|
+
- lib/qonfig/plugins/registry.rb
|
163
|
+
- lib/qonfig/plugins/toml.rb
|
164
|
+
- lib/qonfig/plugins/toml/commands/expose_toml.rb
|
165
|
+
- lib/qonfig/plugins/toml/commands/load_from_toml.rb
|
166
|
+
- lib/qonfig/plugins/toml/data_set.rb
|
167
|
+
- lib/qonfig/plugins/toml/dsl.rb
|
168
|
+
- lib/qonfig/plugins/toml/loaders/toml.rb
|
169
|
+
- lib/qonfig/plugins/toml/tomlrb_fixes.rb
|
170
|
+
- lib/qonfig/plugins/toml/uploaders/toml.rb
|
171
|
+
- lib/qonfig/settings.rb
|
172
|
+
- lib/qonfig/settings/builder.rb
|
173
|
+
- lib/qonfig/settings/key_guard.rb
|
174
|
+
- lib/qonfig/settings/lock.rb
|
175
|
+
- lib/qonfig/uploaders.rb
|
176
|
+
- lib/qonfig/uploaders/base.rb
|
177
|
+
- lib/qonfig/uploaders/file.rb
|
178
|
+
- lib/qonfig/uploaders/json.rb
|
179
|
+
- lib/qonfig/uploaders/yaml.rb
|
73
180
|
- lib/qonfig/version.rb
|
74
181
|
- qonfig.gemspec
|
75
182
|
homepage: https://github.com/0exp/qonfig
|
@@ -84,16 +191,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
191
|
requirements:
|
85
192
|
- - ">="
|
86
193
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
194
|
+
version: 2.3.8
|
88
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
196
|
requirements:
|
90
197
|
- - ">="
|
91
198
|
- !ruby/object:Gem::Version
|
92
199
|
version: '0'
|
93
200
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.7.6
|
201
|
+
rubygems_version: 3.0.3
|
96
202
|
signing_key:
|
97
203
|
specification_version: 4
|
98
|
-
summary:
|
204
|
+
summary: Config object
|
99
205
|
test_files: []
|