ruby-repo-canary 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e4339b12d04645ef481d8d832d9088d4c0462b0ffd273aa3004384a41ffbf3ca
4
+ data.tar.gz: 5616fc641573c9d984cd22c3ff84b63545f59f513581ead4ae3a8b1fab53cd95
5
+ SHA512:
6
+ metadata.gz: ed8921af0d0508ac34b4492c2e5ccc2373f25a6cd4f7b11aed1ff94964dcf1298ea901ac92b06eeb2b7101fa2dc6e0282deb238bff40de5698553e6342dc6876
7
+ data.tar.gz: 1b52baa94d00ec46e2f30e06e501e2a793fe20b30f3dc20718a69274a65feae48d8efe0451e843dbc686fc1448b5a16e8fc621dea3ade8763929db44b5f1a76e
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable user-visible changes are documented here.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.0] - 2026-10-05
8
+
9
+ ### Added
10
+
11
+ - Initial text-printing CLI with help, version and predictable exit statuses.
12
+
13
+ [Unreleased]: https://github.com/hvpaiva/ruby-repo-canary/compare/v0.1.0...HEAD
14
+ [0.1.0]: https://github.com/hvpaiva/ruby-repo-canary/releases/tag/v0.1.0
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Highlander Paiva
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # ruby-repo-canary
2
+
3
+ A small Ruby CLI that prints its text arguments separated by spaces.
4
+
5
+ Requires Ruby 3.4 or newer. This initial implementation has no external service
6
+ dependencies.
7
+
8
+ ## Usage
9
+
10
+ ruby-repo-canary hello world
11
+ ruby-repo-canary --help
12
+ ruby-repo-canary --version
13
+ ruby-repo-canary -- --text-starting-with-a-dash
14
+
15
+ Successful output goes to stdout. Invalid options and missing text go to stderr
16
+ with exit status 2. A closed output pipe exits cleanly.
17
+
18
+ ## Install from source
19
+
20
+ gem build ruby-repo-canary.gemspec
21
+ gem install ./ruby-repo-canary-0.1.0.gem
22
+
23
+ This repository's creation does not publish the gem or reserve its name.
24
+ After a release has actually been published, RubyGems installation is available:
25
+
26
+ gem install ruby-repo-canary
27
+
28
+ ## Development
29
+
30
+ bin/setup
31
+ bundle exec rake check
32
+ bundle exec rake audit
33
+
34
+ Commit Gemfile.lock after dependency installation. It pins development tools;
35
+ users installing the gem resolve the dependencies declared in its gemspec.
36
+ The versioned ruby-repo-kit development dependency supplies repository and release
37
+ operations. That gem version must be available from the configured source before
38
+ contributors or hosted CI can install the development bundle.
39
+
40
+ Local checks include Ruby linting, tests with coverage (90% lines, 80% branches),
41
+ repository checks and installation of the built package.
42
+ The separate audit task updates a vulnerability database and
43
+ needs network access. CI additionally checks pull-request commits and exercises
44
+ Ruby 3.4/4.0 on Linux and Ruby 4.0 on macOS. These are configured checks, not a
45
+ claim that a new repository has already passed them.
46
+
47
+ See [contributing](CONTRIBUTING.md), [architecture](ARCHITECTURE.md),
48
+ [security](SECURITY.md), [conduct](CODE_OF_CONDUCT.md), and
49
+ [release setup](docs/releasing.md).
50
+
51
+ ## License
52
+
53
+ MIT. See [LICENSE.txt](LICENSE.txt).
data/SECURITY.md ADDED
@@ -0,0 +1,11 @@
1
+ # Security
2
+
3
+ Report suspected vulnerabilities privately to contact@hvpaiva.dev. Include the affected
4
+ version, impact and a minimal reproduction; do not disclose private credentials.
5
+ Please avoid a public issue until maintainers have coordinated a fix.
6
+
7
+ Security fixes target the latest released version. If no version has been
8
+ published yet, report issues against the current main branch.
9
+
10
+ The project does not promise a response deadline. Maintainers will assess the
11
+ report, agree on disclosure where possible, and document any published fix.
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "ruby_repo_canary"
5
+
6
+ exit RubyRepoCanary::CLI.run(ARGV)
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "optparse"
4
+
5
+ require_relative "version"
6
+
7
+ module RubyRepoCanary
8
+ class CLI
9
+ def self.run(argv, out: $stdout, err: $stderr)
10
+ new(out: out, err: err).run(argv)
11
+ end
12
+
13
+ def initialize(out:, err:)
14
+ @out = out
15
+ @err = err
16
+ end
17
+
18
+ def run(argv)
19
+ arguments = argv.dup
20
+ requested = nil
21
+ parser = OptionParser.new do |options|
22
+ options.banner = "Usage: ruby-repo-canary [options] TEXT..."
23
+ options.separator ""
24
+ options.separator "Print text, separating arguments with spaces."
25
+ options.on("-h", "--help", "Show this help") { requested = :help }
26
+ options.on("-v", "--version", "Show the version") { requested = :version }
27
+ end
28
+ parser.parse!(arguments)
29
+ return print_result(parser.to_s) if requested == :help
30
+ return print_result(VERSION) if requested == :version
31
+
32
+ raise OptionParser::MissingArgument, "TEXT (see --help)" if arguments.empty?
33
+
34
+ print_result(arguments.join(" "))
35
+ rescue OptionParser::ParseError => e
36
+ @err.puts "ruby-repo-canary: #{e.message}"
37
+ 2
38
+ rescue Errno::EPIPE
39
+ 0
40
+ end
41
+
42
+ private
43
+
44
+ def print_result(value)
45
+ @out.puts value
46
+ @out.flush
47
+ 0
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyRepoCanary
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ruby_repo_canary/version"
4
+ require_relative "ruby_repo_canary/cli"
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-repo-canary
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Highlander Paiva
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: optparse
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0.6'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '0.6'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '1'
32
+ description: Prints positional arguments separated by spaces; includes help and version
33
+ commands.
34
+ email:
35
+ - contact@hvpaiva.dev
36
+ executables:
37
+ - ruby-repo-canary
38
+ extensions: []
39
+ extra_rdoc_files: []
40
+ files:
41
+ - CHANGELOG.md
42
+ - LICENSE.txt
43
+ - README.md
44
+ - SECURITY.md
45
+ - exe/ruby-repo-canary
46
+ - lib/ruby_repo_canary.rb
47
+ - lib/ruby_repo_canary/cli.rb
48
+ - lib/ruby_repo_canary/version.rb
49
+ homepage: https://github.com/hvpaiva/ruby-repo-canary
50
+ licenses:
51
+ - MIT
52
+ metadata:
53
+ source_code_uri: https://github.com/hvpaiva/ruby-repo-canary
54
+ bug_tracker_uri: https://github.com/hvpaiva/ruby-repo-canary/issues
55
+ changelog_uri: https://github.com/hvpaiva/ruby-repo-canary/blob/main/CHANGELOG.md
56
+ documentation_uri: https://github.com/hvpaiva/ruby-repo-canary#readme
57
+ rubygems_mfa_required: 'true'
58
+ allowed_push_host: https://rubygems.org
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '3.4'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubygems_version: 4.0.20
74
+ specification_version: 4
75
+ summary: A small command-line tool that prints text
76
+ test_files: []