checkoff 0.201.0 → 0.203.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +130 -28
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
- data/.overcommit.yml +27 -2
- data/.rubocop.yml +20 -2
- data/.rubocop_todo.yml +90 -0
- data/.solargraph.yml +10 -1
- data/DEVELOPMENT.md +1 -1
- data/Gemfile +11 -8
- data/Gemfile.lock +66 -42
- data/LICENSE +1 -1
- data/Makefile +14 -12
- data/bin/brakeman +27 -0
- data/bin/overcommit_branch +117 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/config/annotations_misc.rb +35 -0
- data/docs/cookiecutter_input.json +1 -0
- data/fix.sh +14 -6
- data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
- data/lib/checkoff/version.rb +1 -1
- data/requirements_dev.txt +1 -1
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activesupport.rbi +453 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/mocha.rbi +34 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/annotations/webmock.rbi +9 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
- data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
- data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
- data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
- data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
- data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
- data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
- data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
- data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
- data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
- data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
- data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
- data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
- data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
- data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
- data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
- data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
- data/sorbet/rbi/todo.rbi +11 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +134 -3
@@ -0,0 +1,581 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `mixlib-config` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem mixlib-config`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://mixlib-config//lib/mixlib/config/version.rb#19
|
9
|
+
module Mixlib; end
|
10
|
+
|
11
|
+
# source://mixlib-config//lib/mixlib/config/version.rb#20
|
12
|
+
module Mixlib::Config
|
13
|
+
# Get the value of a config option
|
14
|
+
#
|
15
|
+
# === Parameters
|
16
|
+
# config_option<Symbol>:: The config option to return
|
17
|
+
#
|
18
|
+
# === Returns
|
19
|
+
# value:: The value of the config option
|
20
|
+
#
|
21
|
+
# === Raises
|
22
|
+
# <UnknownConfigOptionError>:: If the config option does not exist and strict mode is on.
|
23
|
+
#
|
24
|
+
# source://mixlib-config//lib/mixlib/config.rb#116
|
25
|
+
def [](config_option); end
|
26
|
+
|
27
|
+
# Set the value of a config option
|
28
|
+
#
|
29
|
+
# === Parameters
|
30
|
+
# config_option<Symbol>:: The config option to set (within the [])
|
31
|
+
# value:: The value for the config option
|
32
|
+
#
|
33
|
+
# === Returns
|
34
|
+
# value:: The new value of the config option
|
35
|
+
#
|
36
|
+
# === Raises
|
37
|
+
# <UnknownConfigOptionError>:: If the config option does not exist and strict mode is on.
|
38
|
+
#
|
39
|
+
# source://mixlib-config//lib/mixlib/config.rb#131
|
40
|
+
def []=(config_option, value); end
|
41
|
+
|
42
|
+
# metaprogramming to ensure that the slot for method_symbol
|
43
|
+
# gets set to value after any other logic is run
|
44
|
+
#
|
45
|
+
# === Parameters
|
46
|
+
# method_symbol<Symbol>:: Name of the method (variable setter)
|
47
|
+
# blk<Block>:: logic block to run in setting slot method_symbol to value
|
48
|
+
# value<Object>:: Value to be set in config hash
|
49
|
+
#
|
50
|
+
# source://mixlib-config//lib/mixlib/config.rb#331
|
51
|
+
def config_attr_writer(method_symbol, &block); end
|
52
|
+
|
53
|
+
# Allows you to create a new config context where you can define new
|
54
|
+
# options with default values.
|
55
|
+
#
|
56
|
+
# This method allows you to open up the configurable more than once.
|
57
|
+
#
|
58
|
+
# For example:
|
59
|
+
#
|
60
|
+
# config_context :server_info do
|
61
|
+
# configurable(:url).defaults_to("http://localhost")
|
62
|
+
# end
|
63
|
+
#
|
64
|
+
# === Parameters
|
65
|
+
# symbol<Symbol>: the name of the context
|
66
|
+
# block<Block>: a block that will be run in the context of this new config
|
67
|
+
# class.
|
68
|
+
#
|
69
|
+
# source://mixlib-config//lib/mixlib/config.rb#400
|
70
|
+
def config_context(symbol, &block); end
|
71
|
+
|
72
|
+
# Allows you to create a new hash of config contexts where you can define new
|
73
|
+
# options with default values.
|
74
|
+
#
|
75
|
+
# This method allows you to open up the configurable more than once.
|
76
|
+
#
|
77
|
+
# For example:
|
78
|
+
#
|
79
|
+
# config_context_hash :listeners, :listener do
|
80
|
+
# configurable(:url).defaults_to("http://localhost")
|
81
|
+
# end
|
82
|
+
#
|
83
|
+
# === Parameters
|
84
|
+
# symbol<Symbol>: the plural name for contexts in the list
|
85
|
+
# symbol<Symbol>: the singular name for contexts in the list
|
86
|
+
# block<Block>: a block that will be run in the context of this new config
|
87
|
+
# class.
|
88
|
+
#
|
89
|
+
# source://mixlib-config//lib/mixlib/config.rb#470
|
90
|
+
def config_context_hash(plural_symbol, singular_symbol, &block); end
|
91
|
+
|
92
|
+
# Allows you to create a new list of config contexts where you can define new
|
93
|
+
# options with default values.
|
94
|
+
#
|
95
|
+
# This method allows you to open up the configurable more than once.
|
96
|
+
#
|
97
|
+
# For example:
|
98
|
+
#
|
99
|
+
# config_context_list :listeners, :listener do
|
100
|
+
# configurable(:url).defaults_to("http://localhost")
|
101
|
+
# end
|
102
|
+
#
|
103
|
+
# === Parameters
|
104
|
+
# symbol<Symbol>: the plural name for contexts in the list
|
105
|
+
# symbol<Symbol>: the singular name for contexts in the list
|
106
|
+
# block<Block>: a block that will be run in the context of this new config
|
107
|
+
# class.
|
108
|
+
#
|
109
|
+
# source://mixlib-config//lib/mixlib/config.rb#438
|
110
|
+
def config_context_list(plural_symbol, singular_symbol, &block); end
|
111
|
+
|
112
|
+
# Gets or sets strict mode. When strict mode is on, only values which
|
113
|
+
# were specified with configurable(), default() or writes_with() may be
|
114
|
+
# retrieved or set. Getting or setting anything else will cause
|
115
|
+
# Mixlib::Config::UnknownConfigOptionError to be thrown.
|
116
|
+
#
|
117
|
+
# If this is set to :warn, unknown values may be get or set, but a warning
|
118
|
+
# will be printed with Chef::Log.warn if this occurs.
|
119
|
+
#
|
120
|
+
# === Parameters
|
121
|
+
# value<String>:: pass this value to set strict mode [optional]
|
122
|
+
#
|
123
|
+
# === Returns
|
124
|
+
# Current value of config_strict_mode
|
125
|
+
#
|
126
|
+
# === Raises
|
127
|
+
# <ArgumentError>:: if value is set to something other than true, false, or :warn
|
128
|
+
#
|
129
|
+
# source://mixlib-config//lib/mixlib/config.rb#505
|
130
|
+
def config_strict_mode(value = T.unsafe(nil)); end
|
131
|
+
|
132
|
+
# Sets strict mode. When strict mode is on, only values which
|
133
|
+
# were specified with configurable(), default() or writes_with() may be
|
134
|
+
# retrieved or set. All other values
|
135
|
+
#
|
136
|
+
# If this is set to :warn, unknown values may be get or set, but a warning
|
137
|
+
# will be printed with Chef::Log.warn if this occurs.
|
138
|
+
#
|
139
|
+
# === Parameters
|
140
|
+
# value<String>:: pass this value to set strict mode [optional]
|
141
|
+
#
|
142
|
+
# === Raises
|
143
|
+
# <ArgumentError>:: if value is set to something other than true, false, or :warn
|
144
|
+
#
|
145
|
+
# source://mixlib-config//lib/mixlib/config.rb#534
|
146
|
+
def config_strict_mode=(value); end
|
147
|
+
|
148
|
+
# metaprogramming to set information about a config option. This may be
|
149
|
+
# used in one of two ways:
|
150
|
+
#
|
151
|
+
# 1. Block-based:
|
152
|
+
# configurable(:attr) do
|
153
|
+
# defaults_to 4
|
154
|
+
# writes_value { |value| 10 }
|
155
|
+
# end
|
156
|
+
#
|
157
|
+
# 2. Chain-based:
|
158
|
+
# configurable(:attr).defaults_to(4).writes_value { |value| 10 }
|
159
|
+
#
|
160
|
+
# Currently supported configuration:
|
161
|
+
#
|
162
|
+
# defaults_to(value): value returned when configurable has no explicit value
|
163
|
+
# defaults_to BLOCK: block is run when the configurable has no explicit value
|
164
|
+
# writes_value BLOCK: block that is run to filter a value when it is being set
|
165
|
+
#
|
166
|
+
# === Parameters
|
167
|
+
# symbol<Symbol>:: Name of the config option
|
168
|
+
# default_value<Object>:: Default value [optional]
|
169
|
+
# block<Block>:: Logic block that calculates default value [optional]
|
170
|
+
#
|
171
|
+
# === Returns
|
172
|
+
# The value of the config option.
|
173
|
+
#
|
174
|
+
# source://mixlib-config//lib/mixlib/config.rb#370
|
175
|
+
def configurable(symbol, &block); end
|
176
|
+
|
177
|
+
# Pass Mixlib::Config.configure() a block, and it will yield itself
|
178
|
+
#
|
179
|
+
# === Parameters
|
180
|
+
# block<Block>:: A block that is called with self.configuration as the argument.
|
181
|
+
#
|
182
|
+
# @yield [configuration]
|
183
|
+
#
|
184
|
+
# source://mixlib-config//lib/mixlib/config.rb#102
|
185
|
+
def configure(&block); end
|
186
|
+
|
187
|
+
# metaprogramming to set the default value for the given config option
|
188
|
+
#
|
189
|
+
# === Parameters
|
190
|
+
# symbol<Symbol>:: Name of the config option
|
191
|
+
# default_value<Object>:: Default value (can be unspecified)
|
192
|
+
# block<Block>:: Logic block that calculates default value
|
193
|
+
#
|
194
|
+
# source://mixlib-config//lib/mixlib/config.rb#341
|
195
|
+
def default(symbol, default_value = T.unsafe(nil), &block); end
|
196
|
+
|
197
|
+
# Resets a config option to its default.
|
198
|
+
#
|
199
|
+
# === Parameters
|
200
|
+
# symbol<Symbol>:: Name of the config option
|
201
|
+
#
|
202
|
+
# source://mixlib-config//lib/mixlib/config.rb#162
|
203
|
+
def delete(symbol); end
|
204
|
+
|
205
|
+
# Loads a given ruby file, and runs instance_eval against it in the context of the current
|
206
|
+
# object.
|
207
|
+
#
|
208
|
+
# Raises an IOError if the file cannot be found, or is not readable.
|
209
|
+
#
|
210
|
+
# === Parameters
|
211
|
+
# filename<String>:: A filename to read from
|
212
|
+
#
|
213
|
+
# source://mixlib-config//lib/mixlib/config.rb#55
|
214
|
+
def from_file(filename); end
|
215
|
+
|
216
|
+
# Transforms a Hash into method-style configuration syntax to be processed
|
217
|
+
#
|
218
|
+
# === Parameters
|
219
|
+
# hash<Hash>:: A Hash containing configuration
|
220
|
+
#
|
221
|
+
# source://mixlib-config//lib/mixlib/config.rb#94
|
222
|
+
def from_hash(hash); end
|
223
|
+
|
224
|
+
# Parses valid JSON structure into Ruby
|
225
|
+
#
|
226
|
+
# === Parameters
|
227
|
+
# filename<String>:: A filename to read from
|
228
|
+
#
|
229
|
+
# source://mixlib-config//lib/mixlib/config.rb#80
|
230
|
+
def from_json(filename); end
|
231
|
+
|
232
|
+
# source://mixlib-config//lib/mixlib/config.rb#85
|
233
|
+
def from_toml(filename); end
|
234
|
+
|
235
|
+
# Parses valid YAML structure into Ruby so it can be ingested into the Class
|
236
|
+
#
|
237
|
+
# === Parameters
|
238
|
+
# filename<String>:: A filename to read from
|
239
|
+
#
|
240
|
+
# source://mixlib-config//lib/mixlib/config.rb#71
|
241
|
+
def from_yaml(filename); end
|
242
|
+
|
243
|
+
# Check if Mixlib::Config has a config option.
|
244
|
+
#
|
245
|
+
# === Parameters
|
246
|
+
# key<Symbol>:: The config option to check for
|
247
|
+
#
|
248
|
+
# === Returns
|
249
|
+
# <True>:: If the config option exists
|
250
|
+
# <False>:: If the config option does not exist
|
251
|
+
#
|
252
|
+
# @return [Boolean]
|
253
|
+
#
|
254
|
+
# source://mixlib-config//lib/mixlib/config.rb#143
|
255
|
+
def has_key?(key); end
|
256
|
+
|
257
|
+
# Creates a shallow copy of the internal hash
|
258
|
+
# NOTE: remove this in 3.0 in favor of save. This is completely useless
|
259
|
+
# with default values and configuration_context.
|
260
|
+
#
|
261
|
+
# === Returns
|
262
|
+
# result of Hash#dup
|
263
|
+
#
|
264
|
+
# source://mixlib-config//lib/mixlib/config.rb#319
|
265
|
+
def hash_dup; end
|
266
|
+
|
267
|
+
# source://mixlib-config//lib/mixlib/config.rb#44
|
268
|
+
def initialize_mixlib_config; end
|
269
|
+
|
270
|
+
# @return [Boolean]
|
271
|
+
#
|
272
|
+
# source://mixlib-config//lib/mixlib/config.rb#149
|
273
|
+
def is_default?(key); end
|
274
|
+
|
275
|
+
# Check if Mixlib::Config has a config option.
|
276
|
+
#
|
277
|
+
# === Parameters
|
278
|
+
# key<Symbol>:: The config option to check for
|
279
|
+
#
|
280
|
+
# === Returns
|
281
|
+
# <True>:: If the config option exists
|
282
|
+
# <False>:: If the config option does not exist
|
283
|
+
#
|
284
|
+
# @return [Boolean]
|
285
|
+
#
|
286
|
+
# source://mixlib-config//lib/mixlib/config.rb#143
|
287
|
+
def key?(key); end
|
288
|
+
|
289
|
+
# Return the set of config hash keys.
|
290
|
+
# This *only* returns hash keys which have been set by the user. In future
|
291
|
+
# versions this will likely be removed in favor of something more explicit.
|
292
|
+
# For now though, we want this to match has_key?
|
293
|
+
#
|
294
|
+
# === Returns
|
295
|
+
# result of Hash#keys
|
296
|
+
#
|
297
|
+
# source://mixlib-config//lib/mixlib/config.rb#309
|
298
|
+
def keys; end
|
299
|
+
|
300
|
+
# Merge an incoming hash with our config options
|
301
|
+
#
|
302
|
+
# === Parameters
|
303
|
+
# hash<Hash>: a hash in the same format as output by save.
|
304
|
+
#
|
305
|
+
# === Returns
|
306
|
+
# self
|
307
|
+
#
|
308
|
+
# source://mixlib-config//lib/mixlib/config.rb#290
|
309
|
+
def merge!(hash); end
|
310
|
+
|
311
|
+
# Allows for simple lookups and setting of config options via method calls
|
312
|
+
# on Mixlib::Config. If there any arguments to the method, they are used to set
|
313
|
+
# the value of the config option. Otherwise, it's a simple get operation.
|
314
|
+
#
|
315
|
+
# === Parameters
|
316
|
+
# method_symbol<Symbol>:: The method called. Must match a config option.
|
317
|
+
# *args:: Any arguments passed to the method
|
318
|
+
#
|
319
|
+
# === Returns
|
320
|
+
# value:: The value of the config option.
|
321
|
+
#
|
322
|
+
# === Raises
|
323
|
+
# <UnknownConfigOptionError>:: If the config option does not exist and strict mode is on.
|
324
|
+
#
|
325
|
+
# source://mixlib-config//lib/mixlib/config.rb#555
|
326
|
+
def method_missing(method_symbol, *args); end
|
327
|
+
|
328
|
+
# Resets all config options to their defaults.
|
329
|
+
#
|
330
|
+
# source://mixlib-config//lib/mixlib/config.rb#167
|
331
|
+
def reset; end
|
332
|
+
|
333
|
+
# Restore non-default values from the given hash.
|
334
|
+
#
|
335
|
+
# === Parameters
|
336
|
+
# hash<Hash>: a hash in the same format as output by save.
|
337
|
+
#
|
338
|
+
# === Returns
|
339
|
+
# self
|
340
|
+
#
|
341
|
+
# source://mixlib-config//lib/mixlib/config.rb#252
|
342
|
+
def restore(hash); end
|
343
|
+
|
344
|
+
# Makes a copy of any non-default values.
|
345
|
+
#
|
346
|
+
# This returns a shallow copy of the hash; while the hash itself is
|
347
|
+
# duplicated a la dup, modifying data inside arrays and hashes may modify
|
348
|
+
# the original Config object.
|
349
|
+
#
|
350
|
+
# === Returns
|
351
|
+
#
|
352
|
+
# Hash of values the user has set.
|
353
|
+
#
|
354
|
+
# === Examples
|
355
|
+
#
|
356
|
+
# For example, this config class:
|
357
|
+
#
|
358
|
+
# class MyConfig < Mixlib::Config
|
359
|
+
# default :will_be_set, 1
|
360
|
+
# default :will_be_set_to_default, 1
|
361
|
+
# default :will_not_be_set, 1
|
362
|
+
# configurable(:computed_value) { |x| x*2 }
|
363
|
+
# config_context :group do
|
364
|
+
# default :will_not_be_set, 1
|
365
|
+
# end
|
366
|
+
# config_context :group_never_set
|
367
|
+
# end
|
368
|
+
#
|
369
|
+
# MyConfig.x = 2
|
370
|
+
# MyConfig.will_be_set = 2
|
371
|
+
# MyConfig.will_be_set_to_default = 1
|
372
|
+
# MyConfig.computed_value = 2
|
373
|
+
# MyConfig.group.x = 3
|
374
|
+
#
|
375
|
+
# produces this:
|
376
|
+
#
|
377
|
+
# MyConfig.save == {
|
378
|
+
# :x => 2,
|
379
|
+
# :will_be_set => 2,
|
380
|
+
# :will_be_set_to_default => 1,
|
381
|
+
# :computed_value => 4,
|
382
|
+
# :group => {
|
383
|
+
# :x => 3
|
384
|
+
# }
|
385
|
+
# }
|
386
|
+
#
|
387
|
+
# source://mixlib-config//lib/mixlib/config.rb#215
|
388
|
+
def save(include_defaults = T.unsafe(nil)); end
|
389
|
+
|
390
|
+
# Makes a copy of any non-default values.
|
391
|
+
#
|
392
|
+
# This returns a shallow copy of the hash; while the hash itself is
|
393
|
+
# duplicated a la dup, modifying data inside arrays and hashes may modify
|
394
|
+
# the original Config object.
|
395
|
+
#
|
396
|
+
# === Returns
|
397
|
+
#
|
398
|
+
# Hash of values the user has set.
|
399
|
+
#
|
400
|
+
# === Examples
|
401
|
+
#
|
402
|
+
# For example, this config class:
|
403
|
+
#
|
404
|
+
# class MyConfig < Mixlib::Config
|
405
|
+
# default :will_be_set, 1
|
406
|
+
# default :will_be_set_to_default, 1
|
407
|
+
# default :will_not_be_set, 1
|
408
|
+
# configurable(:computed_value) { |x| x*2 }
|
409
|
+
# config_context :group do
|
410
|
+
# default :will_not_be_set, 1
|
411
|
+
# end
|
412
|
+
# config_context :group_never_set
|
413
|
+
# end
|
414
|
+
#
|
415
|
+
# MyConfig.x = 2
|
416
|
+
# MyConfig.will_be_set = 2
|
417
|
+
# MyConfig.will_be_set_to_default = 1
|
418
|
+
# MyConfig.computed_value = 2
|
419
|
+
# MyConfig.group.x = 3
|
420
|
+
#
|
421
|
+
# produces this:
|
422
|
+
#
|
423
|
+
# MyConfig.save == {
|
424
|
+
# :x => 2,
|
425
|
+
# :will_be_set => 2,
|
426
|
+
# :will_be_set_to_default => 1,
|
427
|
+
# :computed_value => 4,
|
428
|
+
# :group => {
|
429
|
+
# :x => 3
|
430
|
+
# }
|
431
|
+
# }
|
432
|
+
#
|
433
|
+
# source://mixlib-config//lib/mixlib/config.rb#215
|
434
|
+
def to_hash(include_defaults = T.unsafe(nil)); end
|
435
|
+
|
436
|
+
protected
|
437
|
+
|
438
|
+
# Given a (nested) Hash, apply it to the config object and any contexts.
|
439
|
+
#
|
440
|
+
# This is preferable to converting it to the string representation with
|
441
|
+
# the #to_dotted_hash method above.
|
442
|
+
#
|
443
|
+
# === Parameters
|
444
|
+
# hash<Hash>:: The hash to apply to the config object
|
445
|
+
#
|
446
|
+
# source://mixlib-config//lib/mixlib/config.rb#569
|
447
|
+
def apply_nested_hash(hash); end
|
448
|
+
|
449
|
+
private
|
450
|
+
|
451
|
+
# source://mixlib-config//lib/mixlib/config.rb#659
|
452
|
+
def define_attr_accessor_methods(symbol); end
|
453
|
+
|
454
|
+
# source://mixlib-config//lib/mixlib/config.rb#729
|
455
|
+
def define_context(definition_blocks); end
|
456
|
+
|
457
|
+
# source://mixlib-config//lib/mixlib/config.rb#703
|
458
|
+
def define_hash_attr_accessor_methods(plural_symbol, singular_symbol); end
|
459
|
+
|
460
|
+
# source://mixlib-config//lib/mixlib/config.rb#682
|
461
|
+
def define_list_attr_accessor_methods(plural_symbol, singular_symbol); end
|
462
|
+
|
463
|
+
# source://mixlib-config//lib/mixlib/config.rb#629
|
464
|
+
def internal_get(symbol); end
|
465
|
+
|
466
|
+
# source://mixlib-config//lib/mixlib/config.rb#648
|
467
|
+
def internal_get_or_set(symbol, *args); end
|
468
|
+
|
469
|
+
# Internal dispatch setter for config values.
|
470
|
+
#
|
471
|
+
# === Parameters
|
472
|
+
# symbol<Symbol>:: Name of the method (variable setter)
|
473
|
+
# value<Object>:: Value to be set in config hash
|
474
|
+
#
|
475
|
+
# source://mixlib-config//lib/mixlib/config.rb#614
|
476
|
+
def internal_set(symbol, value); end
|
477
|
+
|
478
|
+
# Given a (nested) Hash, turn it into a single top-level hash using dots as
|
479
|
+
# nesting notation. This allows for direction translation into method-style
|
480
|
+
# setting of Config.
|
481
|
+
#
|
482
|
+
# === Parameters
|
483
|
+
# hash<Hash>:: The hash to "de-nestify"
|
484
|
+
# recursive_key<String>:: The existing key to prepend going forward
|
485
|
+
#
|
486
|
+
# === Returns
|
487
|
+
# value:: A single-depth Hash using dot notation to indicate nesting
|
488
|
+
#
|
489
|
+
# source://mixlib-config//lib/mixlib/config.rb#597
|
490
|
+
def to_dotted_hash(hash, recursive_key = T.unsafe(nil)); end
|
491
|
+
|
492
|
+
class << self
|
493
|
+
# @private
|
494
|
+
#
|
495
|
+
# source://mixlib-config//lib/mixlib/config.rb#29
|
496
|
+
def extended(base); end
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#21
|
501
|
+
class Mixlib::Config::Configurable
|
502
|
+
# @return [Configurable] a new instance of Configurable
|
503
|
+
#
|
504
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#26
|
505
|
+
def initialize(symbol); end
|
506
|
+
|
507
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#69
|
508
|
+
def default; end
|
509
|
+
|
510
|
+
# Returns the value of attribute default_block.
|
511
|
+
#
|
512
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#24
|
513
|
+
def default_block; end
|
514
|
+
|
515
|
+
# @return [Boolean]
|
516
|
+
#
|
517
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#38
|
518
|
+
def default_block?; end
|
519
|
+
|
520
|
+
# Returns the value of attribute default_value.
|
521
|
+
#
|
522
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#23
|
523
|
+
def default_value; end
|
524
|
+
|
525
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#44
|
526
|
+
def defaults_to(default_value = T.unsafe(nil), &block); end
|
527
|
+
|
528
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#55
|
529
|
+
def get(config); end
|
530
|
+
|
531
|
+
# @return [Boolean]
|
532
|
+
#
|
533
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#30
|
534
|
+
def has_default; end
|
535
|
+
|
536
|
+
# @return [Boolean]
|
537
|
+
#
|
538
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#30
|
539
|
+
def has_default?; end
|
540
|
+
|
541
|
+
# @return [Boolean]
|
542
|
+
#
|
543
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#77
|
544
|
+
def is_default?(config); end
|
545
|
+
|
546
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#65
|
547
|
+
def set(config, value); end
|
548
|
+
|
549
|
+
# Returns the value of attribute symbol.
|
550
|
+
#
|
551
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#22
|
552
|
+
def symbol; end
|
553
|
+
|
554
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#50
|
555
|
+
def writes_value(&block); end
|
556
|
+
|
557
|
+
# @return [Boolean]
|
558
|
+
#
|
559
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#34
|
560
|
+
def writes_value?; end
|
561
|
+
|
562
|
+
private
|
563
|
+
|
564
|
+
# source://mixlib-config//lib/mixlib/config/configurable.rb#83
|
565
|
+
def safe_dup(e); end
|
566
|
+
end
|
567
|
+
|
568
|
+
# source://mixlib-config//lib/mixlib/config.rb#486
|
569
|
+
Mixlib::Config::NOT_PASSED = T.let(T.unsafe(nil), Object)
|
570
|
+
|
571
|
+
# source://mixlib-config//lib/mixlib/config/reopened_config_context_with_configurable_error.rb#21
|
572
|
+
class Mixlib::Config::ReopenedConfigContextWithConfigurableError < ::StandardError; end
|
573
|
+
|
574
|
+
# source://mixlib-config//lib/mixlib/config/reopened_configurable_with_config_context_error.rb#21
|
575
|
+
class Mixlib::Config::ReopenedConfigurableWithConfigContextError < ::StandardError; end
|
576
|
+
|
577
|
+
# source://mixlib-config//lib/mixlib/config/unknown_config_option_error.rb#21
|
578
|
+
class Mixlib::Config::UnknownConfigOptionError < ::StandardError; end
|
579
|
+
|
580
|
+
# source://mixlib-config//lib/mixlib/config/version.rb#22
|
581
|
+
Mixlib::Config::VERSION = T.let(T.unsafe(nil), String)
|