utils 0.75.0 → 0.76.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/.utilsrc +1 -0
- data/Rakefile +1 -1
- data/lib/utils/config_file.rb +29 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64a9477a08fc6208e5f08541548f114214e1e16d1541b54afd796a993f4bb797
|
4
|
+
data.tar.gz: 85f16bde757a26d38ddb7de7b5ffe8543a638966cec97e17c9c8fbbcfc4b5ab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f390d477492c50e7b048041642a72c1ce25303faa92586a6541eca418f5017650617023877bfb30195d0f47d702b76dc481b428398cc539b627a3dcf132c7d0d
|
7
|
+
data.tar.gz: edec6e1f40bcef944275643784dcea4992deee86bcfd962412e9175d9aa34ecbcdef9aab2400e81bc77a975b99a7714fb8d417196a3b53981280e666b38899a0
|
data/.utilsrc
CHANGED
data/Rakefile
CHANGED
data/lib/utils/config_file.rb
CHANGED
@@ -8,6 +8,11 @@ require 'tins'
|
|
8
8
|
# provide centralized configuration management.
|
9
9
|
class Utils::ConfigFile
|
10
10
|
class << self
|
11
|
+
|
12
|
+
# The config_file_paths accessor method provides read and write access to
|
13
|
+
# the config_file_paths instance variable.
|
14
|
+
#
|
15
|
+
# @return [ Array<String> ] the array of configuration file paths
|
11
16
|
attr_accessor :config_file_paths
|
12
17
|
end
|
13
18
|
self.config_file_paths = [
|
@@ -126,6 +131,27 @@ class Utils::ConfigFile
|
|
126
131
|
self
|
127
132
|
end
|
128
133
|
|
134
|
+
# The lazy_config method configures a lazy-loaded configuration option
|
135
|
+
# with a default value.
|
136
|
+
#
|
137
|
+
# This method registers a new configuration setting that will be
|
138
|
+
# initialized lazily, meaning the default value or the set value is only
|
139
|
+
# computed when the configuration is actually accessed. It adds the
|
140
|
+
# setting to the list of configuration settings and creates a lazy
|
141
|
+
# accessor for it.
|
142
|
+
#
|
143
|
+
# @param name [ Object ] the name of the configuration setting to define
|
144
|
+
# @yield [ default ] optional block that provides the default value for
|
145
|
+
# the configuration
|
146
|
+
#
|
147
|
+
# @return [ Object ] returns self to allow for method chaining
|
148
|
+
def lazy_config(name, &default)
|
149
|
+
self.config_settings ||= []
|
150
|
+
config_settings << name.to_sym
|
151
|
+
dsl_lazy_accessor(name, &default)
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
129
155
|
# The config_settings method provides access to the configuration
|
130
156
|
# settings.
|
131
157
|
#
|
@@ -426,7 +452,9 @@ class Utils::ConfigFile
|
|
426
452
|
class CodeIndexer < BlockConfig
|
427
453
|
config :verbose, false
|
428
454
|
|
429
|
-
|
455
|
+
lazy_config :paths do
|
456
|
+
%w[ bin lib spec tests ]
|
457
|
+
end
|
430
458
|
|
431
459
|
config :formats, {
|
432
460
|
'ctags' => 'tags',
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.76.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "utils".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.76.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]
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency(%q<test-unit>.freeze, [">= 0".freeze])
|
28
28
|
s.add_runtime_dependency(%q<unix_socks>.freeze, [">= 0".freeze])
|
29
29
|
s.add_runtime_dependency(%q<webrick>.freeze, [">= 0".freeze])
|
30
|
-
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.
|
30
|
+
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.43".freeze])
|
31
31
|
s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.11".freeze])
|
32
32
|
s.add_runtime_dependency(%q<pstree>.freeze, ["~> 0.3".freeze])
|
33
33
|
s.add_runtime_dependency(%q<infobar>.freeze, ["~> 0.8".freeze])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.76.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
@@ -71,14 +71,14 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '1.
|
74
|
+
version: '1.43'
|
75
75
|
type: :runtime
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1.
|
81
|
+
version: '1.43'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: term-ansicolor
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|