gemsmith 17.0.0 → 18.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +3 -2
  3. data/LICENSE.adoc +134 -214
  4. data/README.adoc +71 -30
  5. data/gemsmith.gemspec +7 -6
  6. data/lib/gemsmith/builders/circle_ci.rb +4 -1
  7. data/lib/gemsmith/builders/cli.rb +15 -7
  8. data/lib/gemsmith/builders/git/commit.rb +6 -5
  9. data/lib/gemsmith/cli/actions/config.rb +6 -7
  10. data/lib/gemsmith/cli/actions/container.rb +25 -0
  11. data/lib/gemsmith/cli/actions/edit.rb +5 -7
  12. data/lib/gemsmith/cli/actions/import.rb +11 -0
  13. data/lib/gemsmith/cli/actions/install.rb +5 -5
  14. data/lib/gemsmith/cli/actions/publish.rb +5 -5
  15. data/lib/gemsmith/cli/actions/view.rb +5 -7
  16. data/lib/gemsmith/cli/parser.rb +9 -5
  17. data/lib/gemsmith/cli/parsers/build.rb +7 -5
  18. data/lib/gemsmith/cli/parsers/core.rb +6 -5
  19. data/lib/gemsmith/cli/shell.rb +21 -40
  20. data/lib/gemsmith/container.rb +1 -1
  21. data/lib/gemsmith/import.rb +7 -0
  22. data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +3 -3
  23. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb +6 -9
  24. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb +18 -0
  25. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/import.rb.erb +9 -0
  26. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parser.rb.erb +9 -5
  27. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parsers/core.rb.erb +6 -5
  28. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb +6 -15
  29. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb +3 -25
  30. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/import.rb.erb +5 -0
  31. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/actions/config_spec.rb.erb +3 -3
  32. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parser_spec.rb.erb +1 -1
  33. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parsers/core_spec.rb.erb +1 -1
  34. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/shell_spec.rb.erb +16 -13
  35. data/lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb +21 -0
  36. data/lib/gemsmith/tools/editor.rb +2 -9
  37. data/lib/gemsmith/tools/installer.rb +5 -5
  38. data/lib/gemsmith/tools/pusher.rb +23 -5
  39. data/lib/gemsmith/tools/validator.rb +1 -10
  40. data/lib/gemsmith/tools/versioner.rb +6 -6
  41. data/lib/gemsmith/tools/viewer.rb +1 -10
  42. data.tar.gz.sig +0 -0
  43. metadata +51 -31
  44. metadata.gz.sig +3 -1
  45. data/lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_container.rb.erb +0 -22
@@ -2,12 +2,11 @@
2
2
  module CLI
3
3
  # The main Command Line Interface (CLI) object.
4
4
  class Shell
5
- ACTIONS = {config: Actions::Config.new}.freeze
5
+ include Actions::Import[:config, :specification, :logger]
6
6
 
7
- def initialize parser: Parser.new, actions: ACTIONS, container: Container
7
+ def initialize parser: Parser.new, **dependencies
8
+ super(**dependencies)
8
9
  @parser = parser
9
- @actions = actions
10
- @container = container
11
10
  end
12
11
 
13
12
  def call arguments = []
@@ -18,23 +17,15 @@
18
17
 
19
18
  private
20
19
 
21
- attr_reader :parser, :actions, :container
20
+ attr_reader :parser
22
21
 
23
22
  def perform configuration
24
23
  case configuration
25
- in action_config: Symbol => action then config action
24
+ in action_config: Symbol => action then config.call action
26
25
  in action_version: true then logger.info { specification.labeled_version }
27
- else usage
26
+ else logger.any { parser.to_s }
28
27
  end
29
28
  end
30
-
31
- def config(action) = actions.fetch(__method__).call(action)
32
-
33
- def usage = logger.unknown { parser.to_s }
34
-
35
- def specification = container[__method__]
36
-
37
- def logger = container[__method__]
38
29
  end
39
30
  end
40
31
  <% end %>
@@ -1,6 +1,5 @@
1
- require "dry-container"
2
- require "logger"
3
- require "pastel"
1
+ require "cogger"
2
+ require "dry/container"
4
3
  require "spek"
5
4
 
6
5
  <% namespace do %>
