const_conf 0.8.2 → 0.10.0
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 +4 -4
- data/CHANGES.md +34 -0
- data/Gemfile +0 -2
- data/Rakefile +1 -3
- data/const_conf.gemspec +5 -5
- data/lib/const_conf/setting.rb +5 -2
- data/lib/const_conf/version.rb +7 -2
- data/lib/const_conf.rb +5 -2
- data/spec/const_conf_spec.rb +6 -0
- metadata +12 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3658f478d68d9532bc97ee53770630a059022b5e1540ea77758738abfbc7800
|
|
4
|
+
data.tar.gz: 8e91064f2baf4348805c269c0954ea9b96e7837ca2d7cdefca9b2529a7b2d268
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5213149a49787161915118240c7bb08c8e70c6f74952ff7d61eae7359d671ae6be2177fdd92c5a0940a1da942c9c9942220e7319a2769f3027ac5229c7f67cd3
|
|
7
|
+
data.tar.gz: 8d3c7689e46b304b8657255f7bd46153f4855f635bec25be007c8eb15d40c5c13794da9105f1f762060c52947a1fddad994b436996699c113f222be68b3afcec
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-11-18 v0.10.0
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- Relaxed the `json` runtime dependency constraint from `~> 2.0` to `>= 2.0`,
|
|
8
|
+
`< 4` to allow compatibility with `json` 3.x.
|
|
9
|
+
- Removed Vim modeline comments from `Gemfile` and `Rakefile`.
|
|
10
|
+
|
|
11
|
+
### Build & CI
|
|
12
|
+
|
|
13
|
+
- Bumped the `gem_hadar` development dependency requirement to `>= 2.24.1`.
|
|
14
|
+
- Updated `rubygems_version` to **4.0.24**.
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
- Refactored `.contexts/yard.md` to define the AI's role as generating only
|
|
19
|
+
YARD documentation comments.
|
|
20
|
+
- Introduced a comprehensive `Document` class example demonstrating usage of
|
|
21
|
+
`@example`, `@!attribute`, `@param`, `@option`, `@yieldparam`,
|
|
22
|
+
`@yieldreturn`, `@overload`, `@deprecated`, and `@see` tags.
|
|
23
|
+
- Established key rules prohibiting executable code and `@return [void]`
|
|
24
|
+
clauses.
|
|
25
|
+
- Replaced previous cheatsheet sections for modules, classes, methods, and
|
|
26
|
+
blocks with structured documentation responsibilities.
|
|
27
|
+
|
|
28
|
+
## 2026-10-01 v0.9.0
|
|
29
|
+
|
|
30
|
+
* Add `pager:` keyword argument to `ConstConf.view` and `Setting#view`,
|
|
31
|
+
allowing callers to override the pager command used for long output;
|
|
32
|
+
defaults to `ENV['PAGER']` or `less -r`
|
|
33
|
+
* Add YARD `@param pager` documentation to both `view` methods
|
|
34
|
+
* Add spec verifying that a custom `pager:` string is passed through to
|
|
35
|
+
`IO.popen`
|
|
36
|
+
|
|
3
37
|
## 2026-08-20 v0.8.2
|
|
4
38
|
|
|
5
39
|
* Documented block calling contexts for `decode`, `required`, and `check` in
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# vim: set filetype=ruby et sw=2 ts=2:
|
|
2
|
-
|
|
3
1
|
require 'gem_hadar'
|
|
4
2
|
|
|
5
3
|
GemHadar do
|
|
@@ -32,7 +30,7 @@ GemHadar do
|
|
|
32
30
|
required_ruby_version '>= 3.2'
|
|
33
31
|
|
|
34
32
|
dependency 'tins', '~> 1.43'
|
|
35
|
-
dependency 'json', '
|
|
33
|
+
dependency 'json', '>= 2.0', '< 4'
|
|
36
34
|
dependency 'complex_config', '~> 0.23'
|
|
37
35
|
dependency 'activesupport', '~> 8'
|
|
38
36
|
development_dependency 'debug'
|
data/const_conf.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: const_conf 0.
|
|
2
|
+
# stub: const_conf 0.10.0 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "const_conf".freeze
|
|
6
|
-
s.version = "0.
|
|
6
|
+
s.version = "0.10.0".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
@@ -17,20 +17,20 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
s.licenses = ["MIT".freeze]
|
|
18
18
|
s.rdoc_options = ["--title".freeze, "ConstConf - Clean DSL for config settings with validation and Rails integration".freeze, "--main".freeze, "README.md".freeze]
|
|
19
19
|
s.required_ruby_version = Gem::Requirement.new(">= 3.2".freeze)
|
|
20
|
-
s.rubygems_version = "4.0.
|
|
20
|
+
s.rubygems_version = "4.0.24".freeze
|
|
21
21
|
s.summary = "Clean DSL for config settings with validation and Rails integration".freeze
|
|
22
22
|
s.test_files = ["spec/const_conf/dir_plugin_spec.rb".freeze, "spec/const_conf/env_dir_extension_spec.rb".freeze, "spec/const_conf/file_plugin_spec.rb".freeze, "spec/const_conf/json_plugin_spec.rb".freeze, "spec/const_conf/setting_accessor_spec.rb".freeze, "spec/const_conf/setting_spec.rb".freeze, "spec/const_conf/tree_spec.rb".freeze, "spec/const_conf/yaml_plugin_spec.rb".freeze, "spec/const_conf_spec.rb".freeze, "spec/spec_helper.rb".freeze]
|
|
23
23
|
|
|
24
24
|
s.specification_version = 4
|
|
25
25
|
|
|
26
|
-
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.
|
|
26
|
+
s.add_development_dependency(%q<gem_hadar>.freeze, [">= 2.24.1".freeze])
|
|
27
27
|
s.add_development_dependency(%q<debug>.freeze, [">= 0".freeze])
|
|
28
28
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.13".freeze])
|
|
29
29
|
s.add_development_dependency(%q<context_spook>.freeze, ["~> 0.4".freeze])
|
|
30
30
|
s.add_development_dependency(%q<simplecov>.freeze, ["~> 1.0".freeze])
|
|
31
31
|
s.add_development_dependency(%q<all_images>.freeze, [">= 0.12".freeze])
|
|
32
32
|
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.43".freeze])
|
|
33
|
-
s.add_runtime_dependency(%q<json>.freeze, ["
|
|
33
|
+
s.add_runtime_dependency(%q<json>.freeze, [">= 2.0".freeze, "< 4".freeze])
|
|
34
34
|
s.add_runtime_dependency(%q<complex_config>.freeze, ["~> 0.23".freeze])
|
|
35
35
|
s.add_runtime_dependency(%q<activesupport>.freeze, ["~> 8".freeze])
|
|
36
36
|
end
|
data/lib/const_conf/setting.rb
CHANGED
|
@@ -353,8 +353,11 @@ class ConstConf::Setting
|
|
|
353
353
|
# standard output.
|
|
354
354
|
#
|
|
355
355
|
# @param io [IO, nil] the IO object to write the output to; if nil, uses STDOUT
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
# @param pager [String, nil] the pager command to use when output exceeds
|
|
357
|
+
# terminal height; if nil, falls back to the PAGER environment variable or
|
|
358
|
+
# `less -r`
|
|
359
|
+
def view(io: nil, pager: nil)
|
|
360
|
+
parent_namespace.view(object: self, io:, pager:)
|
|
358
361
|
end
|
|
359
362
|
|
|
360
363
|
# Returns the string representation of the tree structure.
|
data/lib/const_conf/version.rb
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
# Version information for the ConstConf gem.
|
|
2
|
+
#
|
|
3
|
+
# This module is auto-generated by GemHadar and exposes the
|
|
4
|
+
# current release version as a set of constants. Do not edit it
|
|
5
|
+
# by hand; it is rewritten on every `rake version` invocation.
|
|
1
6
|
module ConstConf
|
|
2
|
-
# ConstConf
|
|
3
|
-
VERSION = '0.
|
|
7
|
+
# The current version of the ConstConf gem as a String.
|
|
8
|
+
VERSION = '0.10.0'
|
|
4
9
|
VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
|
|
5
10
|
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
|
|
6
11
|
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
|
data/lib/const_conf.rb
CHANGED
|
@@ -410,14 +410,17 @@ module ConstConf
|
|
|
410
410
|
# @param object [Object] the ConstConf module or setting to display
|
|
411
411
|
# @param io [IO, nil] the IO object to write the output to; if nil, uses
|
|
412
412
|
# STDOUT
|
|
413
|
-
|
|
413
|
+
# @param pager [String, nil] the pager command for long output; if nil,
|
|
414
|
+
# falls back to the `PAGER` environment variable or `less -r`
|
|
415
|
+
def view(object: self, io: nil, pager: nil)
|
|
416
|
+
pager ||= ENV.fetch('PAGER', 'less -r')
|
|
414
417
|
output = ConstConf::Tree.from_const_conf(object).to_a
|
|
415
418
|
if io
|
|
416
419
|
io.puts output
|
|
417
420
|
elsif output.size < Tins::Terminal.lines
|
|
418
421
|
STDOUT.puts output
|
|
419
422
|
else
|
|
420
|
-
IO.popen(
|
|
423
|
+
IO.popen(pager, ?w) do |f|
|
|
421
424
|
f.puts output
|
|
422
425
|
f.close_write
|
|
423
426
|
end
|
data/spec/const_conf_spec.rb
CHANGED
|
@@ -265,6 +265,12 @@ describe ConstConf do
|
|
|
265
265
|
)
|
|
266
266
|
TestConstConf.view
|
|
267
267
|
end
|
|
268
|
+
|
|
269
|
+
it 'passes custom pager to IO.popen' do
|
|
270
|
+
allow(Tins::Terminal).to receive(:lines).and_return(0)
|
|
271
|
+
expect(IO).to receive(:popen).with('my-custom-pager', ?w)
|
|
272
|
+
TestConstConf.view(pager: 'my-custom-pager')
|
|
273
|
+
end
|
|
268
274
|
end
|
|
269
275
|
|
|
270
276
|
describe '.documentation' do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: const_conf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 2.
|
|
18
|
+
version: 2.24.1
|
|
19
19
|
type: :development
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 2.
|
|
25
|
+
version: 2.24.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: debug
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -111,16 +111,22 @@ dependencies:
|
|
|
111
111
|
name: json
|
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
|
-
- - "
|
|
114
|
+
- - ">="
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: '2.0'
|
|
117
|
+
- - "<"
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: '4'
|
|
117
120
|
type: :runtime
|
|
118
121
|
prerelease: false
|
|
119
122
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
123
|
requirements:
|
|
121
|
-
- - "
|
|
124
|
+
- - ">="
|
|
122
125
|
- !ruby/object:Gem::Version
|
|
123
126
|
version: '2.0'
|
|
127
|
+
- - "<"
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '4'
|
|
124
130
|
- !ruby/object:Gem::Dependency
|
|
125
131
|
name: complex_config
|
|
126
132
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -229,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
229
235
|
- !ruby/object:Gem::Version
|
|
230
236
|
version: '0'
|
|
231
237
|
requirements: []
|
|
232
|
-
rubygems_version: 4.0.
|
|
238
|
+
rubygems_version: 4.0.24
|
|
233
239
|
specification_version: 4
|
|
234
240
|
summary: Clean DSL for config settings with validation and Rails integration
|
|
235
241
|
test_files:
|