gemsmith 17.0.0 → 18.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -2
- data/LICENSE.adoc +134 -214
- data/README.adoc +71 -30
- data/gemsmith.gemspec +7 -6
- data/lib/gemsmith/builders/circle_ci.rb +4 -1
- data/lib/gemsmith/builders/cli.rb +15 -7
- data/lib/gemsmith/builders/git/commit.rb +6 -5
- data/lib/gemsmith/cli/actions/config.rb +6 -7
- data/lib/gemsmith/cli/actions/container.rb +25 -0
- data/lib/gemsmith/cli/actions/edit.rb +5 -7
- data/lib/gemsmith/cli/actions/import.rb +11 -0
- data/lib/gemsmith/cli/actions/install.rb +5 -5
- data/lib/gemsmith/cli/actions/publish.rb +5 -5
- data/lib/gemsmith/cli/actions/view.rb +5 -7
- data/lib/gemsmith/cli/parser.rb +9 -5
- data/lib/gemsmith/cli/parsers/build.rb +7 -5
- data/lib/gemsmith/cli/parsers/core.rb +6 -5
- data/lib/gemsmith/cli/shell.rb +21 -40
- data/lib/gemsmith/container.rb +1 -1
- data/lib/gemsmith/import.rb +7 -0
- data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +3 -3
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb +6 -9
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/container.rb.erb +18 -0
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/import.rb.erb +9 -0
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parser.rb.erb +9 -5
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parsers/core.rb.erb +6 -5
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb +6 -15
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb +3 -25
- data/lib/gemsmith/templates/%project_name%/lib/%project_path%/import.rb.erb +5 -0
- data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/actions/config_spec.rb.erb +3 -3
- data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parser_spec.rb.erb +1 -1
- data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parsers/core_spec.rb.erb +1 -1
- data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/shell_spec.rb.erb +16 -13
- data/lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb +21 -0
- data/lib/gemsmith/tools/editor.rb +2 -9
- data/lib/gemsmith/tools/installer.rb +5 -5
- data/lib/gemsmith/tools/pusher.rb +23 -5
- data/lib/gemsmith/tools/validator.rb +1 -10
- data/lib/gemsmith/tools/versioner.rb +6 -6
- data/lib/gemsmith/tools/viewer.rb +1 -10
- data.tar.gz.sig +0 -0
- metadata +51 -31
- metadata.gz.sig +3 -1
- 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
|
-
|
5
|
+
include Actions::Import[:config, :specification, :logger]
|
6
6
|
|
7
|
-
def initialize parser: Parser.new,
|
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
|
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
|
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 "
|
2
|
-
require "
|
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 %>
|
data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/actions/config_spec.rb.erb
CHANGED
@@ -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
|
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
|
-
|
21
|
-
expect(
|
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
|
6
|
+
include_context "with application dependencies"
|
7
7
|
|
8
8
|
describe "#call" do
|
9
9
|
it "answers hash with valid option" do
|
data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parsers/core_spec.rb.erb
CHANGED
@@ -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
|
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
|
7
|
+
subject(:shell) { described_class.new }
|
7
8
|
|
8
|
-
include_context "with
|
9
|
+
include_context "with application dependencies"
|
9
10
|
|
10
|
-
|
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(
|
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(
|
23
|
+
expect(kernel).to have_received(:system).with("cat ")
|
21
24
|
end
|
22
25
|
|
23
26
|
it "prints version" do
|
24
|
-
|
25
|
-
expect(
|
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
|
-
|
30
|
-
expect(
|
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
|
-
|
35
|
-
expect(
|
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
|
-
|
40
|
-
expect(
|
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
|
-
|
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,
|
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
|
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,
|
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
|
28
|
+
attr_reader :command
|
27
29
|
|
30
|
+
# :reek:TooManyStatements
|
28
31
|
def one_time_password
|
29
|
-
|
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
|
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
|
-
|
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
|
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:
|
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/
|
14
|
-
|
15
|
-
|
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/
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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-
|
31
|
+
date: 2022-04-15 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
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.
|
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.
|
46
|
+
version: '0.4'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: cogger
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
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: '
|
60
|
+
version: '0.0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: dry-container
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
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: '
|
74
|
+
version: '0.9'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
76
|
+
name: dry-monads
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
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: '
|
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: '
|
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: '
|
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.
|
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.
|
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/
|
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-
|
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.
|
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
data/lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_container.rb.erb
DELETED
@@ -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
|