@@ -10,28 +9,7 @@ require "spek"
10
9
 
11
10
  register(:configuration) { Configuration::Loader.call }
12
11
  register(:specification) { Spek::Loader.call "#{__dir__}/<%= Array.new(2 + configuration.project_levels, "../").join %><%= configuration.project_name %>.gemspec" }
13
- register(:colorizer) { Pastel.new enabled: $stdout.tty? }
14
12
  register(:kernel) { Kernel }
15
-
16
- register :log_colors do
17
- {
18
- "DEBUG" => self[:colorizer].white.detach,
19
- "INFO" => self[:colorizer].green.detach,
20
- "WARN" => self[:colorizer].yellow.detach,
21
- "ERROR" => self[:colorizer].red.detach,
22
- "FATAL" => self[:colorizer].white.bold.on_red.detach,
23
- "ANY" => self[:colorizer].white.bold.detach
24
- }
25
- end
26
-
27
- register :logger do
28
- Logger.new $stdout,
29
- level: Logger.const_get(ENV.fetch("LOG_LEVEL", "INFO")),
30
- formatter: (
31
- lambda do |severity, _at, _name, message|
32
- self[:log_colors][severity].call "#{message}\n"
33
- end
34
- )
35
- end
13
+ register(:logger) { Cogger::Client.new }
36
14
  end
37
15
  <% end %>
@@ -0,0 +1,5 @@
1
+ require "auto_injector"
2
+
3
+ <% namespace do %>
4
+ Import = AutoInjector[Container]
5
+ <% end %>
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Actions::Config do
4
4
  subject(:action) { described_class.new }
5
5
 
6
- include_context "with application container"
6
+ include_context "with application dependencies"
7
7
 
8
8
  describe "#call" do
9
9
  it "edits configuration" do
@@ -17,8 +17,8 @@ RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Actions::Conf
17
17
  end
18
18
 
19
19
  it "logs invalid configuration" do
20
- expectation = proc { action.call :bogus }
21
- expect(&expectation).to output(/Invalid configuration selection: bogus./).to_stdout
20
+ action.call :bogus
21
+ expect(logger.reread).to match(/Invalid configuration selection: bogus./)
22
22
  end
23
23
  end
24
24
  end
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Parser do
4
4
  subject(:parser) { described_class.new }
5
5
 
6
- include_context "with application container"
6
+ include_context "with application dependencies"
7
7
 
8
8
  describe "#call" do
9
9
  it "answers hash with valid option" do
@@ -3,7 +3,7 @@ require "spec_helper"
3
3
  RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Parsers::Core do
4
4
  subject(:parser) { described_class.new configuration.dup }
5
5
 
6
- include_context "with application container"
6
+ include_context "with application dependencies"
7
7
 
8
8
  it_behaves_like "a parser"
9
9
 
@@ -2,42 +2,45 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Shell do
4
4
  using Refinements::Pathnames
5
+ using AutoInjector::Stub
5
6
 
6
- subject(:shell) { described_class.new actions: described_class::ACTIONS.merge(config:) }
7
+ subject(:shell) { described_class.new }
7
8
 
8
- include_context "with temporary directory"
9
+ include_context "with application dependencies"
9
10
 
10
- let(:config) { instance_spy <%= configuration.project_namespaced_class %>::CLI::Actions::Config }
11
+ before { <%= configuration.project_namespaced_class %>::CLI::Actions::Import.stub configuration:, kernel:, logger: }
12
+
13
+ after { <%= configuration.project_namespaced_class %>::CLI::Actions::Import.unstub :configuration, :kernel, :logger }
11
14
 
12
15
  describe "#call" do
13
16
  it "edits configuration" do
14
17
  shell.call %w[--config edit]
15
- expect(config).to have_received(:call).with(:edit)
18
+ expect(kernel).to have_received(:system).with("$EDITOR ")
16
19
  end
17
20
 
18
21
  it "views configuration" do
19
22
  shell.call %w[--config view]
20
- expect(config).to have_received(:call).with(:view)
23
+ expect(kernel).to have_received(:system).with("cat ")
21
24
  end
22
25
 
23
26
  it "prints version" do
