scipio 0.6.0 → 0.7.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 +2 -1
- data/CHANGELOG.md +10 -1
- data/README.md +15 -1
- data/lib/scipio/cli.rb +16 -16
- data/lib/scipio/config.rb +4 -4
- data/lib/scipio/gems.rb +20 -15
- data/lib/scipio/rake.rb +8 -6
- data/lib/scipio/version.rb +1 -1
- data/lib/stdlib/string.rb +37 -0
- data/template/{%{gem_name}.gemspec.t → %{gem_name}.gemspec.erb} +3 -3
- data/template/.gitignore +20 -5
- data/template/.standard +1 -0
- data/template/CHANGELOG.md.erb +5 -0
- data/template/{Gemfile → Gemfile.erb} +1 -0
- data/template/{README.md → README.md.erb} +10 -6
- data/template/{Rakefile → Rakefile.erb} +12 -17
- data/template/bin/{%{gem_name} → %{gem_name}.erb} +2 -2
- data/template/lib/{%{gem_name}/cli.rb → %{gem_name_slash}/cli.rb.erb} +2 -2
- data/template/lib/{%{gem_name}/version.rb → %{gem_name_slash}/version.rb.erb} +1 -1
- data/template/lib/%{gem_name_slash}.rb.erb +7 -0
- data/template/sig/%{gem_name_slash}/cli.rbs.erb +13 -0
- data/template/sig/%{gem_name_slash}.rbs.erb +3 -0
- data/template/test/{test_%{gem_name}.rb → %{gem_name_test}.rb.erb} +2 -2
- data.tar.gz.sig +0 -0
- metadata +31 -27
- metadata.gz.sig +0 -0
- data/template/CHANGELOG.md +0 -5
- data/template/lib/%{gem_name}.rb +0 -7
- /data/template/{CODE_OF_CONDUCT.md → CODE_OF_CONDUCT.md.erb} +0 -0
- /data/template/{LICENSE.txt → LICENSE.txt.erb} +0 -0
- /data/template/bin/{console → console.erb} +0 -0
- /data/template/bin/{setup → setup.erb} +0 -0
- /data/template/test/{test_helper.rb → test_helper.rb.erb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea0fe5447366a0cf4667c9c5229bedd8655b4834b723e9ec69af4a01cae2c54d
|
4
|
+
data.tar.gz: 4bdade6cb2e464db6652c74715ae3b36d9b5e7b1285c88f6afe84a350566842c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d08adeb33365c1226e8f7a5cba3a1980c8ac7c138189f3996db45138a22e7fb884d651050a9deecdac4e2802ba78a6177b4b8a795a591f3172178069b41e45
|
7
|
+
data.tar.gz: bb1680babc5f474f2cae62c59d5bfcbb9b7043a57dcba7d89de69521898ecd9b23a154f85b281fe514430b324feb9b74b6fe814056d248c022a55f4c64e6fbd3
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
�
|
1
|
+
w�����!��~ A�e[ǚL��%��H�"Lj]��Cʪ|�D�xC)�l� �d~u�7#�S�w
|
2
|
+
��K%��v���P�7,���`Y;�V�oNQ᠇t���0�>4w�@�ʝH�n@�?��+ǚ9�|�g��VU����Gz�3Ž�Hp��!�!��PI�K��~h}��}Q�����͊M8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Scipio Changelog
|
2
2
|
|
3
|
+
## 0.7.0 - 27 August 2024
|
4
|
+
|
5
|
+
- Breaking changes
|
6
|
+
- bug fix/add support for - hyphens & underscores in gem names
|
7
|
+
- add .erb extensions to the default template files
|
8
|
+
- add RBS files to the default template
|
9
|
+
- Add RBS & type signatures
|
10
|
+
- Some refactoring
|
11
|
+
|
3
12
|
## 0.6.0 - 13 August 2024
|
4
13
|
|
5
|
-
- Initial Ruby release
|
14
|
+
- Initial Ruby release (earlier versions were a Python project)
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ A small CLI utility to:
|
|
5
5
|
- set up local & remote git repos
|
6
6
|
- launch Rake tasks from anywhere
|
7
7
|
|
8
|
-
|
8
|
+
Set up & run Ruby projects with less typing. Scipio. Skip IO. Geddit?
|
9
9
|
|
10
10
|
## Status
|
11
11
|
|
@@ -13,6 +13,20 @@ Early days. Development status "3 - Alpha" in Python terms.
|
|
13
13
|
|
14
14
|
(Those Python statuses are 1 - Planning, 2 - Pre-alpha, 3 - Alpha, 4 - Beta, 5 - Production/Stable, 6 - Mature, 7 - Inactive.)
|
15
15
|
|
16
|
+
## Why
|
17
|
+
|
18
|
+
I'm a big fan of Bundler & Gem as package management tools. But I'm not a fan of the assumptions about licensing (MIT or nothing), repos (just Github), & Rake that are baked into the Bundler gem command. So I built Scipio, to make gem setup a user choice. It seemed a natural place to add the ability to run Rake scripts from anywhere.
|
19
|
+
|
20
|
+
## Installation
|
21
|
+
|
22
|
+
`gem install scipio`
|
23
|
+
|
24
|
+
You will need to have Git and Berg installed and configured, as well as the Rake gem, in order to use them all via Scipio.
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
...
|
29
|
+
|
16
30
|
## Ancient history
|
17
31
|
|
18
32
|
<img src="./Scipio.png" alt="Scipio Africanus, OG" />
|
data/lib/scipio/cli.rb
CHANGED
@@ -20,14 +20,14 @@ module Scipio
|
|
20
20
|
|
21
21
|
Commands:
|
22
22
|
BANNER
|
23
|
-
|
24
|
-
help(opts)
|
25
|
-
init(opts)
|
26
|
-
local(opts)
|
27
|
-
naked_repo(opts)
|
28
|
-
rake(opts)
|
29
|
-
|
30
|
-
version(opts)
|
23
|
+
gems(opts:)
|
24
|
+
help(opts:)
|
25
|
+
init(opts:)
|
26
|
+
local(opts:)
|
27
|
+
naked_repo(opts:)
|
28
|
+
rake(opts:)
|
29
|
+
tasks(opts:)
|
30
|
+
version(opts:)
|
31
31
|
end.parse!
|
32
32
|
|
33
33
|
create_gem
|
@@ -38,20 +38,20 @@ module Scipio
|
|
38
38
|
# don't have opts here to show help
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def gems(opts:)
|
42
42
|
opts.on("-g GEM", "--gem GEM", "Create a new ruby gem named GEM") do |opt|
|
43
43
|
@options[:gem] = opt
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
def help(opts)
|
47
|
+
def help(opts:)
|
48
48
|
opts.on("-h", "--help", "This help message") do
|
49
49
|
puts opts
|
50
50
|
exit
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def init(opts)
|
54
|
+
def init(opts:)
|
55
55
|
opts.on("-i", "--initialize", "Initialize config & template files, show details if they exist") do
|
56
56
|
config = Scipio::Config.new
|
57
57
|
config.info
|
@@ -60,31 +60,31 @@ module Scipio
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def local(opts)
|
63
|
+
def local(opts:)
|
64
64
|
opts.on("-l", "--local", "With a gem or repo, do not create or connect to the origin") do
|
65
65
|
@options[:local] = true
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
def naked_repo(opts)
|
69
|
+
def naked_repo(opts:)
|
70
70
|
opts.on("-n REPO", "--naked REPO", "Create a new naked git repo named REPO") do |opt|
|
71
71
|
@options[:repo] = opt
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
def rake(opts)
|
75
|
+
def rake(opts:)
|
76
76
|
opts.on("-r RAKE", "--rake RAKE", "Run Rake in directory RAKE, or named RAKE in config") do |opt|
|
77
77
|
@options[:rake] = opt
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
81
|
+
def tasks(opts:)
|
82
82
|
opts.on("-t TASK", "--task TASK", "Rake task, use -t -T to list tasks, leave off for the default task") do |opt|
|
83
83
|
@options[:task] = opt
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
def version(opts)
|
87
|
+
def version(opts:)
|
88
88
|
opts.on("-v", "--version", "The version") do
|
89
89
|
puts Scipio::VERSION
|
90
90
|
exit
|
data/lib/scipio/config.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require "yaml"
|
4
4
|
|
5
5
|
module Scipio
|
6
|
-
#
|
6
|
+
# Persist & use configuration
|
7
7
|
class Config
|
8
8
|
attr_reader :git_dir,
|
9
9
|
:git_domain,
|
@@ -60,7 +60,7 @@ module Scipio
|
|
60
60
|
parse_git_config
|
61
61
|
parse_berg_user_info
|
62
62
|
parse_berg_config
|
63
|
-
@git_site =
|
63
|
+
@git_site = File.join(@git_site, @user_name)
|
64
64
|
FileUtils.mkdir_p(Config.template_dir)
|
65
65
|
save_file
|
66
66
|
end
|
@@ -124,8 +124,8 @@ module Scipio
|
|
124
124
|
"rake" => {
|
125
125
|
"name" => "path"
|
126
126
|
}}
|
127
|
-
|
128
|
-
File.write(Config.config_file,
|
127
|
+
yaml = config.to_yaml
|
128
|
+
File.write(Config.config_file, yaml)
|
129
129
|
end
|
130
130
|
|
131
131
|
# ~/.Config -> @user_email, @user_fullname
|
data/lib/scipio/gems.rb
CHANGED
@@ -6,6 +6,7 @@ require "fileutils"
|
|
6
6
|
require "pathname"
|
7
7
|
|
8
8
|
require_relative "config"
|
9
|
+
require_relative "../stdlib/string"
|
9
10
|
|
10
11
|
module Scipio
|
11
12
|
# Create the skeleton of a new Gem
|
@@ -18,6 +19,8 @@ module Scipio
|
|
18
19
|
@git_dir = config.git_dir
|
19
20
|
@template_dir = Config.template_dir
|
20
21
|
@vars = {gem_name: @gem_name,
|
22
|
+
gem_name_slash: @gem_name.slash,
|
23
|
+
gem_name_test: @gem_name.test,
|
21
24
|
git_site: config.git_site,
|
22
25
|
user_name: config.user_name,
|
23
26
|
user_fullname: config.user_fullname,
|
@@ -25,31 +28,41 @@ module Scipio
|
|
25
28
|
date: DateTime.now}
|
26
29
|
end
|
27
30
|
|
28
|
-
def
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
def init
|
32
|
+
FileUtils.mkdir_p @template_dir
|
33
|
+
unless Dir.empty? @template_dir
|
34
|
+
puts "Templates directory not empty - #{@template_dir}"
|
35
|
+
exit
|
36
|
+
end
|
37
|
+
FileUtils.cp_r(@gem_default_templates, @config_dir)
|
33
38
|
end
|
34
39
|
|
35
40
|
def relative_out_path(path_from:)
|
36
41
|
out = Pathname.new(path_from)
|
37
42
|
.relative_path_from(@template_dir)
|
38
43
|
.to_s
|
39
|
-
.chomp(".
|
44
|
+
.chomp(".erb")
|
40
45
|
out % @vars
|
41
46
|
end
|
42
47
|
|
48
|
+
def templates
|
49
|
+
# except for dot files this could be... Dir[File.join(dir, "**/*")]
|
50
|
+
filter_types = %w[. .. .DS_Store]
|
51
|
+
Dir.glob(File.join(@template_dir, "**/*"), File::FNM_DOTMATCH)
|
52
|
+
.select { |file| !file.end_with?(*filter_types) }
|
53
|
+
end
|
54
|
+
|
43
55
|
def write
|
44
56
|
out_dir = File.join(@git_dir, @gem_name)
|
45
57
|
# create_out_dir(out_dir:)
|
46
|
-
templates
|
58
|
+
templates.each do |path_from|
|
47
59
|
path_to = File.join(out_dir, relative_out_path(path_from:))
|
48
60
|
|
49
61
|
if File.directory? path_from
|
50
62
|
FileUtils.mkdir_p path_to
|
51
63
|
else
|
52
64
|
puts path_to # TODO: unless silent
|
65
|
+
FileUtils.mkdir_p Pathname(path_to).dirname # just in case
|
53
66
|
template = ERB.new(File.read(path_from))
|
54
67
|
IO.write(path_to, template.result_with_hash(@vars))
|
55
68
|
end
|
@@ -57,13 +70,5 @@ module Scipio
|
|
57
70
|
end
|
58
71
|
|
59
72
|
# copy the default template files for users to modify or use
|
60
|
-
def init
|
61
|
-
FileUtils.mkdir_p @template_dir
|
62
|
-
unless Dir.empty? @template_dir
|
63
|
-
puts "Templates directory not empty - #{@template_dir}"
|
64
|
-
exit
|
65
|
-
end
|
66
|
-
FileUtils.cp_r(@gem_default_templates, @config_dir)
|
67
|
-
end
|
68
73
|
end
|
69
74
|
end
|
data/lib/scipio/rake.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "bundler"
|
2
4
|
|
3
5
|
module Scipio
|
@@ -29,14 +31,14 @@ module Scipio
|
|
29
31
|
# try for a directory, then an entry in the config
|
30
32
|
# TODO: note - watch out for directories in the directory you're calling scipio from,
|
31
33
|
# rake will search the tree upwards from any directory it uses
|
32
|
-
def try_dir
|
34
|
+
def try_dir
|
33
35
|
dir =
|
34
|
-
if File.directory?(File.expand_path(rake))
|
35
|
-
rake
|
36
|
-
elsif @dir.key?(rake) && File.directory?(File.expand_path(@dir[rake]))
|
37
|
-
@dir[rake]
|
36
|
+
if File.directory?(File.expand_path(@rake))
|
37
|
+
@rake
|
38
|
+
elsif @dir.key?(@rake) && File.directory?(File.expand_path(@dir[@rake]))
|
39
|
+
@dir[@rake]
|
38
40
|
else
|
39
|
-
p "Don't know directory or config entry - #{rake}"
|
41
|
+
p "Don't know directory or config entry - #{@rake}"
|
40
42
|
exit
|
41
43
|
end
|
42
44
|
File.expand_path(dir)
|
data/lib/scipio/version.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Extending the String class just like I promised I'd never do
|
4
|
+
class String
|
5
|
+
# these_words to TheseWords, this to This
|
6
|
+
def camelize
|
7
|
+
split("_").map { |word| word.capitalize_first }.join
|
8
|
+
end
|
9
|
+
|
10
|
+
# worD to WordD (& not Word, which is what capitalize would do)
|
11
|
+
def capitalize_first
|
12
|
+
sub(/\w/) { |word| word.upcase }
|
13
|
+
end
|
14
|
+
|
15
|
+
# these-words to These::Words - used for Module names
|
16
|
+
def colonize
|
17
|
+
# sub("-", "::")
|
18
|
+
split("-").map { |word| word.capitalize_first }.join("::")
|
19
|
+
end
|
20
|
+
|
21
|
+
# this/and/that to that - used in require_relative
|
22
|
+
def last_part
|
23
|
+
File.basename(tr("-", "/"))
|
24
|
+
end
|
25
|
+
|
26
|
+
# these-words to these/words - used in file paths
|
27
|
+
def slash
|
28
|
+
tr("-", "/")
|
29
|
+
end
|
30
|
+
|
31
|
+
# these-words to these/test_words
|
32
|
+
def test
|
33
|
+
slashed = slash
|
34
|
+
last = slashed.last_part
|
35
|
+
slashed.sub(/.*\K#{last}/, "test_#{last}")
|
36
|
+
end
|
37
|
+
end
|
@@ -4,11 +4,11 @@
|
|
4
4
|
# lib = File.expand_path("lib", __dir__)
|
5
5
|
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
6
|
|
7
|
-
require_relative "lib/<%= gem_name %>/version"
|
7
|
+
require_relative "lib/<%= gem_name.slash %>/version"
|
8
8
|
|
9
9
|
Gem::Specification.new do |spec|
|
10
10
|
spec.name = "<%= gem_name %>"
|
11
|
-
spec.version = <%= gem_name.
|
11
|
+
spec.version = <%= gem_name.colonize.camelize %>::VERSION
|
12
12
|
spec.authors = ["<%= user_fullname %>"]
|
13
13
|
spec.email = ["<%= user_email %>"]
|
14
14
|
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.description = <<~DESC
|
17
17
|
TODO: Longer description
|
18
18
|
DESC
|
19
|
-
spec.homepage = "<%= git_site %>/<%=
|
19
|
+
spec.homepage = "<%= git_site %>/<%= gem_name %>"
|
20
20
|
spec.license = "AGPL-3.0-or-later"
|
21
21
|
spec.required_ruby_version = ">= 3.3"
|
22
22
|
|
data/template/.gitignore
CHANGED
@@ -1,11 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
4
|
/coverage/
|
5
|
-
/
|
5
|
+
/InstalledFiles
|
6
6
|
/pkg/
|
7
7
|
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
8
11
|
/tmp/
|
9
12
|
|
10
|
-
|
13
|
+
/.yardoc/
|
14
|
+
/_yardoc/
|
15
|
+
/doc/
|
16
|
+
/rdoc/
|
17
|
+
|
18
|
+
/.bundle/
|
19
|
+
/vendor/bundle
|
20
|
+
/lib/bundler/man/
|
21
|
+
|
22
|
+
.DS_Store
|
23
|
+
.env
|
24
|
+
.idea
|
11
25
|
.rspec_status
|
26
|
+
.ruby-lsp
|
data/template/.standard
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby_version: 3.3
|
@@ -2,19 +2,23 @@
|
|
2
2
|
|
3
3
|
...
|
4
4
|
|
5
|
-
##
|
5
|
+
## Status
|
6
6
|
|
7
|
-
...
|
7
|
+
... in Python terms.
|
8
8
|
|
9
|
-
|
9
|
+
(Those Python statuses are 1 - Planning, 2 - Pre-alpha, 3 - Alpha, 4 - Beta, 5 - Production/Stable, 6 - Mature, 7 - Inactive.)
|
10
|
+
|
11
|
+
## Why
|
10
12
|
|
11
13
|
...
|
12
14
|
|
13
|
-
##
|
15
|
+
## Installation
|
14
16
|
|
15
|
-
|
17
|
+
`gem install <%= gem_name %>`
|
16
18
|
|
17
|
-
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
...
|
18
22
|
|
19
23
|
## Development
|
20
24
|
|
@@ -2,32 +2,31 @@
|
|
2
2
|
|
3
3
|
require "digest/sha2"
|
4
4
|
require "minitest/test_task"
|
5
|
-
require "reek/rake/task"
|
6
5
|
require "standard/rake"
|
7
6
|
|
8
|
-
require_relative "lib/<%= gem_name %>/version"
|
7
|
+
require_relative "lib/<%= gem_name.slash %>/version"
|
9
8
|
|
10
9
|
Minitest::TestTask.create
|
11
10
|
|
12
11
|
namespace :build do
|
13
12
|
def check
|
14
|
-
built_gem_path = "pkg/<%= gem_name %>-#{<%= gem_name.
|
13
|
+
built_gem_path = "pkg/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem"
|
15
14
|
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
16
|
-
checksum_path = "./checksums/<%= gem_name %>-#{<%= gem_name.
|
15
|
+
checksum_path = "./checksums/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem.sha512"
|
17
16
|
FileUtils.rm(Dir.glob("./checksums/*"))
|
18
17
|
File.write(checksum_path, checksum)
|
19
18
|
end
|
20
19
|
|
21
20
|
def signed_build
|
22
21
|
ENV["UNSIGNED_BUILD"] = "false"
|
23
|
-
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.
|
22
|
+
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.colonize %>::VERSION}.gem"
|
24
23
|
end
|
25
24
|
|
26
25
|
desc "Unsigned build & local install, update the repo's checksum"
|
27
26
|
task :local do
|
28
27
|
ENV["UNSIGNED_BUILD"] = "true"
|
29
|
-
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.
|
30
|
-
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.
|
28
|
+
sh "bundle exec gem build <%= gem_name %>.gemspec --output=./pkg/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem"
|
29
|
+
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem -P MediumSecurity"
|
31
30
|
check
|
32
31
|
end
|
33
32
|
|
@@ -35,7 +34,7 @@ namespace :build do
|
|
35
34
|
task :local_sy do
|
36
35
|
signed_build
|
37
36
|
check
|
38
|
-
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.
|
37
|
+
sh "bundle exec gem install ./pkg/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem -P HighSecurity"
|
39
38
|
end
|
40
39
|
|
41
40
|
desc "Publish it - this will build & sign, then commit, push and publish"
|
@@ -45,17 +44,13 @@ namespace :build do
|
|
45
44
|
check
|
46
45
|
# tag git repo
|
47
46
|
sh "git add ."
|
48
|
-
sh "git commit -m \"v#{<%= gem_name.
|
49
|
-
sh "git tag -s v#{<%= gem_name.
|
50
|
-
sh "git push origin \"v#{<%= gem_name.
|
47
|
+
sh "git commit -m \"v#{<%= gem_name.colonize.camelize %>::VERSION}\""
|
48
|
+
sh "git tag -s v#{<%= gem_name.colonize.camelize %>::VERSION} -m \"v#{<%= gem_name.colonize.camelize %>::VERSION}\""
|
49
|
+
sh "git push origin \"v#{<%= gem_name.colonize.camelize %>::VERSION}\""
|
51
50
|
sh "git push"
|
52
51
|
# publish to rubygems, will require OTP
|
53
|
-
sh "gem push ./pkg/<%= gem_name %>-#{<%= gem_name.
|
52
|
+
sh "gem push ./pkg/<%= gem_name %>-#{<%= gem_name.colonize.camelize %>::VERSION}.gem"
|
54
53
|
end
|
55
54
|
end
|
56
55
|
|
57
|
-
|
58
|
-
t.fail_on_error = false
|
59
|
-
end
|
60
|
-
|
61
|
-
task default: %i[standard:fix reek]
|
56
|
+
task default: %i[standard:fix]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "optparse"
|
4
4
|
|
5
|
-
module <%= gem_name.
|
5
|
+
module <%= gem_name.colonize.camelize %>
|
6
6
|
# CLI handled by optparse
|
7
7
|
class CLI
|
8
8
|
def start(*_args)
|
@@ -35,7 +35,7 @@ module <%= gem_name.capitalize %>
|
|
35
35
|
|
36
36
|
def version(opts)
|
37
37
|
opts.on("-v", "--version", "The version") do
|
38
|
-
puts <%= gem_name.
|
38
|
+
puts <%= gem_name.colonize.camelize %>::VERSION
|
39
39
|
exit
|
40
40
|
end
|
41
41
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module <%= gem_name.colonize.camelize %>
|
2
|
+
class CLI
|
3
|
+
@options: Hash[String, String]
|
4
|
+
|
5
|
+
def help:(opts: OptionParser) -> void
|
6
|
+
|
7
|
+
def options_other:(opts: OptionParser) -> void
|
8
|
+
|
9
|
+
def start:(Array[untyped] _args) -> void
|
10
|
+
|
11
|
+
def version: -> void
|
12
|
+
end
|
13
|
+
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require "test_helper"
|
4
4
|
|
5
|
-
class Test<%= gem_name.
|
5
|
+
class Test<%= gem_name.test %> < Minitest::Test
|
6
6
|
def test_that_it_has_a_version_number
|
7
|
-
refute_nil ::<%= gem_name.
|
7
|
+
refute_nil ::<%= gem_name.colonize.camelize %>::VERSION
|
8
8
|
end
|
9
9
|
|
10
10
|
def test_it_does_something_useful
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scipio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Kreuzer
|
@@ -12,7 +12,7 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ0wCwYDVQQDDARtaWtl
|
14
14
|
MRswGQYKCZImiZPyLGQBGRYLbWlrZWtyZXV6ZXIxEzARBgoJkiaJk/IsZAEZFgNj
|
15
|
-
|
15
|
+
b20wHhcNMjQwODEzMDczOTMzWhcNMjUwODEzMDczOTMzWjBBMQ0wCwYDVQQDDARt
|
16
16
|
aWtlMRswGQYKCZImiZPyLGQBGRYLbWlrZWtyZXV6ZXIxEzARBgoJkiaJk/IsZAEZ
|
17
17
|
FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCmglRYFT8KQzXy
|
18
18
|
FfR96x8RTRUmk3ahagfIoH8gkCLrTpKL6qmEbzRBrmg3utjAMooQK3xn0aLwVq6T
|
@@ -25,17 +25,17 @@ cert_chain:
|
|
25
25
|
xfs+km5aTprQKQHK1IpLcWQ/23KbZbOHS0sJjem1WzbzBBtHHhcCAwEAAaN7MHkw
|
26
26
|
CQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFKf5PbSu3EXt0eEsHMty
|
27
27
|
EisanEBpMB8GA1UdEQQYMBaBFG1pa2VAbWlrZWtyZXV6ZXIuY29tMB8GA1UdEgQY
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
/
|
28
|
+
MBaBFG1pa2VAbWlrZWtyZXV6ZXIuY29tMA0GCSqGSIb3DQEBCwUAA4IBgQAhdHiW
|
29
|
+
TwKU2JWbPUrErM3Pnu+2J7jzXuUWiGVg0toGn/lEPOm3crvBSXIWSCnHNFVMV90W
|
30
|
+
QuKUVButhH5u+WjzriBkuG6zIUfjSxBDVehLZoGo8E27PO58pBzPgWD7ZRS0S0H6
|
31
|
+
d1PFSPLTFvm2AkwOM9pXQxAXeCg25vkEbFeKBi147/++7tmsnU0pMYnSmuUUBFFu
|
32
|
+
QMr7UTxT0d6wnmTMErqPmD+VMnyGvX62aMqXAyL0FMZDJeVzoeEii2CYS4L9qkwY
|
33
|
+
PLWx2xbdV0LcT/Har9JmYX7b/Cio/tH023rZ++nPeD0k6n2nGfm+IVlknHM571c9
|
34
|
+
7sfPFxBucVUXL1sPl9GcQbMjfL+t7QS1rr2PhRuwCsRTStNcNZaRCd/mZUKKP+3l
|
35
|
+
YgqTixCwts6cQYIdYNFtJbzKvRNqyviKKxPaum7UWAv6Uy80gxgJ8p+fG81FsxbZ
|
36
|
+
0ULnXrHlhf/CHs550TxRlXalgxBCImGdHzWjhdJeC1dZP3olgNtjO23ywtw=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-08-
|
38
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
39
39
|
dependencies: []
|
40
40
|
description: |
|
41
41
|
A small CLI utility to:
|
@@ -62,25 +62,29 @@ files:
|
|
62
62
|
- lib/scipio/git.rb
|
63
63
|
- lib/scipio/rake.rb
|
64
64
|
- lib/scipio/version.rb
|
65
|
-
-
|
65
|
+
- lib/stdlib/string.rb
|
66
|
+
- template/%{gem_name}.gemspec.erb
|
66
67
|
- template/.gitignore
|
67
|
-
- template
|
68
|
-
- template/
|
69
|
-
- template/
|
70
|
-
- template/
|
71
|
-
- template/
|
72
|
-
- template/
|
73
|
-
- template/
|
74
|
-
- template/bin
|
75
|
-
- template/bin/
|
68
|
+
- template/.standard
|
69
|
+
- template/CHANGELOG.md.erb
|
70
|
+
- template/CODE_OF_CONDUCT.md.erb
|
71
|
+
- template/Gemfile.erb
|
72
|
+
- template/LICENSE.txt.erb
|
73
|
+
- template/README.md.erb
|
74
|
+
- template/Rakefile.erb
|
75
|
+
- template/bin/%{gem_name}.erb
|
76
|
+
- template/bin/console.erb
|
77
|
+
- template/bin/setup.erb
|
76
78
|
- template/certs/.gitkeep
|
77
79
|
- template/checksums/.gitkeep
|
78
|
-
- template/lib/%{
|
79
|
-
- template/lib/%{
|
80
|
-
- template/lib/%{
|
80
|
+
- template/lib/%{gem_name_slash}.rb.erb
|
81
|
+
- template/lib/%{gem_name_slash}/cli.rb.erb
|
82
|
+
- template/lib/%{gem_name_slash}/version.rb.erb
|
81
83
|
- template/pkg/.gitkeep
|
82
|
-
- template/
|
83
|
-
- template/
|
84
|
+
- template/sig/%{gem_name_slash}.rbs.erb
|
85
|
+
- template/sig/%{gem_name_slash}/cli.rbs.erb
|
86
|
+
- template/test/%{gem_name_test}.rb.erb
|
87
|
+
- template/test/test_helper.rb.erb
|
84
88
|
homepage: https://codeberg.org/kreuzer/scipio
|
85
89
|
licenses:
|
86
90
|
- AGPL-3.0-or-later
|
metadata.gz.sig
CHANGED
Binary file
|
data/template/CHANGELOG.md
DELETED
data/template/lib/%{gem_name}.rb
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|