gemsmith 21.4.0 → 21.5.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: 4553253b3932fc9b75ebfe4619f369438c8c51aed8c93bc0304fd9d9bda2e6dd
4
- data.tar.gz: 691cc15a20ca1f65549de86ea98f2b0147b12721083c023cd1ab45879425278f
3
+ metadata.gz: e9189942b5d0e0098e9a726fb7f8741807b5dfdb8dc82fb86ac304aef0a8ae49
4
+ data.tar.gz: a6af7b634531e15416a3591b12b79c638392ef815965bc5c2295d86f0c6a31b8
5
5
  SHA512:
6
- metadata.gz: 298ce01954ae63a9a9b77dc736fc91396c493a4628c5177d55a206981775b89bedc2610b67249f6e3997906b1f342a0e5c8195b73f3ad403da13fd5a56e90fa3
7
- data.tar.gz: 977083c5570beba14720311ec15d98bde54623d88ba7658370effc26ee00d7d23f1a4c162b3a3ae4ea56e108042402d861822f2dd34d7beb0d31f4c0d19ab3ff
6
+ metadata.gz: 71bdf808e32240848034d275921d4f889d7d31200978a85d491072f0fe94f36303508ca7ce52f2a63d321826ff927b5a15c275d943cf73efece98334b247afba
7
+ data.tar.gz: ddcafd07ea6d04cec982020005f5e03ec9032889e664a9300ecb4e93be3906958da4c4406b12541993a3f3fa981d5d67dcb8a1f42758a58d0c3878432e6ea40b
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -2,16 +2,14 @@
2
2
  :toclevels: 5
3
3
  :figure-caption!:
4
4
 
5
+ :containable_link: link:https://alchemists.io/projects/containable[Containable]
6
+ :infusible_link: link:https://alchemists.io/projects/infusible[Infusible]
5
7
  :ruby_gems_link: link:https://rubygems.org[RubyGems]
6
8
  :sod_link: link:https://alchemists.io/projects/sod[Sod]
7
9
 
8
10
  = Gemsmith
9
11
 
10
- Gemsmith is a command line interface for smithing Ruby gems. Perfect for when you need a
11
- professional and robust tool beyond link:https://bundler.io[Bundler]'s basic gem skeletons. While
12
- Bundler is great for creating your first gem, you'll quickly outgrow Bundler when creating and
13
- maintaining multiple gems. This is where Gemsmith can increase your productivity by providing much
14
- of the tooling you need from the start with the ability to customize as desired.
12
+ Gemsmith is a command line interface for smithing Ruby gems. Perfect for when you need a professional and robust tool beyond link:https://bundler.io[Bundler]'s basic gem skeletons. While Bundler is great for creating your first gem, you'll quickly outgrow Bundler when creating and maintaining multiple gems. This is where Gemsmith can increase your productivity by providing much of the tooling you need from the start with the ability to customize as desired.
15
13
 
16
14
  toc::[]
17
15
 
@@ -56,27 +54,17 @@ image:https://alchemists.io/images/projects/gemsmith/screenshots/usage.png[Usage
56
54
 
57
55
  ==== Build
58
56
 
59
- The core functionality of this gem centers around the `build` command and associated flags. The
60
- build options allow you to further customize the kind of gem you want to build. Most build options
61
- are enabled by default. For detailed documentation on all supported flags, see the
62
- link:https://alchemists.io/projects/rubysmith/#_build[Rubysmith] documentation.
57
+ The core functionality of this gem centers around the `build` command and associated flags. The build options allow you to further customize the kind of gem you want to build. Most build options
58
+ are enabled by default. For detailed documentation on all supported flags, see the link:https://alchemists.io/projects/rubysmith/#_build[Rubysmith] documentation.
63
59
 