24
- expectation = proc { shell.call %w[--version] }
25
- expect(&expectation).to output(/<%= configuration.project_label %>\s\d+\.\d+\.\d+/).to_stdout
27
+ shell.call %w[--version]
28
+ expect(logger.reread).to match(/<%= configuration.project_label %>\s\d+\.\d+\.\d+/)
26
29
  end
27
30
 
28
31
  it "prints help (usage)" do
29
- expectation = proc { shell.call %w[--help] }
30
- expect(&expectation).to output(/<%= configuration.project_label %>.+USAGE.+/m).to_stdout
32
+ shell.call %w[--help]
33
+ expect(logger.reread).to match(/<%= configuration.project_label %>.+USAGE.+/m)
31
34
  end
32
35
 
33
36
  it "prints usage when no options are given" do
34
- expectation = proc { shell.call }
35
- expect(&expectation).to output(/<%= configuration.project_label %>.+USAGE.+/m).to_stdout
37
+ shell.call
38
+ expect(logger.reread).to match(/<%= configuration.project_label %>.+USAGE.+/m)
36
39
  end
37
40
 
38
41
  it "prints error with invalid option" do
39
- expectation = proc { shell.call %w[--bogus] }
40
- expect(&expectation).to output(/invalid option.+bogus/).to_stdout
42
+ shell.call %w[--bogus]
43
+ expect(logger.reread).to match(/invalid option.+bogus/)
41
44
  end
42
45
  end
43
46
  end
@@ -0,0 +1,21 @@
1
+ require "dry/container/stub"
2
+ require "auto_injector/stub"
3
+
4
+ RSpec.shared_context "with application dependencies" do
5
+ using Refinements::Structs
6
+ using AutoInjector::Stub
7
+
8
+ include_context "with temporary directory"
9
+
10
+ let(:configuration) { <%= configuration.project_namespaced_class %>::Configuration::Loader.with_defaults.call }
11
+ let(:kernel) { class_spy Kernel }
12
+
13
+ let :logger do
14
+ Cogger::Client.new Logger.new(StringIO.new),
15
+ formatter: ->(_severity, _name, _at, message) { "#{message}\n" }
16
+ end
17
+
18
+ before { <%= configuration.project_namespaced_class %>::Import.stub configuration:, kernel:, logger: }
19
+
20
+ after { <%= configuration.project_namespaced_class %>::Import.unstub :configuration, :kernel, :logger }
21
+ end
@@ -6,12 +6,9 @@ module Gemsmith
6
6
  module Tools
7
7
  # Edits a gem within default editor.
8
8
  class Editor
9
+ include Import[:executor, :environment]
9
10
  include Dry::Monads[:result]
10
11
 
11
- def initialize container: Container
12
- @container = container
13
- end
14
-
15
12
  def call specification
16
13
  executor.capture3(client, specification.source_path.to_s).then do |_stdout, stderr, status|
17
14
  status.success? ? Success(specification) : Failure(stderr)
@@ -20,11 +17,7 @@ module Gemsmith
20
17
 
21
18
  private
22
19
 
23
- attr_reader :container
24
-
25
- def executor = container[__method__]
26
-
27
- def client = container[:environment].fetch("EDITOR")
20
+ def client = environment.fetch("EDITOR")
28
21
  end
29
22
  end
30
23
  end
@@ -6,14 +6,16 @@ module Gemsmith
6
6
  module Tools
7
7
  # Installs a locally built gem.
8
8
  class Installer
9
+ include Import[:executor]
9
10
  include Dry::Monads[:result, :do]
10
11
 
11
12
  # Order matters.
12
13
  STEPS = [Tools::Cleaner.new, Tools::Packager.new].freeze
13
14
 
14
- def initialize steps: STEPS, container: Container
15
+ def initialize steps: STEPS, **dependencies
16
+ super(**dependencies)
17
+
15
18
  @steps = steps
16
- @container = container
17
19
  end
18
20
 
19
21
  def call specification
@@ -23,7 +25,7 @@ module Gemsmith
23
25
 
24
26
  private
25
27
 
26
- attr_reader :steps, :container
28
+ attr_reader :steps
27
29
 
28
30
  def run specification
29
31
  path = specification.package_path
@@ -32,8 +34,6 @@ module Gemsmith
32
34
  status.success? ? Success(specification) : Failure("Unable to install: #{path}.")
33
35
  end
