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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8971c91c536a34ae73babda51a1958dd8676e64f66c7886fd9df251da52e79f
4
- data.tar.gz: 2373c1ae9db556f3018aa8cd760deef877e55e28e1a7e79ad48381c0b29460d1
3
+ metadata.gz: e66348f46dd686a44fa3113f6d7489fdbbc11fb52746953c081a9e99f77ed6ff
4
+ data.tar.gz: 91f4e06f5d2bc2171815f192ca8a4bbb88257876ebf899a94dab32c15d6faa5d
5
5
  SHA512:
6
- metadata.gz: 4da5c0307b7351af83bf0da75e9661753d0b7e8eb8c03cc2556cd1ff479d6d90aa35a726d8639102c4626e691da9f8d87fbe6ec9ea011e0dd1cb3c33cf4a496a
7
- data.tar.gz: 966e676b749c20a54f9d3a1d6eb8de766781002f47ba4412a05965cc8f0cb13f829822dde333445cf8a563fcc5c80ea14da25627cbb625f02065528b059dd137
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 to content.
7
+ # Adds current time.
8
8
  module Transformers
9
9
  include Dry::Monads[:result]
10
10
 
11
- CurrentTime = lambda do |content, key = :now, at: Time.now|
12
- content.fetch(key) { at }
13
- .then { |value| content.merge! key => value }
14
- .then { |updated_content| Dry::Monads::Success updated_content }
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(content) = content[key] ? Success(content) : email_or(content)
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 content
24
+ def email_or attributes
25
25
  git.get("user.email", nil)
26
- .fmap { |value| value ? content.merge!(key => value) : content }
27
- .or { Success content }
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(content) = content[key] ? Success(content) : user_or(content)
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 content
24
+ def user_or attributes
25
25
  git.get("github.user", nil)
26
- .fmap { |value| value ? content.merge!(key => value) : content }
27
- .or { Success content }
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 content
14
- return Success content if content[:author_given_name] || content[:author_family_name]
15
-
16
- name_or content
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(content) = split(content).or { Success content }
23
+ def name_or(attributes) = split(attributes).or { Success attributes }
22
24
 
23
- def split content
25
+ def split attributes
24
26
  git.get("user.name", nil).fmap do |name|
25
- next content unless name
27
+ next attributes unless name
26
28
 
27
29
  first, last = String(name).split
28
- content.merge! author_given_name: first, author_family_name: last
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 |content, key = :target_root, path: Pathname.pwd|
12
- content.fetch(:target_root) { path }
13
- .then { |value| content.merge! key => value }
14
- .then { |updated_content| Dry::Monads::Success updated_content }
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 content to default template roots.
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 content
20
+ def call attributes
21
21
  Array(default).map { |path| Pathname path }
22
- .including(content[key])
22
+ .including(attributes[key])
23
23
  .compact
24
- .then { |value| Success content.merge!(key => value) }
24
+ .then { |value| Success attributes.merge!(key => value) }
25
25
  end
26
26
 
27
27
  private
@@ -53,7 +53,7 @@ Once the gem is installed, you only need to require it:
53
53
 
54
54
  [source,ruby]
55
55
  ----
56
- require "<%= configuration.project_name %>"
56
+ require "<%= configuration.project_path %>"
57
57
  ----
58
58
 
59
59
  == Usage
@@ -36,7 +36,7 @@ You can also add the gem directly to your project:
36
36
 
37
37
  Once the gem is installed, you only need to require it:
38
38
 
39
- require "<%= configuration.project_name %>"
39
+ require "<%= configuration.project_path %>"
40
40
 
41
41
  ## Usage
42
42
 
@@ -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.6.0"
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.6"
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.6.0
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-04-21 00:00:00.000000000 Z
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.6'
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.6'
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.9
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