rubysmith 5.3.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +1 -15
- data/exe/rubysmith +1 -1
- data/lib/rubysmith/builders/git/commit.rb +1 -1
- data/lib/rubysmith/configuration/model.rb +0 -5
- data/lib/rubysmith/configuration/transformers/current_time.rb +3 -3
- data/lib/rubysmith/configuration/transformers/git_email.rb +9 -2
- data/lib/rubysmith/configuration/transformers/git_hub_user.rb +9 -2
- data/lib/rubysmith/configuration/transformers/target_root.rb +2 -2
- data/lib/rubysmith/configuration/transformers/template_root.rb +5 -4
- data/lib/rubysmith/container.rb +11 -8
- data/rubysmith.gemspec +2 -2
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ca1a2ed0fc35e9412dd6a42f5c672fb17d9f1368ed3f7bb2e8e95368c22049a
|
4
|
+
data.tar.gz: bcf8e3c7961409f94ddfcb999a172d367549a06cb31582c9f5add5fa0a95d61f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f70332376f6cc8ac82012a81a5edd0303ea14e1fb9d1013786752c50510b3bd8ac19faf4c442a5e77dc5b08c3a84517dc5be0d38dda29098d4160e4c0cb4de
|
7
|
+
data.tar.gz: 70970bc7a922c0af0b85a46a8909c9db6be75db024de7a2a4b1909b89bca695830aa5afd9bfec3127fbd3c4c9dced64869ccbb74e5a9a56c7fb8dc2d19855140
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -76,21 +76,7 @@ gem install rubysmith
|
|
76
76
|
|
77
77
|
From the command line, type: `rubysmith --help`
|
78
78
|
|
79
|
-
|
80
|
-
USAGE
|
81
|
-
rubysmith [OPTIONS]
|
82
|
-
rubysmith COMMAND [OPTIONS]
|
83
|
-
|
84
|
-
OPTIONS
|
85
|
-
-p, --publish VERSION Publish project.
|
86
|
-
-v, --version Show version.
|
87
|
-
-h, --help [COMMAND] Show this message.
|
88
|
-
|
89
|
-
COMMANDS
|
90
|
-
config Manage configuration.
|
91
|
-
Path is dynamic per current directory.
|
92
|
-
build Build new project.
|
93
|
-
....
|
79
|
+
image:https://alchemists.io/images/projects/rubysmith/screenshots/usage.png[Usage,width=588,height=345,role=focal_point]
|
94
80
|
|
95
81
|
==== Build
|
96
82
|
|
data/exe/rubysmith
CHANGED
@@ -33,7 +33,7 @@ module Rubysmith
|
|
33
33
|
attr_reader :configuration, :builder
|
34
34
|
|
35
35
|
def body
|
36
|
-
"Generated with
|
36
|
+
"Generated with link:#{specification.homepage_url}[#{specification.label}] " \
|
37
37
|
"#{specification.version}."
|
38
38
|
end
|
39
39
|
|
@@ -8,9 +8,9 @@ module Rubysmith
|
|
8
8
|
module Transformers
|
9
9
|
include Dry::Monads[:result]
|
10
10
|
|
11
|
-
CurrentTime = lambda do |content, at: Time.now|
|
12
|
-
content.fetch(
|
13
|
-
.then { |
|
11
|
+
CurrentTime = lambda do |content, key = :now, at: Time.now|
|
12
|
+
content.fetch(key) { at }
|
13
|
+
.then { |value| content.merge! key => value }
|
14
14
|
.then { |updated_content| Dry::Monads::Success updated_content }
|
15
15
|
end
|
16
16
|
end
|
@@ -10,13 +10,20 @@ module Rubysmith
|
|
10
10
|
include Import[:git]
|
11
11
|
include Dry::Monads[:result]
|
12
12
|
|
13
|
-
def
|
13
|
+
def initialize(key = :author_email, **)
|
14
|
+
@key = key
|
15
|
+
super(**)
|
16
|
+
end
|
17
|
+
|
18
|
+
def call(content) = content[key] ? Success(content) : email_or(content)
|
14
19
|
|
15
20
|
private
|
16
21
|
|
22
|
+
attr_reader :key
|
23
|
+
|
17
24
|
def email_or content
|
18
25
|
git.get("user.email", nil)
|
19
|
-
.fmap { |
|
26
|
+
.fmap { |value| value ? content.merge!(key => value) : content }
|
20
27
|
.or { Success content }
|
21
28
|
end
|
22
29
|
end
|
@@ -10,13 +10,20 @@ module Rubysmith
|
|
10
10
|
include Import[:git]
|
11
11
|
include Dry::Monads[:result]
|
12
12
|
|
13
|
-
def
|
13
|
+
def initialize(key = :git_hub_user, **)
|
14
|
+
@key = key
|
15
|
+
super(**)
|
16
|
+
end
|
17
|
+
|
18
|
+
def call(content) = content[key] ? Success(content) : user_or(content)
|
14
19
|
|
15
20
|
private
|
16
21
|
|
22
|
+
attr_reader :key
|
23
|
+
|
17
24
|
def user_or content
|
18
25
|
git.get("github.user", nil)
|
19
|
-
.fmap { |
|
26
|
+
.fmap { |value| value ? content.merge!(key => value) : content }
|
20
27
|
.or { Success content }
|
21
28
|
end
|
22
29
|
end
|
@@ -8,9 +8,9 @@ module Rubysmith
|
|
8
8
|
module Transformers
|
9
9
|
include Dry::Monads[:result]
|
10
10
|
|
11
|
-
TargetRoot = lambda do |content, path: Pathname.pwd|
|
11
|
+
TargetRoot = lambda do |content, key = :target_root, path: Pathname.pwd|
|
12
12
|
content.fetch(:target_root) { path }
|
13
|
-
.then { |
|
13
|
+
.then { |value| content.merge! key => value }
|
14
14
|
.then { |updated_content| Dry::Monads::Success updated_content }
|
15
15
|
end
|
16
16
|
end
|
@@ -12,20 +12,21 @@ module Rubysmith
|
|
12
12
|
|
13
13
|
using Refinements::Arrays
|
14
14
|
|
15
|
-
def initialize
|
15
|
+
def initialize key = :template_roots, default: Pathname(__dir__).join("../../templates")
|
16
|
+
@key = key
|
16
17
|
@default = default
|
17
18
|
end
|
18
19
|
|
19
20
|
def call content
|
20
21
|
Array(default).map { |path| Pathname path }
|
21
|
-
.including(content[
|
22
|
+
.including(content[key])
|
22
23
|
.compact
|
23
|
-
.then { |
|
24
|
+
.then { |value| Success content.merge!(key => value) }
|
24
25
|
end
|
25
26
|
|
26
27
|
private
|
27
28
|
|
28
|
-
attr_reader :default
|
29
|
+
attr_reader :key, :default
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
data/lib/rubysmith/container.rb
CHANGED
@@ -12,12 +12,12 @@ module Rubysmith
|
|
12
12
|
module Container
|
13
13
|
extend Dry::Container::Mixin
|
14
14
|
|
15
|
-
register :configuration do
|
15
|
+
register :configuration, memoize: true do
|
16
16
|
self[:defaults].add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
|
17
17
|
.then { |registry| Etcher.call registry }
|
18
18
|
end
|
19
19
|
|
20
|
-
register :defaults do
|
20
|
+
register :defaults, memoize: true do
|
21
21
|
Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
|
22
22
|
.add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
|
23
23
|
.add_transformer(Configuration::Transformers::CurrentTime)
|
@@ -28,12 +28,15 @@ module Rubysmith
|
|
28
28
|
.add_transformer(Configuration::Transformers::TargetRoot)
|
29
29
|
end
|
30
30
|
|
31
|
+
register :specification, memoize: true do
|
32
|
+
Spek::Loader.call "#{__dir__}/../../rubysmith.gemspec"
|
33
|
+
end
|
34
|
+
|
31
35
|
register(:input, memoize: true) { self[:configuration].dup }
|
32
|
-
register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
|
33
|
-
register(:xdg_config) { Runcom::Config.new "rubysmith/configuration.yml" }
|
34
|
-
register(:
|
35
|
-
register(:
|
36
|
-
register
|
37
|
-
register(:logger) { Cogger.new formatter: :emoji }
|
36
|
+
register(:defaults_path, memoize: true) { Pathname(__dir__).join("configuration/defaults.yml") }
|
37
|
+
register(:xdg_config, memoize: true) { Runcom::Config.new "rubysmith/configuration.yml" }
|
38
|
+
register(:git, memoize: true) { Gitt::Repository.new }
|
39
|
+
register(:logger, memoize: true) { Cogger.new formatter: :emoji }
|
40
|
+
register :kernel, Kernel
|
38
41
|
end
|
39
42
|
end
|
data/rubysmith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "rubysmith"
|
5
|
-
spec.version = "5.
|
5
|
+
spec.version = "5.5.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://github.com/bkuhlmann/rubysmith"
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency "milestoner", "~> 16.0"
|
34
34
|
spec.add_dependency "pragmater", "~> 13.0"
|
35
35
|
spec.add_dependency "refinements", "~> 11.0"
|
36
|
-
spec.add_dependency "rubocop", "~> 1.
|
36
|
+
spec.add_dependency "rubocop", "~> 1.55"
|
37
37
|
spec.add_dependency "runcom", "~> 10.0"
|
38
38
|
spec.add_dependency "sod", "~> 0.0"
|
39
39
|
spec.add_dependency "spek", "~> 2.0"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2023-
|
38
|
+
date: 2023-07-29 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -183,14 +183,14 @@ dependencies:
|
|
183
183
|
requirements:
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: '1.
|
186
|
+
version: '1.55'
|
187
187
|
type: :runtime
|
188
188
|
prerelease: false
|
189
189
|
version_requirements: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
191
|
- - "~>"
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version: '1.
|
193
|
+
version: '1.55'
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
195
|
name: runcom
|
196
196
|
requirement: !ruby/object:Gem::Requirement
|
@@ -426,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
426
426
|
- !ruby/object:Gem::Version
|
427
427
|
version: '0'
|
428
428
|
requirements: []
|
429
|
-
rubygems_version: 3.4.
|
429
|
+
rubygems_version: 3.4.17
|
430
430
|
signing_key:
|
431
431
|
specification_version: 4
|
432
432
|
summary: A command line interface for smithing Ruby projects.
|
metadata.gz.sig
CHANGED
Binary file
|