34
36
  end
35
-
36
- def executor = container[__method__]
37
37
  end
38
38
  end
39
39
  end
@@ -7,11 +7,13 @@ module Gemsmith
7
7
  module Tools
8
8
  # Pushes a gem package to remote gem server.
9
9
  class Pusher
10
+ include Import[:executor, :logger]
10
11
  include Dry::Monads[:result]
11
12
 
12
- def initialize command: Gem::CommandManager.new, container: Container
13
+ def initialize command: Gem::CommandManager.new, **dependencies
14
+ super(**dependencies)
15
+
13
16
  @command = command
14
- @container = container
15
17
  end
16
18
 
17
19
  def call specification
@@ -23,14 +25,30 @@ module Gemsmith
23
25
 
24
26
  private
25
27
 
26
- attr_reader :command, :container
28
+ attr_reader :command
27
29
 
30
+ # :reek:TooManyStatements
28
31
  def one_time_password
29
- executor.capture3("ykman", "oath", "accounts", "code", "--single", "RubyGems")
32
+ return [] if check_yubikey.failure?
33
+
34
+ executor.capture3(check_yubikey.success, "oath", "accounts", "code", "--single", "RubyGems")
30
35
  .then { |stdout, _stderr, status| status.success? ? ["--otp", stdout.chomp] : [] }
36
+ rescue Errno::ENOENT => error
37
+ logger.debug { "Unable to obtain YubiKey One-Time Password. #{error}." }
38
+ []
31
39
  end
32
40
 
33
- def executor = container[__method__]
41
+ def check_yubikey
42
+ executor.capture3("command", "-v", "ykman")
43
+ .then do |stdout, stderr, status|
44
+ if status.success?
45
+ Success stdout.chomp
46
+ else
47
+ logger.debug { "Unable to find YubiKey Manager. #{stderr}." }
48
+ Failure()
49
+ end
50
+ end
51
+ end
34
52
  end
35
53
  end
36
54
  end
@@ -6,23 +6,14 @@ module Gemsmith
6
6
  module Tools
7
7
  # Validates whether a gem can be published or not.
8
8
  class Validator
9
+ include Import[:executor]
9
10
  include Dry::Monads[:result]
10
11
 
11
- def initialize container: Container
12
- @container = container
13
- end
14
-
15
12
  def call specification
16
13
  executor.capture3("git", "status", "--porcelain").then do |_stdout, _stderr, status|
17
14
  status.success? ? Success(specification) : Failure("Project has uncommitted changes.")
18
15
  end
19
16
  end
20
-
21
- private
22
-
23
- attr_reader :container
24
-
25
- def executor = container[__method__]
26
17
  end
27
18
  end
28
19
  end
@@ -7,14 +7,17 @@ module Gemsmith
7
7
  module Tools
8
8
  # Versions (tags) current project (local and remote).
9
9
  class Versioner
10
+ include Import[:configuration]
10
11
  include Dry::Monads[:result]
11
12
 
12
13
  def initialize client: Milestoner::Tags::Publisher.new,
13
14
  content: Milestoner::Configuration::Content,
14
- container: Container
15
+ **dependencies
16
+
17
+ super(**dependencies)
18
+
15
19
  @client = client
16
20
  @content = content
17
- @container = container
18
21
  end
19
22
 
20
23
  def call specification
@@ -26,18 +29,15 @@ module Gemsmith
26
29
 
27
30
  private
28
31
 
29
- attr_reader :client, :content, :container
32
+ attr_reader :client, :content
30
33
 
31
34
  def settings specification
32
35
  content[
33
36
  documentation_format: configuration.extensions_milestoner_documentation_format,
34
37
  prefixes: configuration.extensions_milestoner_prefixes,
35
- sign: configuration.extensions_milestoner_sign,
36
38
  version: specification.version
37
39
  ]
38
40
  end
39
-
40
- def configuration = container[__method__]
41
41
  end
42
42
  end
43
43
  end
@@ -6,23 +6,14 @@ module Gemsmith
6
6
  module Tools
7
7
  # Views a gem within default browser.
8
8
  class Viewer
9
+ include Import[:executor]
9
10
  include Dry::Monads[:result]
10
11
 
11
- def initialize container: Container
12
- @container = container
13
- end
14
-
15
12
  def call specification
