veragem 0.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 +7 -0
- data/CHANGELOG.md +53 -0
- data/LICENSE-APACHE +201 -0
- data/LICENSE-MIT +7 -0
- data/README.md +151 -0
- data/lib/veragem/generator.rb +109 -0
- data/lib/veragem/name.rb +111 -0
- data/lib/veragem/options.rb +53 -0
- data/lib/veragem/project.rb +77 -0
- data/lib/veragem/version.rb +5 -0
- data/lib/veragem.rb +23 -0
- data/plugins.rb +15 -0
- data/sig/bundler.rbs +10 -0
- data/sig/veragem.rbs +79 -0
- data/template/%name%.gemspec.erb +30 -0
- data/template/.editorconfig +15 -0
- data/template/.githooks/commit-msg +12 -0
- data/template/.githooks/pre-commit +6 -0
- data/template/.githooks/pre-push +17 -0
- data/template/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
- data/template/.github/ISSUE_TEMPLATE/config.yml.erb +5 -0
- data/template/.github/ISSUE_TEMPLATE/documentation.md +19 -0
- data/template/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
- data/template/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- data/template/.github/dependabot.yml +85 -0
- data/template/.github/image-registries.sh +31 -0
- data/template/.github/release-notes.sh +13 -0
- data/template/.github/workflows/dependabot-automerge.yml +70 -0
- data/template/.github/workflows/dependency-review.yml +50 -0
- data/template/.github/workflows/image.yml +140 -0
- data/template/.github/workflows/nix.yml +46 -0
- data/template/.github/workflows/release.yml +117 -0
- data/template/.github/workflows/rubocop-autocorrect.yml +114 -0
- data/template/.github/workflows/ruby-ci.yml +62 -0
- data/template/.github/workflows/security.yml +43 -0
- data/template/.github/workflows/style-check-cocogitto.yml +56 -0
- data/template/.github/workflows/style-check-dprint.yml +44 -0
- data/template/.gitignore +12 -0
- data/template/.rubocop.yml +27 -0
- data/template/AGENTS.md.erb +75 -0
- data/template/CODE_OF_CONDUCT.md.erb +18 -0
- data/template/CONTRIBUTING.md.erb +183 -0
- data/template/Gemfile +24 -0
- data/template/LICENSE-APACHE.erb +201 -0
- data/template/LICENSE-MIT.erb +7 -0
- data/template/README.md.erb +82 -0
- data/template/Rakefile +136 -0
- data/template/SECURITY.md.erb +21 -0
- data/template/Steepfile.erb +11 -0
- data/template/bin/console.erb +8 -0
- data/template/bin/setup +5 -0
- data/template/cliff.toml +70 -0
- data/template/cog.toml +8 -0
- data/template/dprint.json +23 -0
- data/template/exe/%name%.erb +6 -0
- data/template/flake.lock +27 -0
- data/template/flake.nix +213 -0
- data/template/lib/%path%/cli.rb.erb +45 -0
- data/template/lib/%path%/version.rb.erb +3 -0
- data/template/lib/%path%.rb.erb +13 -0
- data/template/sig/%path%.rbs.erb +16 -0
- data/template/test/test_%underscored%.rb.erb +27 -0
- data/template/test/test_cli.rb.erb +40 -0
- data/template/test/test_helper.rb.erb +15 -0
- data/template/typeprof.conf.jsonc +7 -0
- metadata +111 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "test_helper"
|
|
4
|
+
require "<%= path %>/cli"
|
|
5
|
+
|
|
6
|
+
class Test<%= constant.delete(":") %>CLI < Minitest::Test
|
|
7
|
+
# no module of the gem's can be named so: its names have no `_`
|
|
8
|
+
COMMAND_LINE = <%= constant %>::CLI
|
|
9
|
+
|
|
10
|
+
def test_it_greets_the_name_given
|
|
11
|
+
assert_output("Hello, Ada!\n") { assert_equal 0, COMMAND_LINE.run(["Ada"]) }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def test_nobody_named_it_greets_the_world
|
|
15
|
+
assert_output("Hello, world!\n") { assert_equal 0, COMMAND_LINE.run([]) }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def test_version
|
|
19
|
+
expected = "<%= name %> #{<%= constant %>::VERSION}\n"
|
|
20
|
+
assert_output(expected) { assert_equal 0, COMMAND_LINE.run(["--version"]) }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def test_help
|
|
24
|
+
usage = /\AUsage: <%= name %> \[options\] \[NAME\]\n/
|
|
25
|
+
|
|
26
|
+
assert_output(usage) { assert_equal 0, COMMAND_LINE.run(["--help"]) }
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_an_unknown_option_is_refused
|
|
30
|
+
assert_output("", /invalid option: --nope/) { assert_equal 2, COMMAND_LINE.run(["--nope"]) }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def test_the_executable_runs_it
|
|
34
|
+
executable = File.expand_path("../exe/<%= name %>", __dir__)
|
|
35
|
+
lib = File.expand_path("../lib", __dir__)
|
|
36
|
+
out, = capture_subprocess_io { system(RbConfig.ruby, "-I", lib, executable, "Ada", exception: true) }
|
|
37
|
+
|
|
38
|
+
assert_equal "Hello, Ada!\n", out
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Coverage first, before lib/ loads: every line, branch and method of it, a file the tests never
|
|
4
|
+
# load included (`cover`). But version.rb: the gemspec requires it, as Bundler reads the gemspec
|
|
5
|
+
# before any test runs -- a constant alone.
|
|
6
|
+
require "simplecov"
|
|
7
|
+
SimpleCov.start "strict" do
|
|
8
|
+
cover "lib/**/*.rb"
|
|
9
|
+
skip "lib/<%= path %>/version.rb"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require "<%= path %>"
|
|
13
|
+
|
|
14
|
+
require "minitest/autorun"
|
|
15
|
+
require "pbt"
|
metadata
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: veragem
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- veralvx
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: 'A Bundler plugin that generates a Ruby 4.0+ gem with what `bundle gem`
|
|
13
|
+
gives and the rest: Steep and TypeProf, RuboCop and its extensions, Minitest with
|
|
14
|
+
a 100% coverage gate and property tests, bundler-audit, Conventional Commits, a
|
|
15
|
+
generated changelog, a Nix flake, and a release by Trusted Publishing.'
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- CHANGELOG.md
|
|
21
|
+
- LICENSE-APACHE
|
|
22
|
+
- LICENSE-MIT
|
|
23
|
+
- README.md
|
|
24
|
+
- lib/veragem.rb
|
|
25
|
+
- lib/veragem/generator.rb
|
|
26
|
+
- lib/veragem/name.rb
|
|
27
|
+
- lib/veragem/options.rb
|
|
28
|
+
- lib/veragem/project.rb
|
|
29
|
+
- lib/veragem/version.rb
|
|
30
|
+
- plugins.rb
|
|
31
|
+
- sig/bundler.rbs
|
|
32
|
+
- sig/veragem.rbs
|
|
33
|
+
- template/%name%.gemspec.erb
|
|
34
|
+
- template/.editorconfig
|
|
35
|
+
- template/.githooks/commit-msg
|
|
36
|
+
- template/.githooks/pre-commit
|
|
37
|
+
- template/.githooks/pre-push
|
|
38
|
+
- template/.github/ISSUE_TEMPLATE/bug_report.md
|
|
39
|
+
- template/.github/ISSUE_TEMPLATE/config.yml.erb
|
|
40
|
+
- template/.github/ISSUE_TEMPLATE/documentation.md
|
|
41
|
+
- template/.github/ISSUE_TEMPLATE/feature_request.md
|
|
42
|
+
- template/.github/PULL_REQUEST_TEMPLATE.md
|
|
43
|
+
- template/.github/dependabot.yml
|
|
44
|
+
- template/.github/image-registries.sh
|
|
45
|
+
- template/.github/release-notes.sh
|
|
46
|
+
- template/.github/workflows/dependabot-automerge.yml
|
|
47
|
+
- template/.github/workflows/dependency-review.yml
|
|
48
|
+
- template/.github/workflows/image.yml
|
|
49
|
+
- template/.github/workflows/nix.yml
|
|
50
|
+
- template/.github/workflows/release.yml
|
|
51
|
+
- template/.github/workflows/rubocop-autocorrect.yml
|
|
52
|
+
- template/.github/workflows/ruby-ci.yml
|
|
53
|
+
- template/.github/workflows/security.yml
|
|
54
|
+
- template/.github/workflows/style-check-cocogitto.yml
|
|
55
|
+
- template/.github/workflows/style-check-dprint.yml
|
|
56
|
+
- template/.gitignore
|
|
57
|
+
- template/.rubocop.yml
|
|
58
|
+
- template/AGENTS.md.erb
|
|
59
|
+
- template/CODE_OF_CONDUCT.md.erb
|
|
60
|
+
- template/CONTRIBUTING.md.erb
|
|
61
|
+
- template/Gemfile
|
|
62
|
+
- template/LICENSE-APACHE.erb
|
|
63
|
+
- template/LICENSE-MIT.erb
|
|
64
|
+
- template/README.md.erb
|
|
65
|
+
- template/Rakefile
|
|
66
|
+
- template/SECURITY.md.erb
|
|
67
|
+
- template/Steepfile.erb
|
|
68
|
+
- template/bin/console.erb
|
|
69
|
+
- template/bin/setup
|
|
70
|
+
- template/cliff.toml
|
|
71
|
+
- template/cog.toml
|
|
72
|
+
- template/dprint.json
|
|
73
|
+
- template/exe/%name%.erb
|
|
74
|
+
- template/flake.lock
|
|
75
|
+
- template/flake.nix
|
|
76
|
+
- template/lib/%path%.rb.erb
|
|
77
|
+
- template/lib/%path%/cli.rb.erb
|
|
78
|
+
- template/lib/%path%/version.rb.erb
|
|
79
|
+
- template/sig/%path%.rbs.erb
|
|
80
|
+
- template/test/test_%underscored%.rb.erb
|
|
81
|
+
- template/test/test_cli.rb.erb
|
|
82
|
+
- template/test/test_helper.rb.erb
|
|
83
|
+
- template/typeprof.conf.jsonc
|
|
84
|
+
homepage: https://github.com/veralvx/veragem
|
|
85
|
+
licenses:
|
|
86
|
+
- MIT
|
|
87
|
+
- Apache-2.0
|
|
88
|
+
metadata:
|
|
89
|
+
source_code_uri: https://github.com/veralvx/veragem
|
|
90
|
+
changelog_uri: https://github.com/veralvx/veragem/blob/main/CHANGELOG.md
|
|
91
|
+
bug_tracker_uri: https://github.com/veralvx/veragem/issues
|
|
92
|
+
rubygems_mfa_required: 'true'
|
|
93
|
+
rdoc_options: []
|
|
94
|
+
require_paths:
|
|
95
|
+
- lib
|
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
|
+
requirements:
|
|
98
|
+
- - ">="
|
|
99
|
+
- !ruby/object:Gem::Version
|
|
100
|
+
version: '4.0'
|
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
|
+
requirements:
|
|
103
|
+
- - ">="
|
|
104
|
+
- !ruby/object:Gem::Version
|
|
105
|
+
version: '0'
|
|
106
|
+
requirements: []
|
|
107
|
+
rubygems_version: 4.0.20
|
|
108
|
+
specification_version: 4
|
|
109
|
+
summary: 'Bundler plugin: bundle veragem NAME generates a Ruby gem with its toolchain
|
|
110
|
+
wired up'
|
|
111
|
+
test_files: []
|