64
- The build option which is unique to Gemsmith is the `--cli` option. This allows you to build a gem
65
- which has a Command Line Interface (CLI). There are multiple ways a CLI can be built in Ruby but
66
- Gemsmith takes an approach which builds upon Ruby's native `OptionParser` with help from
67
- link:https://dry-rb.org/gems/dry-container[Dry Container]. All of this culminates in a design that
68
- is mix of Objected Oriented + Functional Programming design. Building a gem with CLI support is a
69
- simple as running:
60
+ The build option which is unique to Gemsmith is the `--cli` option. This allows you to build a gem which has a Command Line Interface (CLI). There are multiple ways a CLI can be built in Ruby but Gemsmith takes an approach which builds upon Ruby's native `OptionParser` with help from the {containable_link} and {infusible_link} gems. All of this culminates in a design that is mix of Objected Oriented + Functional Programming design. Building a gem with CLI support is a simple as running:
70
61
 
71
62
  [source,bash]
72
63
  ----
73
64
  gemsmith build --name demo --cli
74
65
  ----
75
66
 
76
- The above will give you a new gem with CLI support which includes working specs. It's the same
77
- design used to build this Gemsmith gem. You'll have both a `configuration` and `CLI` namespace for
78
- configuring your gem and adding additional CLI support. Out of the box, the CLI gem generated for
79
- you supports the following options:
67
+ The above will give you a new gem with CLI support which includes working specs. It's the same design used to build this Gemsmith gem. You'll have both a `configuration` and `CLI` namespace for configuring your gem and adding additional CLI support. Out of the box, the CLI gem generated for you supports the following options:
80
68
 
81
69
  ....
82
70
  -v, --version Show version.
@@ -449,7 +437,7 @@ jobs:
449
437
 
450
438
  steps:
451
439
  - name: Checkout
452
- uses: actions/checkout@v3
440
+ uses: actions/checkout@v4
453
441
  with:
454
442
  fetch-depth: '0'
455
443
  ref: ${{github.head_ref}}
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 = "21.4.0"
5
+ spec.version = "21.5.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/gemsmith"
@@ -24,17 +24,17 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = "~> 3.3"
26
26
  spec.add_dependency "cogger", "~> 0.15"
27
+ spec.add_dependency "containable", "~> 0.0"
27
28
  spec.add_dependency "core", "~> 1.0"
28
- spec.add_dependency "dry-container", "~> 0.11"
29
29
  spec.add_dependency "dry-monads", "~> 1.6"
30
30
  spec.add_dependency "dry-schema", "~> 1.13"
31
- spec.add_dependency "etcher", "~> 1.0"
32
- spec.add_dependency "infusible", "~> 3.4"
33
- spec.add_dependency "milestoner", "~> 17.4"
31
+ spec.add_dependency "etcher", "~> 1.3"
32
+ spec.add_dependency "infusible", "~> 3.5"
33
+ spec.add_dependency "milestoner", "~> 17.5"
34
34
  spec.add_dependency "refinements", "~> 12.1"
35
- spec.add_dependency "rubysmith", "~> 6.4"
35
+ spec.add_dependency "rubysmith", "~> 6.5"
36
36
  spec.add_dependency "runcom", "~> 11.0"
37
- spec.add_dependency "sod", "~> 0.4"
37
+ spec.add_dependency "sod", "~> 0.8"
38
38
  spec.add_dependency "spek", "~> 3.0"
39
39
  spec.add_dependency "zeitwerk", "~> 2.6"
40
40
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "cogger"
4
- require "dry-container"
4
+ require "containable"
5
5
  require "etcher"
6
6
  require "open3"
7
7
  require "runcom"
@@ -10,14 +10,14 @@ require "spek"
10
10
  module Gemsmith
11
11
  # Provides a global gem container for injection into other objects.
12
12
  module Container
13
- extend Dry::Container::Mixin
13
+ extend Containable
14
14
 
15
- register :configuration, memoize: true do
15
+ register :configuration 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, memoize: true do
20
+ register :defaults do
21
21
  registry = Etcher::Registry.new contract: Rubysmith::Configuration::Contract,
22
22
  model: Rubysmith::Configuration::Model
23
23
 
@@ -35,15 +35,12 @@ module Gemsmith
35
35
  .add_transformer(Rubysmith::Configuration::Transformers::TargetRoot)