16
13
  executor.capture3("open", specification.homepage_url).then do |_stdout, stderr, status|
17
14
  status.success? ? Success(specification) : Failure(stderr)
18
15
  end
19
16
  end
20
-
21
- private
22
-
23
- attr_reader :container
24
-
25
- def executor = container[__method__]
26
17
  end
27
18
  end
28
19
  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: 17.0.0
4
+ version: 18.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,9 +10,9 @@ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBBDANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMTAzMTkxMjQ4MDZaFw0yMjAzMTkx
15
- MjQ4MDZaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMjAzMTkxNzI0MzJaFw0yMzAzMTkx
15
+ NzI0MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
@@ -20,72 +20,86 @@ cert_chain:
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
22
  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAEjpaOXHHp8s/7GL2qCb
24
- YAs7urOLv9VHSPfQWAwaTMVnSsIf3Sw4xzISOP/mmfEPBPXtz61K5esrE/uTFtgb
25
- FyjxQk2H0sEWgrRXGGNHBWQRhhEs7LP/TByoC15A0br++xLxRz4r7HBLGAWQQDpg
26
- 66BJ2TBVjxS6K64tKbq7+ACyrOZGgTfNHACh4M076y0x0oRf/rwBrU39/KRfuhbb
27
- cm+nNCEtO35gTmZ2bVDHLGvWazi3gJt6+huQjfXTCUUG2YYBxwhu+GPdAGQPxpf9
28
- lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
- W2A=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAJbbNyWzFjqUNVPPCUCo
24
+ IMrhDa9xf1xkORXNYYbmXgoxRy/KyNbUr+jgEEoWJAm9GXlcqxxWAUI6pK/i4/Qi
25
+ X6rPFEFmeObDOHNvuqy8Hd6AYsu+kP94U/KJhe9wnWGMmGoNKJNU3EkW3jM/osSl
26
+ +JRxiH5t4WtnDiVyoYl5nYC02rYdjJkG6VMxDymXTqn7u6HhYgZkGujq1UPar8x2
27
+ hNIWJblDKKSu7hA2d6+kUthuYo13o1sg1Da/AEDg0hoZSUvhqDEF5Hy232qb3pDt
28
+ CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
+ RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-02-12 00:00:00.000000000 Z
31
+ date: 2022-04-15 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
- name: dry-container
34
+ name: auto_injector
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.9'
39
+ version: '0.4'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.9'
46
+ version: '0.4'
47
47
  - !ruby/object:Gem::Dependency
48
- name: dry-monads
48
+ name: cogger
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.4'
53
+ version: '0.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.4'
60
+ version: '0.0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: milestoner
62
+ name: dry-container
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '13.0'
67
+ version: '0.9'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '13.0'
74
+ version: '0.9'
75
75
  - !ruby/object:Gem::Dependency
76
- name: pastel
76
+ name: dry-monads
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.8'
81
+ version: '1.4'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.8'
88
+ version: '1.4'
89
+ - !ruby/object:Gem::Dependency
90
+ name: milestoner
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '14.0'
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '14.0'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: refinements
91
105
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +120,14 @@ dependencies:
106
120
  requirements:
107
121
  - - "~>"
108
122
  - !ruby/object:Gem::Version
109
- version: '2.0'
123
+ version: '3.0'
110
124
  type: :runtime
111
125
  prerelease: false
112
126
  version_requirements: !ruby/object:Gem::Requirement
113
127
  requirements:
114
128
  - - "~>"
115
129
  - !ruby/object:Gem::Version
116
- version: '2.0'
130
+ version: '3.0'
117
131
  - !ruby/object:Gem::Dependency
118
132
  name: runcom
119
133
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +148,14 @@ dependencies:
134
148
  requirements:
135
149
  - - "~>"
136
150
  - !ruby/object:Gem::Version
137
- version: '0.0'
151
+ version: '0.2'
138
152
  type: :runtime
139
153
  prerelease: false
140
154
  version_requirements: !ruby/object:Gem::Requirement
141
155
  requirements:
142
156
  - - "~>"
143
157
  - !ruby/object:Gem::Version
144
- version: '0.0'
158
+ version: '0.2'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: versionaire
147
161
  requirement: !ruby/object:Gem::Requirement
