rubysmith 6.10.0 → 7.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 +0 -0
- data/README.adoc +51 -61
- data/lib/rubysmith/builder.rb +9 -9
- data/lib/rubysmith/builders/abstract.rb +4 -4
- data/lib/rubysmith/builders/bundler.rb +2 -2
- data/lib/rubysmith/builders/caliber.rb +4 -4
- data/lib/rubysmith/builders/circle_ci.rb +3 -3
- data/lib/rubysmith/builders/console.rb +3 -3
- data/lib/rubysmith/builders/core.rb +6 -6
- data/lib/rubysmith/builders/documentation/citation.rb +3 -3
- data/lib/rubysmith/builders/documentation/license.rb +8 -9
- data/lib/rubysmith/builders/documentation/readme.rb +4 -4
- data/lib/rubysmith/builders/documentation/version.rb +4 -5
- data/lib/rubysmith/builders/git/commit.rb +4 -8
- data/lib/rubysmith/builders/git/ignore.rb +3 -3
- data/lib/rubysmith/builders/git/safe.rb +3 -3
- data/lib/rubysmith/builders/git/setup.rb +3 -3
- data/lib/rubysmith/builders/git_hub/ci.rb +27 -0
- data/lib/rubysmith/builders/git_hub/funding.rb +23 -0
- data/lib/rubysmith/builders/git_hub/template.rb +32 -0
- data/lib/rubysmith/builders/guard.rb +4 -4
- data/lib/rubysmith/builders/init.rb +2 -2
- data/lib/rubysmith/builders/rake/binstub.rb +24 -0
- data/lib/rubysmith/builders/rake/configuration.rb +29 -0
- data/lib/rubysmith/builders/reek.rb +3 -3
- data/lib/rubysmith/builders/rspec/binstub.rb +3 -3
- data/lib/rubysmith/builders/rspec/context.rb +6 -6
- data/lib/rubysmith/builders/rspec/helper.rb +3 -3
- data/lib/rubysmith/builders/setup.rb +3 -3
- data/lib/rubysmith/builders/version.rb +2 -2
- data/lib/rubysmith/cli/actions/amazing_print.rb +3 -3
- data/lib/rubysmith/cli/actions/caliber.rb +3 -3
- data/lib/rubysmith/cli/actions/circle_ci.rb +4 -4
- data/lib/rubysmith/cli/actions/citation.rb +3 -3
- data/lib/rubysmith/cli/actions/community.rb +3 -3
- data/lib/rubysmith/cli/actions/conduct.rb +3 -3
- data/lib/rubysmith/cli/actions/console.rb +3 -3
- data/lib/rubysmith/cli/actions/contributions.rb +3 -3
- data/lib/rubysmith/cli/actions/debug.rb +3 -3
- data/lib/rubysmith/cli/actions/funding.rb +4 -4
- data/lib/rubysmith/cli/actions/git.rb +3 -3
- data/lib/rubysmith/cli/actions/git_hub.rb +3 -3
- data/lib/rubysmith/cli/actions/git_hub_ci.rb +3 -3
- data/lib/rubysmith/cli/actions/git_lint.rb +3 -3
- data/lib/rubysmith/cli/actions/guard.rb +5 -3
- data/lib/rubysmith/cli/actions/irb_kit.rb +3 -3
- data/lib/rubysmith/cli/actions/license.rb +3 -3
- data/lib/rubysmith/cli/actions/maximum.rb +4 -4
- data/lib/rubysmith/cli/actions/minimum.rb +4 -4
- data/lib/rubysmith/cli/actions/name.rb +2 -2
- data/lib/rubysmith/cli/actions/rake.rb +3 -3
- data/lib/rubysmith/cli/actions/readme.rb +3 -3
- data/lib/rubysmith/cli/actions/reek.rb +3 -3
- data/lib/rubysmith/cli/actions/refinements.rb +3 -3
- data/lib/rubysmith/cli/actions/rspec.rb +3 -3
- data/lib/rubysmith/cli/actions/rtc.rb +3 -3
- data/lib/rubysmith/cli/actions/security.rb +3 -3
- data/lib/rubysmith/cli/actions/setup.rb +3 -3
- data/lib/rubysmith/cli/actions/simple_cov.rb +3 -3
- data/lib/rubysmith/cli/actions/versions.rb +3 -3
- data/lib/rubysmith/cli/actions/zeitwerk.rb +3 -3
- data/lib/rubysmith/cli/commands/build.rb +33 -31
- data/lib/rubysmith/cli/shell.rb +0 -1
- data/lib/rubysmith/configuration/contract.rb +16 -14
- data/lib/rubysmith/configuration/defaults.yml +22 -2
- data/lib/rubysmith/configuration/model.rb +30 -28
- data/lib/rubysmith/configuration/transformers/git_hub_user.rb +2 -2
- data/lib/rubysmith/container.rb +18 -9
- data/lib/rubysmith/extensions/bundler.rb +7 -7
- data/lib/rubysmith/extensions/pragmater.rb +10 -10
- data/lib/rubysmith/extensions/rubocop.rb +7 -7
- data/lib/rubysmith/extensions/tocer.rb +8 -8
- data/lib/rubysmith/renderers/erb.rb +4 -4
- data/lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/.github/FUNDING.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +12 -12
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +18 -18
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +21 -21
- data/lib/rubysmith/templates/%project_name%/README.md.erb +21 -21
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +10 -10
- data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/bin/console.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/bin/setup.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/lib/%project_path%.rb.erb +7 -7
- data/lib/rubysmith/templates/%project_name%/spec/lib/%project_path%_spec.rb.erb +2 -2
- data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +4 -4
- data/lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb +3 -3
- data/lib/rubysmith.rb +1 -0
- data/rubysmith.gemspec +11 -12
- data.tar.gz.sig +0 -0
- metadata +28 -43
- metadata.gz.sig +0 -0
- data/lib/rubysmith/builders/git_hub.rb +0 -39
- data/lib/rubysmith/builders/git_hub_ci.rb +0 -25
- data/lib/rubysmith/builders/rake.rb +0 -39
- data/lib/rubysmith/cli/actions/publish.rb +0 -35
- data/lib/rubysmith/configuration/transformers/target_root.rb +0 -18
- data/lib/rubysmith/extensions/milestoner.rb +0 -23
@@ -8,29 +8,29 @@ module Rubysmith
|
|
8
8
|
module Extensions
|
9
9
|
# Ensures project skeleton adheres to style guide.
|
10
10
|
class Rubocop
|
11
|
+
include Import[:settings]
|
12
|
+
|
11
13
|
using Refinements::IO
|
12
14
|
using Refinements::Pathname
|
13
15
|
|
14
|
-
def
|
15
|
-
|
16
|
-
def initialize configuration, client: ::RuboCop::CLI.new
|
17
|
-
@configuration = configuration
|
16
|
+
def initialize(client: ::RuboCop::CLI.new, **)
|
18
17
|
@client = client
|
18
|
+
super(**)
|
19
19
|
end
|
20
20
|
|
21
21
|
def call
|
22
|
-
project_root =
|
22
|
+
project_root = settings.project_root
|
23
23
|
|
24
24
|
project_root.change_dir do
|
25
25
|
STDOUT.squelch { client.run ["--autocorrect-all", project_root.to_s] }
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
true
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
32
32
|
|
33
|
-
attr_reader :
|
33
|
+
attr_reader :client
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -7,25 +7,25 @@ module Rubysmith
|
|
7
7
|
module Extensions
|
8
8
|
# Ensures project skeleton documentation has table of content.
|
9
9
|
class Tocer
|
10
|
-
|
10
|
+
include Import[:settings]
|
11
11
|
|
12
|
-
|
12
|
+
using Refinements::Pathname
|
13
13
|
|
14
|
-
def initialize
|
15
|
-
@configuration = configuration
|
14
|
+
def initialize(client: ::Tocer::Runner.new, **)
|
16
15
|
@client = client
|
16
|
+
super(**)
|
17
17
|
end
|
18
18
|
|
19
19
|
def call
|
20
|
-
return
|
20
|
+
return false unless settings.build_readme
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
settings.project_root.change_dir { client.call }
|
23
|
+
true
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
27
27
|
|
28
|
-
attr_reader :
|
28
|
+
attr_reader :client
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -6,10 +6,10 @@ module Rubysmith
|
|
6
6
|
module Renderers
|
7
7
|
# Renders ERB templates as fully functional files.
|
8
8
|
class ERB
|
9
|
-
def initialize
|
10
|
-
scope: Renderers::Namespace.new(
|
9
|
+
def initialize settings,
|
10
|
+
scope: Renderers::Namespace.new(settings.project_namespaced_class),
|
11
11
|
client: ::ERB
|
12
|
-
@
|
12
|
+
@settings = settings
|
13
13
|
@scope = scope
|
14
14
|
@client = client
|
15
15
|
end
|
@@ -19,7 +19,7 @@ module Rubysmith
|
|
19
19
|
private
|
20
20
|
|
21
21
|
attr_accessor :buffer
|
22
|
-
attr_reader :
|
22
|
+
attr_reader :settings, :scope, :client
|
23
23
|
|
24
24
|
def namespace
|
25
25
|
source = buffer.dup
|
@@ -1 +1 @@
|
|
1
|
-
github: [<%=
|
1
|
+
github: [<%= settings.repository_handle %>]
|
@@ -1,17 +1,17 @@
|
|
1
1
|
cff-version: 1.2.0
|
2
|
-
message: <%=
|
3
|
-
title: <%=
|
2
|
+
message: <%= settings.citation_message %>
|
3
|
+
title: <%= settings.project_label %>
|
4
4
|
abstract:
|
5
|
-
version: <%=
|
6
|
-
license: <%=
|
7
|
-
date-released: <%=
|
5
|
+
version: <%= settings.project_version %>
|
6
|
+
license: <%= settings.license_label_version %>
|
7
|
+
date-released: <%= settings.loaded_at.strftime "%Y-%m-%d" %>
|
8
8
|
authors:
|
9
|
-
- family-names: <%=
|
10
|
-
given-names: <%=
|
11
|
-
affiliation: <%=
|
12
|
-
orcid: https://orcid.org/<%=
|
9
|
+
- family-names: <%= settings.author_family_name %>
|
10
|
+
given-names: <%= settings.author_given_name %>
|
11
|
+
affiliation: <%= settings.citation_affiliation %>
|
12
|
+
orcid: https://orcid.org/<%= settings.citation_orcid %>
|
13
13
|
keywords:
|
14
14
|
- ruby
|
15
|
-
repository-code: <%=
|
16
|
-
repository-artifact: <%=
|
17
|
-
url: <%=
|
15
|
+
repository-code: <%= settings.computed_project_uri_source %>
|
16
|
+
repository-artifact: <%= settings.computed_project_uri_download %>
|
17
|
+
url: <%= settings.computed_project_uri_home %>
|
@@ -2,57 +2,57 @@ ruby file: ".ruby-version"
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
<% if
|
6
|
-
gem "refinements", "~> 12.
|
5
|
+
<% if settings.build_refinements %>
|
6
|
+
gem "refinements", "~> 12.7"
|
7
7
|
<% end %>
|
8
|
-
<% if
|
8
|
+
<% if settings.build_zeitwerk %>
|
9
9
|
gem "zeitwerk", "~> 2.6"
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
group :quality do
|
13
|
-
<% if
|
13
|
+
<% if settings.build_caliber %>
|
14
14
|
gem "caliber", "~> 0.58"
|
15
15
|
<% end %>
|
16
|
-
<% if
|
17
|
-
gem "git-lint", "~>
|
16
|
+
<% if settings.build_git && settings.build_git_lint %>
|
17
|
+
gem "git-lint", "~> 8.0"
|
18
18
|
<% end %>
|
19
|
-
<% if
|
19
|
+
<% if settings.build_reek %>
|
20
20
|
gem "reek", "~> 6.3", require: false
|
21
21
|
<% end %>
|
22
|
-
<% if
|
22
|
+
<% if settings.build_simple_cov %>
|
23
23
|
gem "simplecov", "~> 0.22", require: false
|
24
24
|
<% end %>
|
25
25
|
end
|
26
26
|
|
27
27
|
group :development do
|
28
|
-
<% if
|
28
|
+
<% if settings.build_rake %>
|
29
29
|
gem "rake", "~> 13.2"
|
30
30
|
<% end %>
|
31
|
-
<% if
|
32
|
-
gem "tocer", "~>
|
31
|
+
<% if settings.markdown? %>
|
32
|
+
gem "tocer", "~> 18.0"
|
33
33
|
<% end %>
|
34
34
|
end
|
35
35
|
|
36
36
|
group :test do
|
37
|
-
<% if
|
37
|
+
<% if settings.build_guard %>
|
38
38
|
gem "guard-rspec", "~> 4.7", require: false
|
39
39
|
<% end %>
|
40
|
-
<% if
|
40
|
+
<% if settings.build_rspec %>
|
41
41
|
gem "rspec", "~> 3.13"
|
42
42
|
<% end %>
|
43
43
|
end
|
44
44
|
|
45
45
|
group :tools do
|
46
|
-
<% if
|
46
|
+
<% if settings.build_amazing_print %>
|
47
47
|
gem "amazing_print", "~> 1.6"
|
48
48
|
<% end %>
|
49
|
-
<% if
|
49
|
+
<% if settings.build_debug %>
|
50
50
|
gem "debug", "~> 1.9"
|
51
51
|
<% end %>
|
52
|
-
<% if
|
53
|
-
gem "irb-kit", "~> 0.
|
52
|
+
<% if settings.build_irb_kit %>
|
53
|
+
gem "irb-kit", "~> 0.3"
|
54
54
|
<% end %>
|
55
|
-
<% if
|
55
|
+
<% if settings.build_rtc %>
|
56
56
|
gem "repl_type_completor", "~> 0.1"
|
57
57
|
<% end %>
|
58
58
|
end
|
@@ -150,7 +150,7 @@ additional liability.
|
|
150
150
|
|
151
151
|
END OF TERMS AND CONDITIONS
|
152
152
|
|
153
|
-
Copyright <%=
|
153
|
+
Copyright <%= settings.loaded_at.strftime "%Y" %> link:<%= settings.author_uri %>[<%= settings.author_name %>].
|
154
154
|
|
155
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
156
156
|
compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
|
@@ -150,7 +150,7 @@ additional liability.
|
|
150
150
|
|
151
151
|
END OF TERMS AND CONDITIONS
|
152
152
|
|
153
|
-
Copyright <%=
|
153
|
+
Copyright <%= settings.loaded_at.strftime "%Y" %> [<%= settings.author_name %>](<%= settings.author_uri %>).
|
154
154
|
|
155
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
156
156
|
compliance with the License. You may obtain a [copy](https://www.apache.org/licenses/LICENSE-2.0) of
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright <%=
|
1
|
+
Copyright <%= settings.loaded_at.strftime "%Y" %> link:<%= settings.author_uri %>[<%= settings.author_name %>].
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright <%=
|
1
|
+
Copyright <%= settings.loaded_at.strftime "%Y" %> [<%= settings.author_name %>](<%= settings.author_uri %>).
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -2,7 +2,7 @@
|
|
2
2
|
:toclevels: 5
|
3
3
|
:figure-caption!:
|
4
4
|
|
5
|
-
= <%=
|
5
|
+
= <%= settings.project_label %>
|
6
6
|
|
7
7
|
toc::[]
|
8
8
|
|
@@ -18,9 +18,9 @@ To set up project, run:
|
|
18
18
|
|
19
19
|
[source,bash]
|
20
20
|
----
|
21
|
-
git clone <%=
|
22
|
-
cd <%=
|
23
|
-
<% if
|
21
|
+
git clone <%= settings.computed_project_uri_source %>
|
22
|
+
cd <%= settings.project_name %>
|
23
|
+
<% if settings.build_setup %>
|
24
24
|
bin/setup
|
25
25
|
<% end %>
|
26
26
|
----
|
@@ -33,14 +33,14 @@ To contribute, run:
|
|
33
33
|
|
34
34
|
[source,bash]
|
35
35
|
----
|
36
|
-
git clone <%=
|
37
|
-
cd <%=
|
38
|
-
<% if
|
36
|
+
git clone <%= settings.computed_project_uri_source %>
|
37
|
+
cd <%= settings.project_name %>
|
38
|
+
<% if settings.build_setup %>
|
39
39
|
bin/setup
|
40
40
|
<% end %>
|
41
41
|
----
|
42
42
|
|
43
|
-
<% if
|
43
|
+
<% if settings.build_console %>
|
44
44
|
|
45
45
|
You can also use the IRB console for direct access to all objects:
|
46
46
|
|
@@ -59,31 +59,31 @@ To test, run:
|
|
59
59
|
bin/rake
|
60
60
|
----
|
61
61
|
|
62
|
-
<% if
|
63
|
-
== link:<%=
|
62
|
+
<% if settings.build_license %>
|
63
|
+
== link:<%= settings.computed_project_uri_license %>[License]
|
64
64
|
<% end %>
|
65
65
|
|
66
|
-
<% if
|
67
|
-
== link:<%=
|
66
|
+
<% if settings.build_security %>
|
67
|
+
== link:<%= settings.computed_project_uri_security %>[Security]
|
68
68
|
<% end %>
|
69
69
|
|
70
|
-
<% if
|
71
|
-
== link:<%=
|
70
|
+
<% if settings.build_conduct %>
|
71
|
+
== link:<%= settings.computed_project_uri_conduct %>[Code of Conduct]
|
72
72
|
<% end %>
|
73
73
|
|
74
|
-
<% if
|
75
|
-
== link:<%=
|
74
|
+
<% if settings.build_contributions %>
|
75
|
+
== link:<%= settings.computed_project_uri_contributions %>[Contributions]
|
76
76
|
<% end %>
|
77
77
|
|
78
|
-
<% if
|
79
|
-
== link:<%=
|
78
|
+
<% if settings.build_versions %>
|
79
|
+
== link:<%= settings.computed_project_uri_versions %>[Versions]
|
80
80
|
<% end %>
|
81
81
|
|
82
|
-
<% if
|
83
|
-
== link:<%=
|
82
|
+
<% if settings.build_community %>
|
83
|
+
== link:<%= settings.computed_project_uri_community %>[Community]
|
84
84
|
<% end %>
|
85
85
|
|
86
86
|
== Credits
|
87
87
|
|
88
88
|
* Built with link:https://alchemists.io/projects/rubysmith[Rubysmith].
|
89
|
-
* Engineered by link:<%=
|
89
|
+
* Engineered by link:<%= settings.author_uri %>[<%= settings.author_name %>].
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# <%=
|
1
|
+
# <%= settings.project_label %>
|
2
2
|
|
3
3
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
4
4
|
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
@@ -13,9 +13,9 @@
|
|
13
13
|
|
14
14
|
To set up project, run:
|
15
15
|
|
16
|
-
git clone <%=
|
17
|
-
cd <%=
|
18
|
-
<% if
|
16
|
+
git clone <%= settings.computed_project_uri_source %>
|
17
|
+
cd <%= settings.project_name %>
|
18
|
+
<% if settings.build_setup %>
|
19
19
|
bin/setup
|
20
20
|
<% end %>
|
21
21
|
|
@@ -25,13 +25,13 @@ To set up project, run:
|
|
25
25
|
|
26
26
|
To contribute, run:
|
27
27
|
|
28
|
-
git clone <%=
|
29
|
-
cd <%=
|
30
|
-
<% if
|
28
|
+
git clone <%= settings.computed_project_uri_source %>
|
29
|
+
cd <%= settings.project_name %>
|
30
|
+
<% if settings.build_setup %>
|
31
31
|
bin/setup
|
32
32
|
<% end %>
|
33
33
|
|
34
|
-
<% if
|
34
|
+
<% if settings.build_console %>
|
35
35
|
|
36
36
|
You can also use the IRB console for direct access to all objects:
|
37
37
|
|
@@ -44,31 +44,31 @@ To test, run:
|
|
44
44
|
|
45
45
|
bin/rake
|
46
46
|
|
47
|
-
<% if
|
48
|
-
## [License](<%=
|
47
|
+
<% if settings.build_license %>
|
48
|
+
## [License](<%= settings.computed_project_uri_license %>)
|
49
49
|
<% end %>
|
50
50
|
|
51
|
-
<% if
|
52
|
-
## [Security](<%=
|
51
|
+
<% if settings.build_security %>
|
52
|
+
## [Security](<%= settings.computed_project_uri_security %>)
|
53
53
|
<% end %>
|
54
54
|
|
55
|
-
<% if
|
56
|
-
## [Code of Conduct](<%=
|
55
|
+
<% if settings.build_conduct %>
|
56
|
+
## [Code of Conduct](<%= settings.computed_project_uri_conduct %>)
|
57
57
|
<% end %>
|
58
58
|
|
59
|
-
<% if
|
60
|
-
## [Contributions](<%=
|
59
|
+
<% if settings.build_contributions %>
|
60
|
+
## [Contributions](<%= settings.computed_project_uri_contributions %>)
|
61
61
|
<% end %>
|
62
62
|
|
63
|
-
<% if
|
64
|
-
## [Versions](<%=
|
63
|
+
<% if settings.build_versions %>
|
64
|
+
## [Versions](<%= settings.computed_project_uri_versions %>)
|
65
65
|
<% end %>
|
66
66
|
|
67
|
-
<% if
|
68
|
-
## [Community](<%=
|
67
|
+
<% if settings.build_community %>
|
68
|
+
## [Community](<%= settings.computed_project_uri_community %>)
|
69
69
|
<% end %>
|
70
70
|
|
71
71
|
## Credits
|
72
72
|
|
73
73
|
- Built with [Rubysmith](https://alchemists.io/projects/rubysmith).
|
74
|
-
- Engineered by [<%=
|
74
|
+
- Engineered by [<%= settings.author_name %>](<%= settings.author_uri %>).
|
@@ -1,32 +1,32 @@
|
|
1
1
|
require "bundler/setup"
|
2
2
|
|
3
|
-
<% if
|
3
|
+
<% if settings.build_git && settings.build_git_lint %>
|
4
4
|
require "git/lint/rake/register"
|
5
5
|
<% end %>
|
6
|
-
<% if
|
6
|
+
<% if settings.build_reek %>
|
7
7
|
require "reek/rake/task"
|
8
8
|
<% end %>
|
9
|
-
<% if
|
9
|
+
<% if settings.build_rspec %>
|
10
10
|
require "rspec/core/rake_task"
|
11
11
|
<% end %>
|
12
|
-
<% if
|
12
|
+
<% if settings.build_caliber %>
|
13
13
|
require "rubocop/rake_task"
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<% if
|
16
|
+
<% if settings.build_git && settings.build_git_lint %>
|
17
17
|
Git::Lint::Rake::Register.call
|
18
18
|
<% end %>
|
19
|
-
<% if
|
19
|
+
<% if settings.build_reek %>
|
20
20
|
Reek::Rake::Task.new
|
21
21
|
<% end %>
|
22
|
-
<% if
|
22
|
+
<% if settings.build_rspec %>
|
23
23
|
RSpec::Core::RakeTask.new { |task| task.verbose = false }
|
24
24
|
<% end %>
|
25
|
-
<% if
|
25
|
+
<% if settings.build_caliber %>
|
26
26
|
RuboCop::RakeTask.new
|
27
27
|
<% end %>
|
28
28
|
|
29
29
|
desc "Run code quality checks"
|
30
|
-
task quality: %i[<% if
|
30
|
+
task quality: %i[<% if settings.build_git && settings.build_git_lint %>git_lint<% end %> <% if settings.build_reek %>reek<% end %> <% if settings.build_caliber %>rubocop<% end %>]
|
31
31
|
|
32
|
-
task default: %i[quality <% if
|
32
|
+
task default: %i[quality <% if settings.build_rspec %>spec<% end %>]
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<% if
|
1
|
+
<% if settings.build_zeitwerk %>
|
2
2
|
require "zeitwerk"
|
3
|
-
<% if
|
3
|
+
<% if settings.project_levels.positive? %>
|
4
4
|
Zeitwerk::Loader.new.then do |loader|
|
5
|
-
loader.tag = "<%=
|
6
|
-
loader.push_dir "#{__dir__}<%= Array.new(
|
5
|
+
loader.tag = "<%= settings.project_name %>"
|
6
|
+
loader.push_dir "#{__dir__}<%= Array.new(settings.project_levels, "/..").join %>"
|
7
7
|
loader.setup
|
8
8
|
end
|
9
9
|
<% else %>
|
@@ -14,11 +14,11 @@
|
|
14
14
|
end
|
15
15
|
<% end %>
|
16
16
|
<% end %>
|
17
|
-
<% if
|
17
|
+
<% if settings.build_zeitwerk %>
|
18
18
|
<% namespace do %>
|
19
|
-
<% if
|
19
|
+
<% if settings.project_levels.positive? %>
|
20
20
|
def self.loader registry = Zeitwerk::Registry
|
21
|
-
@loader ||= registry.loaders.find { |loader| loader.tag == "<%=
|
21
|
+
@loader ||= registry.loaders.find { |loader| loader.tag == "<%= settings.project_name %>" }
|
22
22
|
end
|
23
23
|
<% else %>
|
24
24
|
def self.loader registry = Zeitwerk::Registry
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
RSpec.describe <%=
|
3
|
+
RSpec.describe <%= settings.project_namespaced_class %> do
|
4
4
|
describe ".loader" do
|
5
5
|
it "eager loads" do
|
6
6
|
expectation = proc { described_class.loader.eager_load force: true }
|
@@ -8,7 +8,7 @@ RSpec.describe <%= configuration.project_namespaced_class %> do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "answers unique tag" do
|
11
|
-
expect(described_class.loader.tag).to eq("<%=
|
11
|
+
expect(described_class.loader.tag).to eq("<%= settings.project_name %>")
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if
|
1
|
+
<% if settings.build_simple_cov %>
|
2
2
|
require "simplecov"
|
3
3
|
|
4
4
|
unless ENV["NO_COVERAGE"]
|
@@ -13,12 +13,12 @@ end
|
|
13
13
|
|
14
14
|
Bundler.require :tools
|
15
15
|
|
16
|
-
require "<%=
|
17
|
-
<% if
|
16
|
+
require "<%= settings.project_path %>"
|
17
|
+
<% if settings.build_refinements %>
|
18
18
|
require "refinements"
|
19
19
|
<% end %>
|
20
20
|
|
21
|
-
<% if
|
21
|
+
<% if settings.build_refinements %>
|
22
22
|
SPEC_ROOT = Pathname(__dir__).realpath.freeze
|
23
23
|
|
24
24
|
using Refinements::Pathname
|
@@ -1,11 +1,11 @@
|
|
1
1
|
RSpec.shared_context "with temporary directory" do
|
2
|
-
<% if
|
2
|
+
<% if settings.build_refinements %>using Refinements::Pathname<% end %>
|
3
3
|
|
4
4
|
let(:temp_dir) { Bundler.root.join "tmp/rspec" }
|
5
5
|
|
6
6
|
around do |example|
|
7
|
-
<%=
|
7
|
+
<%= settings.build_refinements ? "temp_dir.make_path" : "FileUtils.mkdir_p temp_dir" %>
|
8
8
|
example.run
|
9
|
-
<%=
|
9
|
+
<%= settings.build_refinements ? "temp_dir.remove_tree" : "FileUtils.rm_rf temp_dir" %>
|
10
10
|
end
|
11
11
|
end
|
data/lib/rubysmith.rb
CHANGED
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 = "
|
5
|
+
spec.version = "7.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/rubysmith"
|
@@ -24,20 +24,19 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.3"
|
26
26
|
spec.add_dependency "cogger", "~> 0.21"
|
27
|
-
spec.add_dependency "containable", "~> 0.
|
27
|
+
spec.add_dependency "containable", "~> 0.2"
|
28
28
|
spec.add_dependency "dry-monads", "~> 1.6"
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.13"
|
30
|
-
spec.add_dependency "etcher", "~> 1
|
31
|
-
spec.add_dependency "gitt", "~> 3.
|
32
|
-
spec.add_dependency "infusible", "~> 3.
|
33
|
-
spec.add_dependency "
|
34
|
-
spec.add_dependency "
|
35
|
-
spec.add_dependency "
|
36
|
-
spec.add_dependency "
|
37
|
-
spec.add_dependency "
|
38
|
-
spec.add_dependency "sod", "~> 0.8"
|
30
|
+
spec.add_dependency "etcher", "~> 2.1"
|
31
|
+
spec.add_dependency "gitt", "~> 3.6"
|
32
|
+
spec.add_dependency "infusible", "~> 3.8"
|
33
|
+
spec.add_dependency "pragmater", "~> 15.0"
|
34
|
+
spec.add_dependency "refinements", "~> 12.7"
|
35
|
+
spec.add_dependency "rubocop", "~> 1.65"
|
36
|
+
spec.add_dependency "runcom", "~> 11.5"
|
37
|
+
spec.add_dependency "sod", "~> 0.12"
|
39
38
|
spec.add_dependency "spek", "~> 3.0"
|
40
|
-
spec.add_dependency "tocer", "~>
|
39
|
+
spec.add_dependency "tocer", "~> 18.0"
|
41
40
|
spec.add_dependency "tone", "~> 1.0"
|
42
41
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
43
42
|
|
data.tar.gz.sig
CHANGED
Binary file
|