Initialize Ruby gem

This commit is contained in:
Alex Kotov 2023-05-02 12:57:39 +04:00
parent 4cf2be3f57
commit 5c64924b67
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
9 changed files with 133 additions and 0 deletions

44
.gitignore vendored Normal file
View file

@ -0,0 +1,44 @@
*.gem
*.rbc
*.so
/.byebug_history
/.config/
/.rake_tasks~
/InstalledFiles/
/pkg/
/tmp/
# Used by dotenv library to load environment variables.
/.env
# RSpec configuration and generated files.
/.rspec
/coverage/
/spec/examples.txt
/spec/reports/
/test/tmp/
/test/version_tmp/
# Documentation cache and generated files.
/.yardoc/
/_yardoc/
/doc/
/rdoc/
# Environment normalization.
/.bundle/
/vendor/bundle/
/lib/bundler/man/
# For a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in.
/Gemfile.lock
/.ruby-version
/.ruby-gemset
# Unless supporting rvm < 1.11.0 or doing something fancy, ignore this.
/.rvmrc
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
/.rubocop-https?--*

6
Gemfile Normal file
View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
source 'https://rubygems.org'
# Specify your gem's dependencies in diversipub.gemspec
gemspec

10
Rakefile Normal file
View file

@ -0,0 +1,10 @@
# frozen_string_literal: true
require 'bundler/gem_tasks'
task default: []
desc 'Open development console'
task :console do
sh 'bundle', 'exec', File.expand_path(File.join('bin', 'console'), __dir__)
end

8
bin/console Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'bundler/setup'
require 'diversipub'
require 'pry'
Pry.start

7
bin/setup Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
set -eux
bundle install
# Do any other automated setup that you need to do here

46
diversipub.gemspec Normal file
View file

@ -0,0 +1,46 @@
# frozen_string_literal: true
require_relative 'lib/diversipub/version'
Gem::Specification.new do |spec|
repo = 'https://git.causa-arcana.com/causa-arcana/diversipub'
home = repo
bugs = "#{repo}/issues"
docs = "https://www.rubydoc.info/gems/diversipub/#{Diversipub::VERSION}"
spec.name = 'diversipub'
spec.version = Diversipub::VERSION
spec.license = 'MIT'
spec.homepage = home
spec.platform = Gem::Platform::RUBY
spec.required_ruby_version = '~> 3.0'
spec.authors = ['Alex Kotov']
spec.email = ['kotovalexarian@gmail.com']
spec.summary = ''
spec.description = <<~DESCRIPTION.split("\n").map(&:strip).join ' '
DESCRIPTION
spec.metadata['rubygems_mfa_required'] = 'true'
spec.metadata['homepage_uri'] = home
spec.metadata['source_code_uri'] = home
spec.metadata['bug_tracker_uri'] = bugs
spec.metadata['documentation_uri'] = docs
spec.bindir = 'exe'
spec.require_paths = ['lib']
spec.files = Dir.chdir File.expand_path __dir__ do
`git ls-files -z`.split("\x0").reject do |f|
f.match %r{\A(?:test|spec|features)/}
end
end
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename f }
spec.add_development_dependency 'pry', '~> 0.14'
spec.add_development_dependency 'rake', '~> 13.0'
end

4
exe/diversipub Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'diversipub'

3
lib/diversipub.rb Normal file
View file

@ -0,0 +1,3 @@
# frozen_string_literal: true
require_relative 'diversipub/version'

View file

@ -0,0 +1,5 @@
# frozen_string_literal: true
module Diversipub
VERSION = '0.0.0'
end