@@ -195,7 +209,9 @@ files:
195
209
  - lib/gemsmith/builders/specification.rb
196
210
  - lib/gemsmith/cli/actions/build.rb
197
211
  - lib/gemsmith/cli/actions/config.rb
212
+ - lib/gemsmith/cli/actions/container.rb
198
213
  - lib/gemsmith/cli/actions/edit.rb
214
+ - lib/gemsmith/cli/actions/import.rb
199
215
  - lib/gemsmith/cli/actions/install.rb
200
216
  - lib/gemsmith/cli/actions/publish.rb
201
217
  - lib/gemsmith/cli/actions/view.rb
@@ -206,9 +222,12 @@ files:
206
222
  - lib/gemsmith/configuration/enhancers/template_root.rb
207
223
  - lib/gemsmith/configuration/loader.rb
208
224
  - lib/gemsmith/container.rb
225
+ - lib/gemsmith/import.rb
209
226
  - lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb
210
227
  - lib/gemsmith/templates/%project_name%/exe/%project_name%.erb
211
228
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb
229
+ - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb
230
+ - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/import.rb.erb
212
231
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parser.rb.erb
213
232
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parsers/core.rb.erb
214
233
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb
@@ -217,13 +236,14 @@ files:
217
236
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/loader.rb.erb
218
237
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb
219
238
  - lib/gemsmith/templates/%project_name%/lib/%project_path%/identity.rb.erb
239
+ - lib/gemsmith/templates/%project_name%/lib/%project_path%/import.rb.erb
220
240
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/actions/config_spec.rb.erb
221
241
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parser_spec.rb.erb
222
242
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parsers/core_spec.rb.erb
223
243
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/shell_spec.rb.erb
224
244
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/content_spec.rb.erb
225
245
  - lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/loader_spec.rb.erb
226
- - lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_container.rb.erb
246
+ - lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
227
247
  - lib/gemsmith/templates/%project_name%/spec/support/shared_examples/a_parser.rb.erb
228
248
  - lib/gemsmith/tools/cleaner.rb
229
249
  - lib/gemsmith/tools/editor.rb
@@ -236,7 +256,7 @@ files:
236
256
  - lib/gemsmith/tools/viewer.rb
237
257
  homepage: https://www.alchemists.io/projects/gemsmith
238
258
  licenses:
239
- - Hippocratic-3.0
259
+ - Hippocratic-2.1
240
260
  metadata:
241
261
  bug_tracker_uri: https://github.com/bkuhlmann/gemsmith/issues
242
262
  changelog_uri: https://www.alchemists.io/projects/gemsmith/versions
@@ -259,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
279
  - !ruby/object:Gem::Version
260
280
  version: '0'
261
281
  requirements: []
262
- rubygems_version: 3.3.7
282
+ rubygems_version: 3.3.11
263
283
  signing_key:
264
284
  specification_version: 4
265
285
  summary: A command line interface for smithing Ruby gems.
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- N�����׼���6��u</�n�Ч�#��_$��sEu��O
1
+ ��Y��?���䟸�WZ��$��^J�/�a�����0R�h��8lI��hN1$A �0��������Q~>3��3�Q�2ή�{M(6L��sH�
2
+ �F��fW�'�|����C�1^�;_�!�x��}��e�������X�B���i^�u�ޗy��m��綽7l���=�*�3����Zo�y�<�?f��}R2K���0<��Ik�v�~��|ʎ��S�`)� �2���
3
+ 3�1b�A$
@@ -1,22 +0,0 @@
1
- require "dry/container/stub"
2
-
3
- RSpec.shared_context "with application container" do
4
- using Refinements::Structs
5
-
6
- include_context "with temporary directory"
7
-
8
- let(:container) { <%= configuration.project_namespaced_class %>::Container }
9
- let(:configuration) { <%= configuration.project_namespaced_class %>::Configuration::Loader.with_defaults.call }
10
- let(:kernel) { class_spy Kernel }
11
-
12
- before do
13
- container.enable_stubs!
14
- container.stub :configuration, configuration
15
- container.stub :kernel, kernel
16
- end
17
-
18
- after do
19
- container.unstub :configuration
20
- container.unstub :kernel
21
- end
22
- end