rubysmith 1.0.0 → 1.1.0
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 +0 -0
- data/README.adoc +18 -10
- data/lib/rubysmith/builders/git/ignore.rb +35 -0
- data/lib/rubysmith/builders/rake.rb +1 -0
- data/lib/rubysmith/cli/actions/build.rb +1 -0
- data/lib/rubysmith/cli/parsers/build.rb +9 -0
- data/lib/rubysmith/configuration/content.rb +4 -0
- data/lib/rubysmith/configuration/defaults.yml +1 -0
- data/lib/rubysmith/identity.rb +1 -1
- data/lib/rubysmith/templates/%project_name%/.gitignore.erb +11 -0
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +6 -0
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +9 -0
- data.tar.gz.sig +0 -0
- metadata +4 -2
- 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: de17a0e1a14656faf3c41d6eb187aaa58acd051e1a320b6e8e42c759c8cfc3e8
|
|
4
|
+
data.tar.gz: bee0b69eb4affb36042197ac9b7dc0d138b847a229bce03e1a6ac5e53c608192
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a548b6f39715b29606ecc3bfe7a9a211b8b5f43c8adf86f68956e4d35cbf678062178106d1932f78a1173a64482b6b0e83962e923700723f18889e082ac9d13
|
|
7
|
+
data.tar.gz: aeea9f7e1e4e9df57f8c118f5c931cde45a071d4c261d6632e03def688b6aba4d9e408c92a4dd68a875d55b99f39928a000b76706d27fa92fa4dc372b3682941
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/README.adoc
CHANGED
|
@@ -113,6 +113,7 @@ BUILD OPTIONS:
|
|
|
113
113
|
--[no-]setup Add setup script. Default: true.
|
|
114
114
|
--[no-]simple_cov Add SimpleCov gem. Default: true.
|
|
115
115
|
--[no-]versions Add version history. Default: true.
|
|
116
|
+
--[no-]yard Add Yard gem. Default: false.
|
|
116
117
|
--[no-]zeitwerk Add Zeitwerk gem. Default: true.
|
|
117
118
|
....
|
|
118
119
|
|
|
@@ -288,7 +289,7 @@ defining your project specifications and have a framework for testing your code.
|
|
|
288
289
|
|
|
289
290
|
==== Rubocop
|
|
290
291
|
|
|
291
|
-
The `--rubocop` option allows you to add the link:https://docs.rubocop.org[
|
|
292
|
+
The `--rubocop` option allows you to add the link:https://docs.rubocop.org[RuboCop] gem and suite
|
|
292
293
|
of gems to your project for good code quality standards. This the Alchemists style guide, provided
|
|
293
294
|
by the link:https://www.alchemists.io/projects/code_quality[Code Quality] project, is what is used
|
|
294
295
|
by default.
|
|
@@ -309,6 +310,13 @@ analysis of what your quality of code is for the project.
|
|
|
309
310
|
The `--versions` option allows you add a `VERSIONS` file to your project to provide details about
|
|
310
311
|
all published versions of your project.
|
|
311
312
|
|
|
313
|
+
==== YARD
|
|
314
|
+
|
|
315
|
+
The `--yard` option allows you add the link:https://yardoc.org/[YARD] gem to your project so you can
|
|
316
|
+
automate the generation of project documentation. Once your project is built, you can use `rake
|
|
317
|
+
yard` to build documentation into the `doc/yard` folder. This folder is ignored by Git by default.
|
|
318
|
+
Additional customization is possible via the YARD Rake task as found in the `Rakefile`.
|
|
319
|
+
|
|
312
320
|
==== Zeitwerk
|
|
313
321
|
|
|
314
322
|
The `--zeitwerk` option allows you add the link:https://github.com/fxn/zeitwerk[Zeitwerk] gem to
|
|
@@ -376,6 +384,7 @@ variables. The default configuration is as follows:
|
|
|
376
384
|
:setup: true
|
|
377
385
|
:simple_cov: true
|
|
378
386
|
:versions: true
|
|
387
|
+
:yard: false
|
|
379
388
|
:zeitwerk: true
|
|
380
389
|
:citation:
|
|
381
390
|
:affiliation:
|
|
@@ -457,10 +466,9 @@ custom values as desired. The URL is the only value that can't be automatically
|
|
|
457
466
|
|
|
458
467
|
==== Build
|
|
459
468
|
|
|
460
|
-
All build options
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
--help`). All of these options are explained in greater detail above.
|
|
469
|
+
All build options accept booleans values only and can be customized as desired. When changing your
|
|
470
|
+
build options, they will dynamically render when display usage (i.e. `rubysmith --help`). All of
|
|
471
|
+
these options are explained in greater detail above.
|
|
464
472
|
|
|
465
473
|
==== Citations
|
|
466
474
|
|
|
@@ -490,10 +498,10 @@ Follow the above links to learn more about each extension's gem configuration.
|
|
|
490
498
|
|
|
491
499
|
==== GitHub
|
|
492
500
|
|
|
493
|
-
Your GitHub user is
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
501
|
+
Your GitHub user is the handle you setup when creating your GitHub account. This information is used
|
|
502
|
+
for documentation purposes and Circle CI badge association. If you don't define this information,
|
|
503
|
+
Rubysmith will automatically fallback to pulling this information from your Git configuration (i.e.
|
|
504
|
+
`github.user`). If all else fails, then nothing will be used.
|
|
497
505
|
|
|
498
506
|
==== License
|
|
499
507
|
|
|
@@ -506,7 +514,7 @@ license are available:
|
|
|
506
514
|
|
|
507
515
|
==== Project
|
|
508
516
|
|
|
509
|
-
There are two
|
|
517
|
+
There are two categories within this section: URLs and version. The URLs allow you to link to
|
|
510
518
|
specific documentation related to your project. You'll definitely want to customize these as makes
|
|
511
519
|
sense since these URLs are used for documentation, citations, and general project information. You
|
|
512
520
|
can also use `%project_name%` as a placeholder anywhere in your URL and Rubysmith will ensure your
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "refinements/structs"
|
|
4
|
+
|
|
5
|
+
module Rubysmith
|
|
6
|
+
module Builders
|
|
7
|
+
module Git
|
|
8
|
+
# Builds Git repository directory and file ignore configuration.
|
|
9
|
+
class Ignore
|
|
10
|
+
using Refinements::Structs
|
|
11
|
+
|
|
12
|
+
def self.call(...) = new(...).call
|
|
13
|
+
|
|
14
|
+
def initialize configuration, builder: Builder
|
|
15
|
+
@configuration = configuration
|
|
16
|
+
@builder = builder
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def call
|
|
20
|
+
return configuration unless configuration.build_git
|
|
21
|
+
|
|
22
|
+
builder.call(configuration.merge(template_path: "%project_name%/.gitignore.erb"))
|
|
23
|
+
.render
|
|
24
|
+
.replace(" ", "")
|
|
25
|
+
|
|
26
|
+
configuration
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
private
|
|
30
|
+
|
|
31
|
+
attr_reader :configuration, :builder
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -266,6 +266,15 @@ module Rubysmith
|
|
|
266
266
|
end
|
|
267
267
|
end
|
|
268
268
|
|
|
269
|
+
def add_yard
|
|
270
|
+
client.on(
|
|
271
|
+
"--[no-]yard",
|
|
272
|
+
"Add Yard gem. #{default __method__}."
|
|
273
|
+
) do |value|
|
|
274
|
+
configuration.merge! build_yard: value
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
269
278
|
def add_zeitwerk
|
|
270
279
|
client.on(
|
|
271
280
|
"--[no-]zeitwerk",
|
|
@@ -12,9 +12,12 @@ module Rubysmith
|
|
|
12
12
|
Content = Struct.new(
|
|
13
13
|
:action_build,
|
|
14
14
|
:action_config,
|
|
15
|
+
:action_edit,
|
|
15
16
|
:action_help,
|
|
17
|
+
:action_install,
|
|
16
18
|
:action_publish,
|
|
17
19
|
:action_version,
|
|
20
|
+
:action_view,
|
|
18
21
|
:author_email,
|
|
19
22
|
:author_family_name,
|
|
20
23
|
:author_given_name,
|
|
@@ -47,6 +50,7 @@ module Rubysmith
|
|
|
47
50
|
:build_setup,
|
|
48
51
|
:build_simple_cov,
|
|
49
52
|
:build_versions,
|
|
53
|
+
:build_yard,
|
|
50
54
|
:build_zeitwerk,
|
|
51
55
|
:citation_affiliation,
|
|
52
56
|
:citation_message,
|
data/lib/rubysmith/identity.rb
CHANGED
|
@@ -36,12 +36,18 @@ group :code_quality do
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
group :development do
|
|
39
|
+
<% if configuration.build_yard && configuration.ascii_doc? %>
|
|
40
|
+
gem "asciidoctor", "~> 2.0"
|
|
41
|
+
<% end %>
|
|
39
42
|
<% if configuration.build_rake %>
|
|
40
43
|
gem "rake", "~> 13.0"
|
|
41
44
|
<% end %>
|
|
42
45
|
<% if configuration.markdown? %>
|
|
43
46
|
gem "tocer", "~> 13.0"
|
|
44
47
|
<% end %>
|
|
48
|
+
<% if configuration.build_yard %>
|
|
49
|
+
gem "yard", "~> 0.9"
|
|
50
|
+
<% end %>
|
|
45
51
|
end
|
|
46
52
|
|
|
47
53
|
group :test do
|
|
@@ -15,6 +15,9 @@ require "bundler/setup"
|
|
|
15
15
|
<% if configuration.build_rubocop %>
|
|
16
16
|
require "rubocop/rake_task"
|
|
17
17
|
<% end %>
|
|
18
|
+
<% if configuration.build_yard %>
|
|
19
|
+
require "yard"
|
|
20
|
+
<% end %>
|
|
18
21
|
|
|
19
22
|
<% if configuration.build_bundler_leak %>
|
|
20
23
|
Bundler::Plumber::Task.new
|
|
@@ -29,6 +32,12 @@ require "bundler/setup"
|
|
|
29
32
|
RuboCop::RakeTask.new
|
|
30
33
|
<% end %>
|
|
31
34
|
|
|
35
|
+
<% if configuration.build_yard %>
|
|
36
|
+
YARD::Rake::YardocTask.new do |task|
|
|
37
|
+
task.options = ["--title", "<%= configuration.project_label %>", "--output-dir", "doc/yard"]
|
|
38
|
+
end
|
|
39
|
+
<% end %>
|
|
40
|
+
|
|
32
41
|
desc "Run code quality checks"
|
|
33
42
|
task code_quality: %i[<% if configuration.build_bundler_leak %>bundle:leak<% end %> <% if configuration.build_git && configuration.build_git_lint %>git_lint<% end %> <% if configuration.build_reek %>reek<% end %> <% if configuration.build_rubocop %>rubocop<% end %>]
|
|
34
43
|
|
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: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
|
28
28
|
lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
|
|
29
29
|
W2A=
|
|
30
30
|
-----END CERTIFICATE-----
|
|
31
|
-
date: 2022-01-
|
|
31
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
|
32
32
|
dependencies:
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: dry-container
|
|
@@ -194,6 +194,7 @@ files:
|
|
|
194
194
|
- lib/rubysmith/builders/documentation/readme.rb
|
|
195
195
|
- lib/rubysmith/builders/documentation/version.rb
|
|
196
196
|
- lib/rubysmith/builders/git/commit.rb
|
|
197
|
+
- lib/rubysmith/builders/git/ignore.rb
|
|
197
198
|
- lib/rubysmith/builders/git/setup.rb
|
|
198
199
|
- lib/rubysmith/builders/git_hub.rb
|
|
199
200
|
- lib/rubysmith/builders/guard.rb
|
|
@@ -230,6 +231,7 @@ files:
|
|
|
230
231
|
- lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb
|
|
231
232
|
- lib/rubysmith/templates/%project_name%/.github/ISSUE_TEMPLATE.md.erb
|
|
232
233
|
- lib/rubysmith/templates/%project_name%/.github/PULL_REQUEST_TEMPLATE.md.erb
|
|
234
|
+
- lib/rubysmith/templates/%project_name%/.gitignore.erb
|
|
233
235
|
- lib/rubysmith/templates/%project_name%/.reek.yml.erb
|
|
234
236
|
- lib/rubysmith/templates/%project_name%/.rubocop.yml.erb
|
|
235
237
|
- lib/rubysmith/templates/%project_name%/.ruby-version.erb
|
metadata.gz.sig
CHANGED
|
Binary file
|