36
36
  end
37
37
 
38
- register :specification, memoize: true do
39
- Spek::Loader.call "#{__dir__}/../../gemsmith.gemspec"
40
- end
41
-
42
- register(:input, memoize: true) { self[:configuration].dup }
38
+ register(:specification) { Spek::Loader.call "#{__dir__}/../../gemsmith.gemspec" }
39
+ register(:input) { self[:configuration].dup }
43
40
  register(:defaults_path) { Rubysmith::Container[:defaults_path] }
44
- register(:xdg_config, memoize: true) { Runcom::Config.new "gemsmith/configuration.yml" }
45
- register(:environment) { ENV }
46
- register(:logger, memoize: true) { Cogger.new id: :gemsmith }
41
+ register(:xdg_config) { Runcom::Config.new "gemsmith/configuration.yml" }
42
+ register :environment, ENV
43
+ register(:logger) { Cogger.new id: :gemsmith }
47
44
  register :executor, Open3
48
45
  register :kernel, Kernel
49
46
  end
@@ -3,5 +3,5 @@
3
3
  require "infusible"
4
4
 
5
5
  module Gemsmith
6
- Import = Infusible.with Container
6
+ Import = Infusible[Container]
7
7
  end
@@ -39,16 +39,16 @@ Gem::Specification.new do |spec|
39
39
  spec.add_dependency "cogger", "~> 0.15"
40
40
  <% end %>
41
41
  <% if configuration.build_cli %>
42
- spec.add_dependency "dry-container", "~> 0.11"
42
+ spec.add_dependency "containable", "~> 0.0"
43
43
  <% end %>
44
44
  <% if configuration.build_cli %>
45
45
  spec.add_dependency "dry-monads", "~> 1.6"
46
46
  <% end %>
47
47
  <% if configuration.build_cli %>
48
- spec.add_dependency "etcher", "~> 1.0"
48
+ spec.add_dependency "etcher", "~> 1.3"
49
49
  <% end %>
50
50
  <% if configuration.build_cli %>
51
- spec.add_dependency "infusible", "~> 3.4"
51
+ spec.add_dependency "infusible", "~> 3.5"
52
52
  <% end %>
53
53
  <% if configuration.build_refinements %>
54
54
  spec.add_dependency "refinements", "~> 12.1"
@@ -57,7 +57,7 @@ Gem::Specification.new do |spec|
57
57
  spec.add_dependency "runcom", "~> 11.0"
58
58
  <% end %>
59
59
  <% if configuration.build_cli %>
60
- spec.add_dependency "sod", "~> 0.4"
60
+ spec.add_dependency "sod", "~> 0.8"
61
61
  <% end %>
62
62
  <% if configuration.build_cli %>
63
63
  spec.add_dependency "spek", "~> 3.0"
@@ -1,5 +1,5 @@
1
1
  require "cogger"
2
- require "dry/container"
2
+ require "containable"
3
3
  require "etcher"
4
4
  require "runcom"
5
5
  require "spek"
@@ -7,25 +7,22 @@ require "spek"
7
7
  <% namespace do %>
8
8
  # Provides a global gem container for injection into other objects.
9
9
  module Container
10
- extend Dry::Container::Mixin
10
+ extend Containable
11
11
 
12
- register :configuration, memoize: true do
12
+ register :configuration do
13
13
  self[:defaults].add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
14
14
  .then { |registry| Etcher.call registry }
15
15
  end
16
16
 
17
- register :defaults, memoize: true do
17
+ register :defaults do
18
18
  Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
19
19
  .add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
20
20
  end
21
21
 
