config_toys 0.2.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/README.md +1 -0
- data/lib/config_toys/template.rb +17 -12
- data/lib/config_toys/version.rb +1 -1
- metadata +43 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c7f4ade68c51e37c6edb420134c8f2cdf8b59abe1197d5a710dec1ca265884a
|
4
|
+
data.tar.gz: ece87c1444e79fcc880c853e182493be078a1776841ee329d353ddc46d33fa59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e785742b18d6fa463037cd5ab882ee3112208ded73f21488c6c375874932ad854c34656d3842ccaed8c2b93b4920750db3f9ce284c58afc5410f043d63f9d9ae
|
7
|
+
data.tar.gz: e6954db527e249ea9753563b3bd51be225ce2ea0d4e6a812ccd2ceff598f556c85d52c19c21c6fc7d5bad87d196d060a05a3e2291be2b991d87237404484a4f8
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,32 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## 0.5.0 (2022-03-03)
|
6
|
+
|
7
|
+
* Drop Ruby 2.5 support.
|
8
|
+
* Add Ruby 3.1 for CI.
|
9
|
+
* Update dependencies.
|
10
|
+
* Resolve new RuboCop offense.
|
11
|
+
|
12
|
+
## 0.4.0 (2021-10-18)
|
13
|
+
|
14
|
+
* Add default for `:config_dir`.
|
15
|
+
* Add `skip` and `quit` answers.
|
16
|
+
* Add Ruby 3.0 for CI.
|
17
|
+
* Add `bundle-audit` CI task.
|
18
|
+
* Update development dependencies.
|
19
|
+
|
20
|
+
## 0.3.0 (2020-09-30)
|
21
|
+
|
22
|
+
* Move check for `EDITOR` environment variable inside `example_file`.
|
23
|
+
Check only when trying to edit.
|
24
|
+
* Update development dependencies.
|
4
25
|
|
5
26
|
## 0.2.0 (2020-08-23)
|
6
27
|
|
28
|
+
* Update `toys`
|
29
|
+
|
7
30
|
## 0.1.0 (2020-07-10)
|
8
31
|
|
9
32
|
* Initial release.
|
data/README.md
CHANGED
data/lib/config_toys/template.rb
CHANGED
@@ -9,7 +9,7 @@ module ConfigToys
|
|
9
9
|
|
10
10
|
attr_reader :config_dir
|
11
11
|
|
12
|
-
def initialize(config_dir:)
|
12
|
+
def initialize(config_dir: -> { "#{context_directory}/config" })
|
13
13
|
@config_dir = config_dir
|
14
14
|
end
|
15
15
|
|
@@ -18,21 +18,26 @@ module ConfigToys
|
|
18
18
|
tool :check do
|
19
19
|
desc 'Check config files'
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
self::ADDITIONAL_CHOICES = {
|
22
|
+
skip: -> { puts "#{@regular_basename} remains unchanged" },
|
23
|
+
quit: -> { exit }
|
24
|
+
}.freeze
|
25
25
|
|
26
|
-
|
27
|
-
ExampleFile.all(template.config_dir).each(&:actualize_regular_file)
|
28
|
-
end
|
26
|
+
self::SEPARATOR = <<~SEPARATOR
|
29
27
|
|
30
|
-
|
28
|
+
---
|
31
29
|
|
32
|
-
|
33
|
-
return unless ENV['EDITOR'].to_s.empty?
|
30
|
+
SEPARATOR
|
34
31
|
|
35
|
-
|
32
|
+
to_run do
|
33
|
+
require 'example_file'
|
34
|
+
config_dir = template.config_dir
|
35
|
+
config_dir = instance_exec(&config_dir) if config_dir.is_a? Proc
|
36
|
+
ExampleFile.all(config_dir).each_with_index do |example_file, index|
|
37
|
+
example_file.choices.merge! self.class::ADDITIONAL_CHOICES
|
38
|
+
example_file.question_prefix = self.class::SEPARATOR if index.positive?
|
39
|
+
example_file.actualize_regular_file
|
40
|
+
end
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end
|
data/lib/config_toys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: example_file
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.0
|
20
20
|
type: :runtime
|
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: 0.
|
26
|
+
version: 0.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: toys-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.13.0
|
34
34
|
type: :runtime
|
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: 0.
|
40
|
+
version: 0.13.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry-byebug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,42 +72,56 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.12.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.12.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: toys
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.13.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.13.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler-audit
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.9.0
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
110
|
+
version: 0.9.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: codecov
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
117
|
+
version: 0.6.0
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
124
|
+
version: 0.6.0
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rspec
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +142,28 @@ dependencies:
|
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
145
|
+
version: 0.21.2
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
152
|
+
version: 0.21.2
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rubocop
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: 1.25.1
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: 1.25.1
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rubocop-performance
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +184,14 @@ dependencies:
|
|
170
184
|
requirements:
|
171
185
|
- - "~>"
|
172
186
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
187
|
+
version: '2.0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
192
|
- - "~>"
|
179
193
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
194
|
+
version: '2.0'
|
181
195
|
description: 'Toys template for applications configuration.
|
182
196
|
|
183
197
|
'
|
@@ -197,9 +211,13 @@ homepage: https://github.com/AlexWayfer/config_toys
|
|
197
211
|
licenses:
|
198
212
|
- MIT
|
199
213
|
metadata:
|
200
|
-
|
214
|
+
bug_tracker_uri: https://github.com/AlexWayfer/config_toys/issues
|
215
|
+
changelog_uri: https://github.com/AlexWayfer/config_toys/blob/v0.5.0/CHANGELOG.md
|
216
|
+
documentation_uri: http://www.rubydoc.info/gems/config_toys/0.5.0
|
201
217
|
homepage_uri: https://github.com/AlexWayfer/config_toys
|
202
|
-
|
218
|
+
rubygems_mfa_required: 'true'
|
219
|
+
source_code_uri: https://github.com/AlexWayfer/config_toys
|
220
|
+
wiki_uri: https://github.com/AlexWayfer/config_toys/wiki
|
203
221
|
post_install_message:
|
204
222
|
rdoc_options: []
|
205
223
|
require_paths:
|
@@ -208,14 +226,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
208
226
|
requirements:
|
209
227
|
- - ">="
|
210
228
|
- !ruby/object:Gem::Version
|
211
|
-
version: '2.
|
229
|
+
version: '2.6'
|
230
|
+
- - "<"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '4'
|
212
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
234
|
requirements:
|
214
235
|
- - ">="
|
215
236
|
- !ruby/object:Gem::Version
|
216
237
|
version: '0'
|
217
238
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
239
|
+
rubygems_version: 3.3.7
|
219
240
|
signing_key:
|
220
241
|
specification_version: 4
|
221
242
|
summary: Toys template for applications configuration.
|