config_toys 0.4.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 759ae044052495343ebbb41e29da06d1e3319bc533d8887699d702571969668e
4
- data.tar.gz: 8adcf33e877ccbd734174afe92bbbaeb5aeb2d2aa4b8ff53680dacd90be50ebf
3
+ metadata.gz: 83017b128ee5510c999ebf9ac854c70f222e59bb4248a1eee57c91b59dd1e701
4
+ data.tar.gz: e394c7d0582ce2ead313190050005c12ce5735ec7773c06646672297ac4e9d28
5
5
  SHA512:
6
- metadata.gz: 0f22c6acc2b4ab059b3a3ae3785812c623c282789515e0dca39b1136bae46e148894ab7170775580d9518f289d490d323b2a9e833187c6c5eafb620d66083af9
7
- data.tar.gz: 8555d5da58b07f181f81870ec152f7b892de037ec6fdaf65f223731c08af8ec127e46d765e8f826f8ce2a6bca7a190e2b2b605e6ea71956df83a0116530ae31a
6
+ metadata.gz: 1e20fe4fa988dd6abceaa7c910eae1ce50eab2a4c5f91c858b50beaa9c26fe70afc07a378a16f5811115cb80f6ec58d4a53335eef3220b3799029706d71c606b
7
+ data.tar.gz: 10071130da74011017c5c0864186d9c858038effc23e4c40bf97688a8f936fbcb2d3995af7ffc3acba20ec658c21b59895e1480cd4480b5f809e066a50c11849
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.6.0 (2022-09-29)
6
+
7
+ * Add `initialize` (`init`) toy.
8
+ Useful for initial project generation.
9
+ * Update development dependencies.
10
+ * Improve CI.
11
+
12
+ ## 0.5.0 (2022-03-03)
13
+
14
+ * Drop Ruby 2.5 support.
15
+ * Add Ruby 3.1 for CI.
16
+ * Update dependencies.
17
+ * Resolve new RuboCop offense.
18
+
5
19
  ## 0.4.0 (2021-10-18)
6
20
 
7
21
  * Add default for `:config_dir`.
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Config Toys
2
2
 
3
3
  ![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/config_toys?style=flat-square)
4
- [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/config_toys/master.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/config_toys)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/config_toys/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/config_toys)
5
5
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/config_toys.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/config_toys)
6
6
  ![Depfu](https://img.shields.io/depfu/AlexWayfer/config_toys?style=flat-square)
7
- [![Inline docs](https://inch-ci.org/github/AlexWayfer/config_toys.svg?branch=master)](https://inch-ci.org/github/AlexWayfer/config_toys)
8
- [![license](https://img.shields.io/github/license/AlexWayfer/config_toys.svg?style=flat-square)](https://github.com/AlexWayfer/config_toys/blob/master/LICENSE.txt)
7
+ [![Inline docs](https://inch-ci.org/github/AlexWayfer/config_toys.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/config_toys)
9
8
  [![Gem](https://img.shields.io/gem/v/config_toys.svg?style=flat-square)](https://rubygems.org/gems/config_toys)
9
+ [![License](https://img.shields.io/github/license/AlexWayfer/config_toys.svg?style=flat-square)](LICENSE.txt)
10
10
 
11
11
  Toys template for applications configuration,
12
12
  like [Flame](https://github.com/AlexWayfer/flame), but not necessarily.
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'toys-core'
4
4
 
5
+ require 'example_file'
6
+
5
7
  module ConfigToys
6
8
  ## Define toys for benchmark
7
9
  class Template
@@ -10,11 +12,21 @@ module ConfigToys
10
12
  attr_reader :config_dir
11
13
 
12
14
  def initialize(config_dir: -> { "#{context_directory}/config" })
13
- @config_dir = config_dir
15
+ @config_dir = config_dir.is_a?(Proc) ? instance_exec(&config_dir) : config_dir
14
16
  end
15
17
 
16
18
  on_expand do |template|
17
19
  tool :config do
20
+ tool :initialize do
21
+ desc 'Initialize config files'
22
+
23
+ to_run do
24
+ ExampleFile.all(template.config_dir).each(&:initialize_regular_file)
25
+ end
26
+ end
27
+
28
+ alias_tool :init, :initialize
29
+
18
30
  tool :check do
19
31
  desc 'Check config files'
20
32
 
@@ -30,10 +42,7 @@ module ConfigToys
30
42
  SEPARATOR
31
43
 
32
44
  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|
45
+ ExampleFile.all(template.config_dir).each_with_index do |example_file, index|
37
46
  example_file.choices.merge! self.class::ADDITIONAL_CHOICES
38
47
  example_file.question_prefix = self.class::SEPARATOR if index.positive?
39
48
  example_file.actualize_regular_file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConfigToys
4
- VERSION = '0.4.0'
4
+ VERSION = '0.6.0'
5
5
  end
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.0
4
+ version: 0.6.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: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2022-09-28 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.3.0
19
+ version: 0.4.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.3.0
26
+ version: 0.4.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.12.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.12.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,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.10.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.10.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.12.0
89
+ version: 0.13.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.12.0
96
+ version: 0.13.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: bundler-audit
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -109,61 +109,61 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.9.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: codecov
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.6.0
117
+ version: '3.9'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.6.0
124
+ version: '3.9'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rspec
126
+ name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.9'
131
+ version: 0.21.2
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.9'
138
+ version: 0.21.2
139
139
  - !ruby/object:Gem::Dependency
140
- name: simplecov
140
+ name: simplecov-cobertura
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.21.2
145
+ version: '2.1'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.21.2
152
+ version: '2.1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubocop
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '1.2'
159
+ version: 1.36.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.2'
166
+ version: 1.36.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop-performance
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -211,9 +211,13 @@ homepage: https://github.com/AlexWayfer/config_toys
211
211
  licenses:
212
212
  - MIT
213
213
  metadata:
214
- source_code_uri: https://github.com/AlexWayfer/config_toys
214
+ bug_tracker_uri: https://github.com/AlexWayfer/config_toys/issues
215
+ changelog_uri: https://github.com/AlexWayfer/config_toys/blob/v0.6.0/CHANGELOG.md
216
+ documentation_uri: http://www.rubydoc.info/gems/config_toys/0.6.0
215
217
  homepage_uri: https://github.com/AlexWayfer/config_toys
216
- changelog_uri: https://github.com/AlexWayfer/config_toys/blob/master/CHANGELOG.md
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
217
221
  post_install_message:
218
222
  rdoc_options: []
219
223
  require_paths:
@@ -222,14 +226,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
226
  requirements:
223
227
  - - ">="
224
228
  - !ruby/object:Gem::Version
225
- version: '2.5'
229
+ version: '2.6'
230
+ - - "<"
231
+ - !ruby/object:Gem::Version
232
+ version: '4'
226
233
  required_rubygems_version: !ruby/object:Gem::Requirement
227
234
  requirements:
228
235
  - - ">="
229
236
  - !ruby/object:Gem::Version
230
237
  version: '0'
231
238
  requirements: []
232
- rubygems_version: 3.2.22
239
+ rubygems_version: 3.3.7
233
240
  signing_key:
234
241
  specification_version: 4
235
242
  summary: Toys template for applications configuration.