gemsmith 19.0.0 → 19.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -2
- data/gemsmith.gemspec +3 -3
- data/lib/gemsmith/builders/git/commit.rb +2 -4
- data/lib/gemsmith/configuration/loader.rb +11 -29
- data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +3 -0
- data.tar.gz.sig +0 -0
- metadata +6 -7
- metadata.gz.sig +0 -0
- data/lib/gemsmith/configuration/enhancers/template_root.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b004535de235f70328a5c2066cb67c63c6d54140e8acdea5d7d84bd87b8b9c3
|
4
|
+
data.tar.gz: a970a4b45d2420421612dce9ee84365641fafe3e26d2a8d68b375951e66d3d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1d8cb1535e9ccf9cc1976d48bf443d2f7aff825c845e29dc798f11658c7c5f48bc3cfdb809cee8b4a56224001c29cd2b673662a783268bf0aaf350992f92d67
|
7
|
+
data.tar.gz: c68c396163452c2382190b495b1e67df7a80aeb472f3ebfd3ea19a7c516930175f15f0b06d0226539a4865c0ede8b5b466f04a9e50a37ce9b889ed0433ac7dc0
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
���Eaŀ�#k�p�
|
2
|
+
f��w���=�
|
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.
|
5
|
+
spec.version = "19.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/gemsmith"
|
@@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency "dry-container", "~> 0.11"
|
28
28
|
spec.add_dependency "dry-monads", "~> 1.6"
|
29
29
|
spec.add_dependency "infusible", "~> 1.0"
|
30
|
-
spec.add_dependency "milestoner", "~> 15.
|
30
|
+
spec.add_dependency "milestoner", "~> 15.1"
|
31
31
|
spec.add_dependency "refinements", "~> 10.0"
|
32
|
-
spec.add_dependency "rubysmith", "~> 4.
|
32
|
+
spec.add_dependency "rubysmith", "~> 4.2"
|
33
33
|
spec.add_dependency "runcom", "~> 9.0"
|
34
34
|
spec.add_dependency "spek", "~> 1.0"
|
35
35
|
spec.add_dependency "versionaire", "~> 11.0"
|
@@ -34,10 +34,8 @@ module Gemsmith
|
|
34
34
|
attr_reader :configuration, :builder
|
35
35
|
|
36
36
|
def body
|
37
|
-
|
38
|
-
|
39
|
-
#{specification.version}.
|
40
|
-
CONTENT
|
37
|
+
"Generated with [#{specification.label}](#{specification.homepage_url}) " \
|
38
|
+
"#{specification.version}."
|
41
39
|
end
|
42
40
|
|
43
41
|
def project_name = configuration.project_name
|
@@ -1,50 +1,32 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "pathname"
|
4
|
-
require "refinements/arrays"
|
5
|
-
require "refinements/hashes"
|
6
3
|
require "refinements/structs"
|
7
4
|
require "runcom"
|
8
|
-
require "yaml"
|
9
5
|
|
10
6
|
module Gemsmith
|
11
7
|
module Configuration
|
12
8
|
# Represents the fully assembled Command Line Interface (CLI) configuration.
|
13
|
-
class Loader
|
14
|
-
using Refinements::Arrays
|
15
|
-
using Refinements::Hashes
|
9
|
+
class Loader < Rubysmith::Configuration::Loader
|
16
10
|
using Refinements::Structs
|
17
11
|
|
18
12
|
DEFAULTS = Rubysmith::Configuration::Loader::DEFAULTS
|
19
13
|
CLIENT = Runcom::Config.new "gemsmith/configuration.yml", defaults: DEFAULTS
|
20
14
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
def self.call(...) = new(...).call
|
25
|
-
|
26
|
-
def self.with_defaults = new(client: DEFAULTS, enhancers: [])
|
27
|
-
|
28
|
-
def self.with_overrides = new(client: DEFAULTS, enhancers: [Enhancers::TemplateRoot.new])
|
29
|
-
|
30
|
-
def initialize content: Rubysmith::Configuration::Content.new,
|
31
|
-
client: CLIENT,
|
32
|
-
enhancers: ENHANCERS
|
33
|
-
@content = content
|
34
|
-
@client = client
|
35
|
-
@enhancers = enhancers
|
15
|
+
def self.with_overrides
|
16
|
+
new client: DEFAULTS,
|
17
|
+
enhancers: {template_root: Rubysmith::Configuration::Enhancers::TemplateRoot}
|
36
18
|
end
|
37
19
|
|
38
|
-
def
|
39
|
-
|
40
|
-
.freeze
|
20
|
+
def initialize client: CLIENT, **dependencies
|
21
|
+
super
|
41
22
|
end
|
42
23
|
|
43
|
-
|
44
|
-
|
45
|
-
attr_reader :content, :client, :enhancers
|
24
|
+
def call
|
25
|
+
return super unless enhancers.key? :template_root
|
46
26
|
|
47
|
-
|
27
|
+
enhancers[:template_root].call(super, overrides: Pathname(__dir__).join("../templates"))
|
28
|
+
.freeze
|
29
|
+
end
|
48
30
|
end
|
49
31
|
end
|
50
32
|
end
|
@@ -35,6 +35,9 @@ Gem::Specification.new do |spec|
|
|
35
35
|
<% end %>
|
36
36
|
|
37
37
|
spec.required_ruby_version = "~> <%= RUBY_VERSION[/\d+\.\d+/] %>"
|
38
|
+
<% if configuration.build_cli %>
|
39
|
+
spec.add_dependency "cogger", "~> 0.5"
|
40
|
+
<% end %>
|
38
41
|
<% if configuration.build_cli %>
|
39
42
|
spec.add_dependency "dry-container", "~> 0.11"
|
40
43
|
<% 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: 19.
|
4
|
+
version: 19.1.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:
|
31
|
+
date: 2023-01-01 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '15.
|
95
|
+
version: '15.1'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '15.
|
102
|
+
version: '15.1'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: refinements
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '4.
|
123
|
+
version: '4.2'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '4.
|
130
|
+
version: '4.2'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: runcom
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,7 +219,6 @@ files:
|
|
219
219
|
- lib/gemsmith/cli/parsers/build.rb
|
220
220
|
- lib/gemsmith/cli/parsers/core.rb
|
221
221
|
- lib/gemsmith/cli/shell.rb
|
222
|
-
- lib/gemsmith/configuration/enhancers/template_root.rb
|
223
222
|
- lib/gemsmith/configuration/loader.rb
|
224
223
|
- lib/gemsmith/container.rb
|
225
224
|
- lib/gemsmith/import.rb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Gemsmith
|
4
|
-
module Configuration
|
5
|
-
module Enhancers
|
6
|
-
# Adds gem specific roots to existing content.
|
7
|
-
class TemplateRoot
|
8
|
-
def initialize overrides = Pathname(__dir__).join("../../templates")
|
9
|
-
@overrides = Array overrides
|
10
|
-
end
|
11
|
-
|
12
|
-
def call(content) = content.add_template_roots(overrides)
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
attr_reader :overrides
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|