config_toys 0.5.0 → 0.7.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 +12 -0
- data/README.md +3 -3
- data/lib/config_toys/template.rb +14 -5
- data/lib/config_toys/version.rb +1 -1
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6af4cc2c780a21a925348cbc09235f03ff2ecd43f84eed0442de175d103a146d
|
4
|
+
data.tar.gz: ff7c859e1685c29693c10e18e91146f8a7ae9b772f8d6c5054e660286e0be18f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d7269f14189ba677e2d68f0dc5933e630032328f2b2c47ed5864a2a1686ae924e617df984a418f4ed86e8ea08856653fb69e1f820666b2207fb09fd138f1ce5
|
7
|
+
data.tar.gz: 7a21e67e214e8292949795910ea035138d517f59e5b6f4b8947e4d274a22b6a5ed31d0cc65ae79897430bcc221964ff2758185cdd820fd1929eac4ad2b4b45dc
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 0.7.0 (2022-10-22)
|
6
|
+
|
7
|
+
* Update `toys` and `toys-core`.
|
8
|
+
* Update `rubocop`.
|
9
|
+
|
10
|
+
## 0.6.0 (2022-09-29)
|
11
|
+
|
12
|
+
* Add `initialize` (`init`) toy.
|
13
|
+
Useful for initial project generation.
|
14
|
+
* Update development dependencies.
|
15
|
+
* Improve CI.
|
16
|
+
|
5
17
|
## 0.5.0 (2022-03-03)
|
6
18
|
|
7
19
|
* Drop Ruby 2.5 support.
|
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/
|
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=
|
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.
|
data/lib/config_toys/template.rb
CHANGED
@@ -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
|
-
|
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
|
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.7.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: 2022-
|
11
|
+
date: 2022-10-21 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.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.
|
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.
|
33
|
+
version: 0.14.2
|
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.14.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry-byebug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.14.2
|
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.
|
96
|
+
version: 0.14.2
|
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:
|
112
|
+
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
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:
|
124
|
+
version: '3.9'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: simplecov
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
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:
|
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:
|
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:
|
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.
|
159
|
+
version: 1.37.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.
|
166
|
+
version: 1.37.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-performance
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,8 +212,8 @@ licenses:
|
|
212
212
|
- MIT
|
213
213
|
metadata:
|
214
214
|
bug_tracker_uri: https://github.com/AlexWayfer/config_toys/issues
|
215
|
-
changelog_uri: https://github.com/AlexWayfer/config_toys/blob/v0.
|
216
|
-
documentation_uri: http://www.rubydoc.info/gems/config_toys/0.
|
215
|
+
changelog_uri: https://github.com/AlexWayfer/config_toys/blob/v0.7.0/CHANGELOG.md
|
216
|
+
documentation_uri: http://www.rubydoc.info/gems/config_toys/0.7.0
|
217
217
|
homepage_uri: https://github.com/AlexWayfer/config_toys
|
218
218
|
rubygems_mfa_required: 'true'
|
219
219
|
source_code_uri: https://github.com/AlexWayfer/config_toys
|