rubysmith 6.6.0 → 6.7.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 +0 -0
- data/lib/rubysmith/configuration/transformers/current_time.rb +5 -5
- data/lib/rubysmith/configuration/transformers/git_email.rb +4 -4
- data/lib/rubysmith/configuration/transformers/git_hub_user.rb +4 -4
- data/lib/rubysmith/configuration/transformers/git_user.rb +10 -8
- data/lib/rubysmith/configuration/transformers/target_root.rb +4 -4
- data/lib/rubysmith/configuration/transformers/template_root.rb +4 -4
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/README.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +1 -0
- data/rubysmith.gemspec +2 -2
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e66348f46dd686a44fa3113f6d7489fdbbc11fb52746953c081a9e99f77ed6ff
|
4
|
+
data.tar.gz: 91f4e06f5d2bc2171815f192ca8a4bbb88257876ebf899a94dab32c15d6faa5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d708a295eec43e4a4ea4913939a2a9d48bd9ccf1c6be70174fc1edddf2d0ff54cde76d1d45372f83684d56a7dadda85c07bc61f1ccc7bb6b776cab251b7ae11f
|
7
|
+
data.tar.gz: 76bc96b3ca0a4d996471bb1d19ea6c166ae70965549842e0a979bc6ee2ef0ed61e2597fa666120660fc438c5c1f3cfaad27722766d2e6793d17193fa2fe18044
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -4,14 +4,14 @@ require "dry/monads"
|
|
4
4
|
|
5
5
|
module Rubysmith
|
6
6
|
module Configuration
|
7
|
-
# Adds current time
|
7
|
+
# Adds current time.
|
8
8
|
module Transformers
|
9
9
|
include Dry::Monads[:result]
|
10
10
|
|
11
|
-
CurrentTime = lambda do |
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
CurrentTime = lambda do |attributes, key = :now, at: Time.now|
|
12
|
+
attributes.fetch(key) { at }
|
13
|
+
.then { |value| attributes.merge! key => value }
|
14
|
+
.then { |updated_attributes| Dry::Monads::Success updated_attributes }
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -15,16 +15,16 @@ module Rubysmith
|
|
15
15
|
super(**)
|
16
16
|
end
|
17
17
|
|
18
|
-
def call(
|
18
|
+
def call(attributes) = attributes[key] ? Success(attributes) : email_or(attributes)
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
attr_reader :key
|
23
23
|
|
24
|
-
def email_or
|
24
|
+
def email_or attributes
|
25
25
|
git.get("user.email", nil)
|
26
|
-
.fmap { |value| value ?
|
27
|
-
.or { Success
|
26
|
+
.fmap { |value| value ? attributes.merge!(key => value) : attributes }
|
27
|
+
.or { Success attributes }
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -15,16 +15,16 @@ module Rubysmith
|
|
15
15
|
super(**)
|
16
16
|
end
|
17
17
|
|
18
|
-
def call(
|
18
|
+
def call(attributes) = attributes[key] ? Success(attributes) : user_or(attributes)
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
attr_reader :key
|
23
23
|
|
24
|
-
def user_or
|
24
|
+
def user_or attributes
|
25
25
|
git.get("github.user", nil)
|
26
|
-
.fmap { |value| value ?
|
27
|
-
.or { Success
|
26
|
+
.fmap { |value| value ? attributes.merge!(key => value) : attributes }
|
27
|
+
.or { Success attributes }
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -10,22 +10,24 @@ module Rubysmith
|
|
10
10
|
include Import[:git]
|
11
11
|
include Dry::Monads[:result]
|
12
12
|
|
13
|
-
def call
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def call attributes
|
14
|
+
if attributes[:author_given_name] || attributes[:author_family_name]
|
15
|
+
Success attributes
|
16
|
+
else
|
17
|
+
name_or attributes
|
18
|
+
end
|
17
19
|
end
|
18
20
|
|
19
21
|
private
|
20
22
|
|
21
|
-
def name_or(
|
23
|
+
def name_or(attributes) = split(attributes).or { Success attributes }
|
22
24
|
|
23
|
-
def split
|
25
|
+
def split attributes
|
24
26
|
git.get("user.name", nil).fmap do |name|
|
25
|
-
next
|
27
|
+
next attributes unless name
|
26
28
|
|
27
29
|
first, last = String(name).split
|
28
|
-
|
30
|
+
attributes.merge! author_given_name: first, author_family_name: last
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
@@ -8,10 +8,10 @@ module Rubysmith
|
|
8
8
|
module Transformers
|
9
9
|
include Dry::Monads[:result]
|
10
10
|
|
11
|
-
TargetRoot = lambda do |
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
TargetRoot = lambda do |attributes, key = :target_root, path: Pathname.pwd|
|
12
|
+
attributes.fetch(:target_root) { path }
|
13
|
+
.then { |value| attributes.merge! key => value }
|
14
|
+
.then { |updated_attributes| Dry::Monads::Success updated_attributes }
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -6,7 +6,7 @@ require "refinements/array"
|
|
6
6
|
module Rubysmith
|
7
7
|
module Configuration
|
8
8
|
module Transformers
|
9
|
-
# Appends custom
|
9
|
+
# Appends custom path to default template roots.
|
10
10
|
class TemplateRoot
|
11
11
|
include Dry::Monads[:result]
|
12
12
|
|
@@ -17,11 +17,11 @@ module Rubysmith
|
|
17
17
|
@default = default
|
18
18
|
end
|
19
19
|
|
20
|
-
def call
|
20
|
+
def call attributes
|
21
21
|
Array(default).map { |path| Pathname path }
|
22
|
-
.including(
|
22
|
+
.including(attributes[key])
|
23
23
|
.compact
|
24
|
-
.then { |value| Success
|
24
|
+
.then { |value| Success attributes.merge!(key => value) }
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
@@ -38,6 +38,7 @@ RSpec.configure do |config|
|
|
38
38
|
config.filter_run_when_matching :focus
|
39
39
|
config.formatter = ENV.fetch("CI", false) == "true" ? :progress : :documentation
|
40
40
|
config.order = :random
|
41
|
+
config.pending_failure_output = :no_backtrace
|
41
42
|
config.shared_context_metadata_behavior = :apply_to_host_groups
|
42
43
|
config.warnings = true
|
43
44
|
|
data/rubysmith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "rubysmith"
|
5
|
-
spec.version = "6.
|
5
|
+
spec.version = "6.7.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/rubysmith"
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "etcher", "~> 1.3"
|
31
31
|
spec.add_dependency "gitt", "~> 3.2"
|
32
32
|
spec.add_dependency "infusible", "~> 3.5"
|
33
|
-
spec.add_dependency "milestoner", "~> 17.
|
33
|
+
spec.add_dependency "milestoner", "~> 17.7"
|
34
34
|
spec.add_dependency "pragmater", "~> 14.4"
|
35
35
|
spec.add_dependency "refinements", "~> 12.1"
|
36
36
|
spec.add_dependency "rubocop", "~> 1.63"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.7.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-
|
38
|
+
date: 2024-05-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -141,14 +141,14 @@ dependencies:
|
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '17.
|
144
|
+
version: '17.7'
|
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.
|
151
|
+
version: '17.7'
|
152
152
|
- !ruby/object:Gem::Dependency
|
153
153
|
name: pragmater
|
154
154
|
requirement: !ruby/object:Gem::Requirement
|
@@ -426,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
426
426
|
- !ruby/object:Gem::Version
|
427
427
|
version: '0'
|
428
428
|
requirements: []
|
429
|
-
rubygems_version: 3.5.
|
429
|
+
rubygems_version: 3.5.10
|
430
430
|
signing_key:
|
431
431
|
specification_version: 4
|
432
432
|
summary: A command line interface for smithing Ruby projects.
|
metadata.gz.sig
CHANGED
Binary file
|