gemsmith 20.3.0 → 20.4.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: 8869cf7c922df0fad49e6439159c059dad5d0a2e14e9fef55153cc95f3c155f5
4
- data.tar.gz: 55fdbffe5e0f6eb70eb3c03bdbb7fa35a30abfd7517f7d5c14f55d0c4e322505
3
+ metadata.gz: f624aae829daa2768b30f6539c2482f53677d2ea1f03ef878d45a114363108b6
4
+ data.tar.gz: cf95d4706fcef72a6a36a00e9f6ac4b658d8e4c5682fd167017755173814f7e6
5
5
  SHA512:
6
- metadata.gz: b0ddd3476054d375abdb1b373ebbdf4cfa384b0897fb31b9fb0afd9688bee5a887d7ed90dcf5318fcfceb73cec6877ebd224014baa0527620489dd936edb329e
7
- data.tar.gz: 06cb42377fc3ff92cc6d685351e994492c3c877f13cdd72cd14003292199a08525441a26f45d4f354f43576c5041af09ea42fa10023e2247cf17a87c5021f37f
6
+ metadata.gz: cea5ed3beb891f599d32c707d68f5d574ab1332d7af0b3df618a7f5afb43f74cc2b30ce3d238db192c5d3d853a87ff5f383c4aa164d166bdf3dc3a3bf7bebd5b
7
+ data.tar.gz: 01c5b1d6a16c479a1afa55a228f8d6faf6aec2356906ac71534381f40038f04d6780f2b61f1498031a2b7479850dd9af210fbd73a7e25da994b0be89e84d218d
checksums.yaml.gz.sig CHANGED
Binary file
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 = "20.3.0"
5
+ spec.version = "20.4.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/gemsmith"
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency "infusible", "~> 2.0"
33
33
  spec.add_dependency "milestoner", "~> 16.0"
34
34
  spec.add_dependency "refinements", "~> 11.0"
35
- spec.add_dependency "rubysmith", "~> 5.5"
35
+ spec.add_dependency "rubysmith", "~> 5.6"
36
36
  spec.add_dependency "runcom", "~> 10.0"
37
37
  spec.add_dependency "sod", "~> 0.0"
38
38
  spec.add_dependency "spek", "~> 2.0"
@@ -38,13 +38,7 @@ module Gemsmith
38
38
  content = configuration.merge template_path: "%project_name%/lib/%project_path%.rb.erb"
39
39
 
40
40
  builder.call(content)
41
- .insert_after(/push_dir/, %( loader.inflector.inflect "cli" => "CLI"\n))
42
- .replace("Zeitwerk::Loader.for_gem.setup", <<~CONTENT.strip)
43
- Zeitwerk::Loader.for_gem.then do |loader|
44
- loader.inflector.inflect "cli" => "CLI"
45
- loader.setup
46
- end
47
- CONTENT
41
+ .insert_before(/tag/, %( loader.inflector.inflect "cli" => "CLI"\n))
48
42
  end
49
43
 
50
44
  def render_configuration
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/structs"
4
+
5
+ module Gemsmith
6
+ module Builders
7
+ # Builds project skeleton console for object inspection and exploration.
8
+ class Console < Rubysmith::Builders::Console
9
+ using Refinements::Structs
10
+
11
+ def call
12
+ return configuration unless configuration.build_console
13
+
14
+ super
15
+ builder.call(configuration.merge(template_path: "%project_name%/bin/console.erb"))
16
+ .replace(/require Bundler.root.+/, %(require "#{configuration.project_path}"))
17
+
18
+ configuration
19
+ end
20
+ end
21
+ end
22
+ end
@@ -28,7 +28,7 @@ module Gemsmith
28
28
  Builders::Bundler,
29
29
  Builders::CLI,
30
30
  Rubysmith::Builders::Rake,
31
- Rubysmith::Builders::Console,
31
+ Builders::Console,
32
32
  Rubysmith::Builders::CircleCI,
33
33
  Builders::CircleCI,
34
34
  Rubysmith::Builders::Setup,
@@ -1,5 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- require "<%= configuration.project_name %>"
3
+ require "<%= configuration.project_path %>"
4
4
 
5
5
  <%= configuration.project_namespaced_class %>::CLI::Shell.new.call
data/lib/gemsmith.rb CHANGED
@@ -3,11 +3,14 @@
3
3
  require "rubysmith"
4
4
  require "zeitwerk"
5
5
 
6
- Zeitwerk::Loader.for_gem.then do |loader|
6
+ Zeitwerk::Loader.new.then do |loader|
7
7
  loader.inflector.inflect "cli" => "CLI", "circle_ci" => "CircleCI", "rspec" => "RSpec"
8
+ loader.tag = File.basename __FILE__, ".rb"
9
+ loader.push_dir __dir__
8
10
  loader.setup
9
11
  end
10
12
 
11
13
  # Main namespace.
12
14
  module Gemsmith
15
+ def self.loader(registry = Zeitwerk::Registry) = registry.loader_for __FILE__
13
16
  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: 20.3.0
4
+ version: 20.4.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-07-29 00:00:00.000000000 Z
38
+ date: 2023-10-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -169,14 +169,14 @@ dependencies:
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '5.5'
172
+ version: '5.6'
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: '5.5'
179
+ version: '5.6'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: runcom
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -265,6 +265,7 @@ files:
265
265
  - lib/gemsmith/builders/bundler.rb
266
266
  - lib/gemsmith/builders/circle_ci.rb
267
267
  - lib/gemsmith/builders/cli.rb
268
+ - lib/gemsmith/builders/console.rb
268
269
  - lib/gemsmith/builders/documentation/readme.rb
269
270
  - lib/gemsmith/builders/git/commit.rb
270
271
  - lib/gemsmith/builders/git/ignore.rb
@@ -286,7 +287,6 @@ files:
286
287
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/defaults.yml.erb
287
288
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/model.rb.erb
288
289
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
289
- - lib/gemsmith/templates/%project_name%/lib/%project_path%/identity.rb.erb
290
290
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/import.rb.erb
291
291
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/shell_spec.rb.erb
292
292
  - lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
@@ -325,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  - !ruby/object:Gem::Version
326
326
  version: '0'
327
327
  requirements: []
328
- rubygems_version: 3.4.17
328
+ rubygems_version: 3.4.20
329
329
  signing_key:
330
330
  specification_version: 4
331
331
  summary: A command line interface for smithing Ruby gems.
metadata.gz.sig CHANGED
Binary file
@@ -1,9 +0,0 @@
1
- <% render_namespace do %>
2
- # Gem identity information.
3
- module Identity
4
- NAME = "<%= config.dig(:gem, :name) %>"
5
- LABEL = "<%= config.dig(:gem, :label) %>"
6
- VERSION = "0.1.0"
7
- VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
8
- end
9
- <% end %>