22
- register :specification, memoize: true do
23
- Spek::Loader.call "#{__dir__}/<%= Array.new(2 + configuration.project_levels, "../").join %><%= configuration.project_name %>.gemspec"
24
- end
25
-
26
- register(:defaults_path, memoize: true) { Pathname(__dir__).join("configuration/defaults.yml") }
27
- register(:xdg_config, memoize: true) { Runcom::Config.new "<%= configuration.project_path %>/configuration.yml" }
28
- register(:logger, memoize: true) { Cogger.new id: "<%= configuration.project_name %>" }
22
+ register(:specification) { Spek::Loader.call "#{__dir__}/<%= Array.new(2 + configuration.project_levels, "../").join %><%= configuration.project_name %>.gemspec" }
23
+ register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
24
+ register(:xdg_config) { Runcom::Config.new "<%= configuration.project_path %>/configuration.yml" }
25
+ register(:logger) { Cogger.new id: "<%= configuration.project_name %>" }
29
26
  register :kernel, Kernel
30
27
  end
31
28
  <% end %>
@@ -1,5 +1,5 @@
1
1
  require "infusible"
2
2
 
3
3
  <% namespace do %>
4
- Import = Infusible.with Container
4
+ Import = Infusible[Container]
5
5
  <% end %>
@@ -1,15 +1,9 @@
1
- require "dry/container/stub"
2
- require "infusible/stub"
3
-
4
1
  RSpec.shared_context "with application dependencies" do
5
- using Infusible::Stub
6
-
7
2
  let(:configuration) { Etcher.new(<%= configuration.project_namespaced_class %>::Container[:defaults]).call.bind(&:dup) }
8
3
  let(:xdg_config) { Runcom::Config.new <%= configuration.project_namespaced_class %>::Container[:defaults_path] }
9
4
  let(:kernel) { class_spy Kernel }
10
5
  let(:logger) { Cogger.new id: "<%= configuration.project_name %>", io: StringIO.new, level: :debug }
11
6
 
12
- before { <%= configuration.project_namespaced_class %>::Import.stub configuration:, xdg_config:, kernel:, logger: }
13
-
14
- after { <%= configuration.project_namespaced_class %>::Import.unstub :configuration, :xdg_config, :kernel, :logger }
7
+ before { <%= configuration.project_namespaced_class %>::Container.stub! configuration:, xdg_config:, kernel:, logger: }
8
+ after { <%= configuration.project_namespaced_class %>::Container.restore }
15
9
  end
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: 21.4.0
4
+ version: 21.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: 2024-03-09 00:00:00.000000000 Z
38
+ date: 2024-04-04 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -52,33 +52,33 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0.15'
54
54
  - !ruby/object:Gem::Dependency
55
- name: core
55
+ name: containable
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.0'
60
+ version: '0.0'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.0'
67
+ version: '0.0'
68
68
  - !ruby/object:Gem::Dependency
69
- name: dry-container
69
+ name: core
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.11'
74
+ version: '1.0'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.11'
81
+ version: '1.0'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: dry-monads
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -113,42 +113,42 @@ dependencies:
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.0'
116
+ version: '1.3'
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '1.0'
123
+ version: '1.3'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: infusible
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3.4'
130
+ version: '3.5'
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '3.4'
137
+ version: '3.5'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: milestoner
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '17.4'
144
+ version: '17.5'
145
145
  type: :runtime
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '17.4'
151
+ version: '17.5'
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: refinements
154
154
  requirement: !ruby/object:Gem::Requirement
@@ -169,14 +169,14 @@ dependencies:
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '6.4'
172
+ version: '6.5'
173
173
  type: :runtime
174
174
  prerelease: false
175
175
  version_requirements: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '6.4'
179
+ version: '6.5'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: runcom
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -197,14 +197,14 @@ dependencies:
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: '0.4'
200
+ version: '0.8'
201
201
  type: :runtime
202
202
  prerelease: false
203
203
  version_requirements: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: '0.4'
207
+ version: '0.8'
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: spek
210
210
  requirement: !ruby/object:Gem::Requirement
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  - !ruby/object:Gem::Version
312
312
  version: '0'
313
313
  requirements: []
314
- rubygems_version: 3.5.6
314
+ rubygems_version: 3.5.7
315
315
  signing_key:
316
316
  specification_version: 4
317
317
  summary: A command line interface for smithing Ruby gems.
metadata.gz.sig CHANGED
Binary file