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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b004535de235f70328a5c2066cb67c63c6d54140e8acdea5d7d84bd87b8b9c3
4
- data.tar.gz: a970a4b45d2420421612dce9ee84365641fafe3e26d2a8d68b375951e66d3d80
3
+ metadata.gz: 95d511941ea8db3bca78600df275809ee6276432de45d98213822730652506e6
4
+ data.tar.gz: 58a14bff0f5a01aac84e5e310f4df46292a897dd296d1456f67ff4595cbf847f
5
5
  SHA512:
6
- metadata.gz: d1d8cb1535e9ccf9cc1976d48bf443d2f7aff825c845e29dc798f11658c7c5f48bc3cfdb809cee8b4a56224001c29cd2b673662a783268bf0aaf350992f92d67
7
- data.tar.gz: c68c396163452c2382190b495b1e67df7a80aeb472f3ebfd3ea19a7c516930175f15f0b06d0226539a4865c0ede8b5b466f04a9e50a37ce9b889ed0433ac7dc0
6
+ metadata.gz: 93b02f12bdef0a377924ed3eadc026eb009053a208b58ff3aa4aba1a38764b4e8a27fbd3c0f0ded27ba366b1f809c0e7d7a46a2d0f65927ae49348dd0cd1377c
7
+ data.tar.gz: 37d50db47ddf567be0c6e67410a042b446cd449c0e92ee0041450fd66c0791ffebfa534094c106b92e4f88d711cf4dd30be4b78203445bea17a4ed12ccfbde21
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -525,7 +525,7 @@ To test, run:
525
525
 
526
526
  [source,bash]
527
527
  ----
528
- bundle exec rake
528
+ bin/rake
529
529
  ----
530
530
 
531
531
  == link:https://www.alchemists.io/policies/license[License]
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.1.0"
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.1"
31
+ spec.add_dependency "milestoner", "~> 15.2"
31
32
  spec.add_dependency "refinements", "~> 10.0"
32
- spec.add_dependency "rubysmith", "~> 4.2"
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
@@ -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
@@ -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 client: CLIENT, **dependencies
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.1.0
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-01 00:00:00.000000000 Z
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.1'
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.1'
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.2'
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.2'
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.1
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