···11+# Ratproto
22+33+TODO: Delete this and the text below, and describe your gem
44+55+Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ratproto`. To experiment with that code, run `bin/console` for an interactive prompt.
66+77+## Installation
88+99+TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
1010+1111+Install the gem and add to the application's Gemfile by executing:
1212+1313+```bash
1414+bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
1515+```
1616+1717+If bundler is not being used to manage dependencies, install the gem by executing:
1818+1919+```bash
2020+gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
2121+```
2222+2323+## Usage
2424+2525+TODO: Write usage instructions here
2626+2727+## Development
2828+2929+After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
3030+3131+To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
3232+3333+## Contributing
3434+3535+Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ratproto.
···11+#!/usr/bin/env ruby
22+# frozen_string_literal: true
33+44+require "bundler/setup"
55+require "ratproto"
66+77+# You can add fixtures and/or initialization code here to make experimenting
88+# with your gem easier. You can also use a different console, if you like.
99+1010+require "irb"
1111+IRB.start(__FILE__)
+8
bin/setup
···11+#!/usr/bin/env bash
22+set -euo pipefail
33+IFS=$'\n\t'
44+set -vx
55+66+bundle install
77+88+# Do any other automated setup that you need to do here
+8
lib/ratproto.rb
···11+# frozen_string_literal: true
22+33+require_relative "ratproto/version"
44+55+module Ratproto
66+ class Error < StandardError; end
77+ # Your code goes here...
88+end
+5
lib/ratproto/version.rb
···11+# frozen_string_literal: true
22+33+module Ratproto
44+ VERSION = "0.1.0"
55+end
+39
ratproto.gemspec
···11+# frozen_string_literal: true
22+33+require_relative "lib/ratproto/version"
44+55+Gem::Specification.new do |spec|
66+ spec.name = "ratproto"
77+ spec.version = Ratproto::VERSION
88+ spec.authors = ["Kuba Suder"]
99+ spec.email = ["jakub.suder@gmail.com"]
1010+1111+ spec.summary = "TODO: Write a short summary, because RubyGems requires one."
1212+ spec.description = "TODO: Write a longer description or delete this line."
1313+ spec.homepage = "TODO: Put your gem's website or public repo URL here."
1414+ spec.required_ruby_version = ">= 3.2.0"
1515+1616+ spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
1717+ spec.metadata["homepage_uri"] = spec.homepage
1818+ spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
1919+ spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
2020+2121+ # Specify which files should be added to the gem when it is released.
2222+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
2323+ gemspec = File.basename(__FILE__)
2424+ spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
2525+ ls.readlines("\x0", chomp: true).reject do |f|
2626+ (f == gemspec) ||
2727+ f.start_with?(*%w[bin/ Gemfile .gitignore .rspec spec/ .github/])
2828+ end
2929+ end
3030+ spec.bindir = "exe"
3131+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
3232+ spec.require_paths = ["lib"]
3333+3434+ # Uncomment to register a new dependency of your gem
3535+ # spec.add_dependency "example-gem", "~> 1.0"
3636+3737+ # For more information and examples about making a new gem, check out our
3838+ # guide at: https://bundler.io/guides/creating_gem.html
3939+end
+4
sig/ratproto.rbs
···11+module Ratproto
22+ VERSION: String
33+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
44+end
+11
spec/ratproto_spec.rb
···11+# frozen_string_literal: true
22+33+RSpec.describe Ratproto do
44+ it "has a version number" do
55+ expect(Ratproto::VERSION).not_to be nil
66+ end
77+88+ it "does something useful" do
99+ expect(false).to eq(true)
1010+ end
1111+end
+15
spec/spec_helper.rb
···11+# frozen_string_literal: true
22+33+require "ratproto"
44+55+RSpec.configure do |config|
66+ # Enable flags like --only-failures and --next-failure
77+ config.example_status_persistence_file_path = ".rspec_status"
88+99+ # Disable RSpec exposing methods globally on `Module` and `main`
1010+ config.disable_monkey_patching!
1111+1212+ config.expect_with :rspec do |c|
1313+ c.syntax = :expect
1414+ end
1515+end