gemsmith 19.1.0 → 19.3.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 -1
- data/gemsmith.gemspec +4 -3
- data/lib/gemsmith/builders/git/commit.rb +1 -34
- data/lib/gemsmith/cli/parser.rb +2 -1
- data/lib/gemsmith/cli/parsers/build.rb +2 -1
- data/lib/gemsmith/cli/parsers/core.rb +2 -1
- data/lib/gemsmith/cli/shell.rb +3 -1
- data/lib/gemsmith/configuration/loader.rb +1 -6
- data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +3 -0
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parser.rb.erb +2 -1
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parsers/core.rb.erb +2 -1
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb +3 -1
- data.tar.gz.sig +0 -0
- metadata +21 -7
- 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: 95d511941ea8db3bca78600df275809ee6276432de45d98213822730652506e6
|
4
|
+
data.tar.gz: 58a14bff0f5a01aac84e5e310f4df46292a897dd296d1456f67ff4595cbf847f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93b02f12bdef0a377924ed3eadc026eb009053a208b58ff3aa4aba1a38764b4e8a27fbd3c0f0ded27ba366b1f809c0e7d7a46a2d0f65927ae49348dd0cd1377c
|
7
|
+
data.tar.gz: 37d50db47ddf567be0c6e67410a042b446cd449c0e92ee0041450fd66c0791ffebfa534094c106b92e4f88d711cf4dd30be4b78203445bea17a4ed12ccfbde21
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
data/gemsmith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "gemsmith"
|
5
|
-
spec.version = "19.
|
5
|
+
spec.version = "19.3.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/gemsmith"
|
@@ -24,12 +24,13 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.2"
|
26
26
|
spec.add_dependency "cogger", "~> 0.5"
|
27
|
+
spec.add_dependency "core", "~> 0.1"
|
27
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
28
29
|
spec.add_dependency "dry-monads", "~> 1.6"
|
29
30
|
spec.add_dependency "infusible", "~> 1.0"
|
30
|
-
spec.add_dependency "milestoner", "~> 15.
|
31
|
+
spec.add_dependency "milestoner", "~> 15.2"
|
31
32
|
spec.add_dependency "refinements", "~> 10.0"
|
32
|
-
spec.add_dependency "rubysmith", "~> 4.
|
33
|
+
spec.add_dependency "rubysmith", "~> 4.4"
|
33
34
|
spec.add_dependency "runcom", "~> 9.0"
|
34
35
|
spec.add_dependency "spek", "~> 1.0"
|
35
36
|
spec.add_dependency "versionaire", "~> 11.0"
|
@@ -4,41 +4,8 @@ module Gemsmith
|
|
4
4
|
module Builders
|
5
5
|
module Git
|
6
6
|
# Builds project skeleton initial Git commit message.
|
7
|
-
class Commit
|
7
|
+
class Commit < Rubysmith::Builders::Git::Commit
|
8
8
|
include Import[:specification]
|
9
|
-
|
10
|
-
def self.call(...) = new(...).call
|
11
|
-
|
12
|
-
def initialize configuration, builder: Rubysmith::Builder, **dependencies
|
13
|
-
super(**dependencies)
|
14
|
-
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
|
-
def call
|
20
|
-
return configuration unless configuration.build_git
|
21
|
-
|
22
|
-
builder.call(configuration)
|
23
|
-
.run("git add .", chdir: project_name)
|
24
|
-
.run(
|
25
|
-
%(git commit --all --message "Added project skeleton" --message "#{body}"),
|
26
|
-
chdir: project_name
|
27
|
-
)
|
28
|
-
|
29
|
-
configuration
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
attr_reader :configuration, :builder
|
35
|
-
|
36
|
-
def body
|
37
|
-
"Generated with [#{specification.label}](#{specification.homepage_url}) " \
|
38
|
-
"#{specification.version}."
|
39
|
-
end
|
40
|
-
|
41
|
-
def project_name = configuration.project_name
|
42
9
|
end
|
43
10
|
end
|
44
11
|
end
|
data/lib/gemsmith/cli/parser.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "optparse"
|
4
5
|
|
5
6
|
module Gemsmith
|
@@ -21,7 +22,7 @@ module Gemsmith
|
|
21
22
|
@configuration_duplicate = configuration.dup
|
22
23
|
end
|
23
24
|
|
24
|
-
def call arguments =
|
25
|
+
def call arguments = Core::EMPTY_ARRAY
|
25
26
|
sections.each { |section| section.call configuration_duplicate, client: }
|
26
27
|
client.parse arguments
|
27
28
|
configuration_duplicate.freeze
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "refinements/structs"
|
4
5
|
|
5
6
|
module Gemsmith
|
@@ -23,7 +24,7 @@ module Gemsmith
|
|
23
24
|
@client = client
|
24
25
|
end
|
25
26
|
|
26
|
-
def call arguments =
|
27
|
+
def call arguments = ::Core::EMPTY_ARRAY
|
27
28
|
add_cli
|
28
29
|
client.parse arguments
|
29
30
|
configuration
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "pathname"
|
4
5
|
require "refinements/structs"
|
5
6
|
|
@@ -23,7 +24,7 @@ module Gemsmith
|
|
23
24
|
@client = client
|
24
25
|
end
|
25
26
|
|
26
|
-
def call arguments =
|
27
|
+
def call arguments = ::Core::EMPTY_ARRAY
|
27
28
|
client.banner = specification.labeled_summary
|
28
29
|
client.separator "\nUSAGE:\n"
|
29
30
|
collate
|
data/lib/gemsmith/cli/shell.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Gemsmith
|
4
6
|
module CLI
|
5
7
|
# The main Command Line Interface (CLI) object.
|
@@ -20,7 +22,7 @@ module Gemsmith
|
|
20
22
|
@parser = parser
|
21
23
|
end
|
22
24
|
|
23
|
-
def call arguments =
|
25
|
+
def call arguments = Core::EMPTY_ARRAY
|
24
26
|
perform parser.call(arguments)
|
25
27
|
rescue OptionParser::ParseError => error
|
26
28
|
logger.error { error.message }
|
@@ -1,14 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/structs"
|
4
3
|
require "runcom"
|
5
4
|
|
6
5
|
module Gemsmith
|
7
6
|
module Configuration
|
8
7
|
# Represents the fully assembled Command Line Interface (CLI) configuration.
|
9
8
|
class Loader < Rubysmith::Configuration::Loader
|
10
|
-
using Refinements::Structs
|
11
|
-
|
12
9
|
DEFAULTS = Rubysmith::Configuration::Loader::DEFAULTS
|
13
10
|
CLIENT = Runcom::Config.new "gemsmith/configuration.yml", defaults: DEFAULTS
|
14
11
|
|
@@ -17,9 +14,7 @@ module Gemsmith
|
|
17
14
|
enhancers: {template_root: Rubysmith::Configuration::Enhancers::TemplateRoot}
|
18
15
|
end
|
19
16
|
|
20
|
-
def initialize
|
21
|
-
super
|
22
|
-
end
|
17
|
+
def initialize(client: CLIENT, **) = super
|
23
18
|
|
24
19
|
def call
|
25
20
|
return super unless enhancers.key? :template_root
|
@@ -38,6 +38,9 @@ Gem::Specification.new do |spec|
|
|
38
38
|
<% if configuration.build_cli %>
|
39
39
|
spec.add_dependency "cogger", "~> 0.5"
|
40
40
|
<% end %>
|
41
|
+
<% if configuration.build_cli %>
|
42
|
+
spec.add_dependency "core", "~> 0.1"
|
43
|
+
<% end %>
|
41
44
|
<% if configuration.build_cli %>
|
42
45
|
spec.add_dependency "dry-container", "~> 0.11"
|
43
46
|
<% end %>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "core"
|
1
2
|
require "optparse"
|
2
3
|
|
3
4
|
<% namespace do %>
|
@@ -19,7 +20,7 @@ require "optparse"
|
|
19
20
|
@configuration_duplicate = configuration.dup
|
20
21
|
end
|
21
22
|
|
22
|
-
def call arguments =
|
23
|
+
def call arguments = Core::EMPTY_ARRAY
|
23
24
|
sections.each { |section| section.call configuration_duplicate, client: }
|
24
25
|
client.parse arguments
|
25
26
|
configuration_duplicate.freeze
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "core"
|
1
2
|
require "refinements/structs"
|
2
3
|
|
3
4
|
<% namespace do %>
|
@@ -20,7 +21,7 @@ require "refinements/structs"
|
|
20
21
|
@client = client
|
21
22
|
end
|
22
23
|
|
23
|
-
def call arguments =
|
24
|
+
def call arguments = ::Core::EMPTY_ARRAY
|
24
25
|
client.banner = specification.labeled_summary
|
25
26
|
client.separator "\nUSAGE:\n"
|
26
27
|
collate
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "core"
|
2
|
+
|
1
3
|
<% namespace do %>
|
2
4
|
module CLI
|
3
5
|
# The main Command Line Interface (CLI) object.
|
@@ -9,7 +11,7 @@
|
|
9
11
|
@parser = parser
|
10
12
|
end
|
11
13
|
|
12
|
-
def call arguments =
|
14
|
+
def call arguments = Core::EMPTY_ARRAY
|
13
15
|
perform parser.call(arguments)
|
14
16
|
rescue OptionParser::ParseError => error
|
15
17
|
logger.error { error.message }
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemsmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 19.
|
4
|
+
version: 19.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2023-01-
|
31
|
+
date: 2023-01-22 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0.5'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: core
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.1'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: dry-container
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +106,14 @@ dependencies:
|
|
92
106
|
requirements:
|
93
107
|
- - "~>"
|
94
108
|
- !ruby/object:Gem::Version
|
95
|
-
version: '15.
|
109
|
+
version: '15.2'
|
96
110
|
type: :runtime
|
97
111
|
prerelease: false
|
98
112
|
version_requirements: !ruby/object:Gem::Requirement
|
99
113
|
requirements:
|
100
114
|
- - "~>"
|
101
115
|
- !ruby/object:Gem::Version
|
102
|
-
version: '15.
|
116
|
+
version: '15.2'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: refinements
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +134,14 @@ dependencies:
|
|
120
134
|
requirements:
|
121
135
|
- - "~>"
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: '4.
|
137
|
+
version: '4.4'
|
124
138
|
type: :runtime
|
125
139
|
prerelease: false
|
126
140
|
version_requirements: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - "~>"
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: '4.
|
144
|
+
version: '4.4'
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: runcom
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
293
|
- !ruby/object:Gem::Version
|
280
294
|
version: '0'
|
281
295
|
requirements: []
|
282
|
-
rubygems_version: 3.4.
|
296
|
+
rubygems_version: 3.4.4
|
283
297
|
signing_key:
|
284
298
|
specification_version: 4
|
285
299
|
summary: A command line interface for smithing Ruby gems.
|
metadata.gz.sig
CHANGED
Binary file
|