scipio 0.6.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
- checksums.yaml.gz.sig +1 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +661 -0
- data/README.md +38 -0
- data/bin/console +15 -0
- data/bin/scipio +9 -0
- data/bin/setup +8 -0
- data/lib/scipio/cli.rb +144 -0
- data/lib/scipio/config.rb +179 -0
- data/lib/scipio/gems.rb +69 -0
- data/lib/scipio/git.rb +68 -0
- data/lib/scipio/rake.rb +45 -0
- data/lib/scipio/version.rb +5 -0
- data/lib/scipio.rb +7 -0
- data/template/%{gem_name}.gemspec.t +43 -0
- data/template/.gitignore +11 -0
- data/template/CHANGELOG.md +5 -0
- data/template/CODE_OF_CONDUCT.md +131 -0
- data/template/Gemfile +13 -0
- data/template/LICENSE.txt +661 -0
- data/template/README.md +33 -0
- data/template/Rakefile +61 -0
- data/template/bin/%{gem_name} +9 -0
- data/template/bin/console +15 -0
- data/template/bin/setup +8 -0
- data/template/certs/.gitkeep +0 -0
- data/template/checksums/.gitkeep +0 -0
- data/template/lib/%{gem_name}/cli.rb +43 -0
- data/template/lib/%{gem_name}/version.rb +5 -0
- data/template/lib/%{gem_name}.rb +7 -0
- data/template/pkg/.gitkeep +0 -0
- data/template/test/test_%{gem_name}.rb +13 -0
- data/template/test/test_helper.rb +11 -0
- data.tar.gz.sig +0 -0
- metadata +112 -0
- metadata.gz.sig +0 -0
data/template/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# <%= gem_name.capitalize %>
|
2
|
+
|
3
|
+
...
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
...
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
...
|
12
|
+
|
13
|
+
## Status
|
14
|
+
|
15
|
+
... in Python terms.
|
16
|
+
|
17
|
+
(Those Python statuses are 1 - Planning, 2 - Pre-alpha, 3 - Alpha, 4 - Beta, 5 - Production/Stable, 6 - Mature, 7 - Inactive.)
|
18
|
+
|
19
|
+
## Development
|
20
|
+
|
21
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
|
22
|
+
|
23
|
+
To install this gem locally, run `bundle exec rake local`.
|
24
|
+
|
25
|
+
`bundle exec rake -T` to see the current options.
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome at <%= git_site %>/<%= gem_name %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](<%= git_site %>/<%= gem_name %>/src/branch/main/CODE_OF_CONDUCT.md).
|
30
|
+
|
31
|
+
## Code of Conduct
|
32
|
+
|
33
|
+
Everyone interacting in the <%= gem_name.capitalize %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](<%= git_site %>/<%= gem_name %>/src/branch/main/CODE_OF_CONDUCT.md).
|
data/template/Rakefile
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "digest/sha2"
|
4
|
+
require "minitest/test_task"
|
5
|
+
require "reek/rake/task"
|
6
|
+
require "standard/rake"
|
7
|
+
|
8
|
+
require_relative "lib/<%= gem_name %>/version"
|
9
|
+
|
10
|
+
Minitest::TestTask.create
|
11
|
+
|
12
|
+
namespace :build do
|
13
|
+
def check
|
14
|
+
built_gem_path = "pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem"
|
15
|
+
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
16
|
+
checksum_path = "./checksums/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem.sha512"
|
17
|
+
FileUtils.rm(Dir.glob("./checksums/*"))
|
18
|
+
File.write(checksum_path, checksum)
|
19
|
+
end
|
20
|
+
|
21
|
+
def signed_build
|
22
|
+
ENV["UNSIGNED_BUILD"] = "false"
|
23
|
+
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Unsigned build & local install, update the repo's checksum"
|
27
|
+
task :local do
|
28
|
+
ENV["UNSIGNED_BUILD"] = "true"
|
29
|
+
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem"
|
30
|
+
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem -P MediumSecurity"
|
31
|
+
check
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Signed build & local install"
|
35
|
+
task :local_sy do
|
36
|
+
signed_build
|
37
|
+
check
|
38
|
+
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem -P HighSecurity"
|
39
|
+
end
|
40
|
+
|
41
|
+
desc "Publish it - this will build & sign, then commit, push and publish"
|
42
|
+
task :publish do
|
43
|
+
# signed build & checksum update
|
44
|
+
signed_build
|
45
|
+
check
|
46
|
+
# tag git repo
|
47
|
+
sh "git add ."
|
48
|
+
sh "git commit -m \"v#{<%= gem_name.capitalize %>::VERSION}\""
|
49
|
+
sh "git tag -s v#{<%= gem_name.capitalize %>::VERSION} -m \"v#{<%= gem_name.capitalize %>::VERSION}\""
|
50
|
+
sh "git push origin \"v#{<%= gem_name.capitalize %>::VERSION}\""
|
51
|
+
sh "git push"
|
52
|
+
# publish to rubygems, will require OTP
|
53
|
+
sh "gem push ./pkg/<%= gem_name %>-#{<%= gem_name.capitalize %>::VERSION}.gem"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
Reek::Rake::Task.new do |t|
|
58
|
+
t.fail_on_error = false
|
59
|
+
end
|
60
|
+
|
61
|
+
task default: %i[standard:fix reek]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require '<%= gem_name %>'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start
|
data/template/bin/setup
ADDED
File without changes
|
File without changes
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "optparse"
|
4
|
+
|
5
|
+
module <%= gem_name.capitalize %>
|
6
|
+
# CLI handled by optparse
|
7
|
+
class CLI
|
8
|
+
def start(*_args)
|
9
|
+
OptionParser.new do |opts|
|
10
|
+
opts.banner = <<~BANNER
|
11
|
+
<%= gem_name.capitalize %>
|
12
|
+
Expanded help here
|
13
|
+
|
14
|
+
Commands:
|
15
|
+
BANNER
|
16
|
+
help(opts)
|
17
|
+
options_other(opts)
|
18
|
+
version(opts)
|
19
|
+
end.parse!
|
20
|
+
end
|
21
|
+
|
22
|
+
def help(opts)
|
23
|
+
opts.on("-h", "--help", "This help message") do
|
24
|
+
puts opts
|
25
|
+
exit
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def options_other(opts)
|
30
|
+
opts.on("-o", "--other", "Do... other") do |_o|
|
31
|
+
puts "OK"
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def version(opts)
|
37
|
+
opts.on("-v", "--version", "The version") do
|
38
|
+
puts <%= gem_name.capitalize %>::VERSION
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "test_helper"
|
4
|
+
|
5
|
+
class Test<%= gem_name.capitalize %> < Minitest::Test
|
6
|
+
def test_that_it_has_a_version_number
|
7
|
+
refute_nil ::<%= gem_name.capitalize %>::VERSION
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_it_does_something_useful
|
11
|
+
assert true
|
12
|
+
end
|
13
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scipio
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Kreuzer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ0wCwYDVQQDDARtaWtl
|
14
|
+
MRswGQYKCZImiZPyLGQBGRYLbWlrZWtyZXV6ZXIxEzARBgoJkiaJk/IsZAEZFgNj
|
15
|
+
b20wHhcNMjQwODA4MDIzNjEwWhcNMjUwODA4MDIzNjEwWjBBMQ0wCwYDVQQDDARt
|
16
|
+
aWtlMRswGQYKCZImiZPyLGQBGRYLbWlrZWtyZXV6ZXIxEzARBgoJkiaJk/IsZAEZ
|
17
|
+
FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCmglRYFT8KQzXy
|
18
|
+
FfR96x8RTRUmk3ahagfIoH8gkCLrTpKL6qmEbzRBrmg3utjAMooQK3xn0aLwVq6T
|
19
|
+
20uw42HsYxY+/zKAy7lYAg5bJUQ98QNcgKs3N4qUbQdClV5VJQ7on7pHiGLQIT37
|
20
|
+
HU//FP3yUDuf3Lwfrm/DS0T1E0FEkGbKxmsbUsr5ZFwa6YbBM9BPrtckE5DyPNZV
|
21
|
+
N7ueizKxgAO4Buw6FdJnMZ9kdRqFbVkBZRJnbAsiiWHNh/rV8VU9Zux74GGo+HiJ
|
22
|
+
i0r0Ts28hf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8adoXNZO1qAMsqew=
|
37
|
+
-----END CERTIFICATE-----
|
38
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
39
|
+
dependencies: []
|
40
|
+
description: |
|
41
|
+
A small CLI utility to:
|
42
|
+
- set up new Ruby Gems using a configurable template
|
43
|
+
- set up local & remote git repos
|
44
|
+
- launch Rake tasks from anywhere
|
45
|
+
email:
|
46
|
+
- mike@mikekreuzer.com
|
47
|
+
executables:
|
48
|
+
- scipio
|
49
|
+
extensions: []
|
50
|
+
extra_rdoc_files: []
|
51
|
+
files:
|
52
|
+
- CHANGELOG.md
|
53
|
+
- LICENSE.txt
|
54
|
+
- README.md
|
55
|
+
- bin/console
|
56
|
+
- bin/scipio
|
57
|
+
- bin/setup
|
58
|
+
- lib/scipio.rb
|
59
|
+
- lib/scipio/cli.rb
|
60
|
+
- lib/scipio/config.rb
|
61
|
+
- lib/scipio/gems.rb
|
62
|
+
- lib/scipio/git.rb
|
63
|
+
- lib/scipio/rake.rb
|
64
|
+
- lib/scipio/version.rb
|
65
|
+
- template/%{gem_name}.gemspec.t
|
66
|
+
- template/.gitignore
|
67
|
+
- template/CHANGELOG.md
|
68
|
+
- template/CODE_OF_CONDUCT.md
|
69
|
+
- template/Gemfile
|
70
|
+
- template/LICENSE.txt
|
71
|
+
- template/README.md
|
72
|
+
- template/Rakefile
|
73
|
+
- template/bin/%{gem_name}
|
74
|
+
- template/bin/console
|
75
|
+
- template/bin/setup
|
76
|
+
- template/certs/.gitkeep
|
77
|
+
- template/checksums/.gitkeep
|
78
|
+
- template/lib/%{gem_name}.rb
|
79
|
+
- template/lib/%{gem_name}/cli.rb
|
80
|
+
- template/lib/%{gem_name}/version.rb
|
81
|
+
- template/pkg/.gitkeep
|
82
|
+
- template/test/test_%{gem_name}.rb
|
83
|
+
- template/test/test_helper.rb
|
84
|
+
homepage: https://codeberg.org/kreuzer/scipio
|
85
|
+
licenses:
|
86
|
+
- AGPL-3.0-or-later
|
87
|
+
metadata:
|
88
|
+
changelog_uri: https://codeberg.org/kreuzer/scipio/src/branch/main/CHANGELOG.md
|
89
|
+
homepage_uri: https://codeberg.org/kreuzer/scipio
|
90
|
+
rubygems_mfa_required: 'true'
|
91
|
+
source_code_uri: https://codeberg.org/kreuzer/scipio
|
92
|
+
post_install_message:
|
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: '3.3'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubygems_version: 3.5.17
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: A small CLI utility to set up Ruby Gems & git repos, & to run Rake tasks
|
111
|
+
from anywhere
|
112
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|