diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5e072fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,56 @@ +*.gem +*.rbc +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +# .env + +# Ignore Byebug command history file. +.byebug_history + +## Specific to RubyMotion: +.dat* +.repl_history +build/ +*.bridgesupport +build-iPhoneOS/ +build-iPhoneSimulator/ + +## Specific to RubyMotion (use of CocoaPods): +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# vendor/Pods/ + +## 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?--* diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..822cddd --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,46 @@ +plugins: + - rubocop-performance + - rubocop-rake + - rubocop-minitest + +AllCops: + NewCops: enable + +Layout/LineLength: + Max: 140 + +Metrics/BlockLength: + Exclude: + - 'spec/**/*.rb' + +Layout/ArgumentAlignment: + EnforcedStyle: with_fixed_indentation + +Bundler/OrderedGems: + TreatCommentsAsGroupSeparators: true + +Layout/MultilineMethodCallIndentation: + EnforcedStyle: indented + +Layout/ArrayAlignment: + EnforcedStyle: with_fixed_indentation + +Style/Documentation: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: true + SafeAutoCorrect: true + +Style/TrailingCommaInArguments: + EnforcedStyleForMultiline: comma + +Style/TrailingCommaInArrayLiteral: + EnforcedStyleForMultiline: comma + +Style/TrailingCommaInHashLiteral: + EnforcedStyleForMultiline: comma + +Style/HashSyntax: + Enabled: true + EnforcedShorthandSyntax: always diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..91331ca --- /dev/null +++ b/Rakefile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'rake' +require 'minitest/test_task' +require 'bundler/gem_tasks' +require 'rubocop/rake_task' + +RuboCop::RakeTask.new + +Minitest::TestTask.create(:test) do |task| + task.libs << 'lib' + task.libs << 'test' + task.test_globs = ['test/*/**/*.rb'] + task.warning = true +end + +task default: %i[rubocop test] diff --git a/leopard.gemspec b/leopard.gemspec index 5fda928..4205f41 100644 --- a/leopard.gemspec +++ b/leopard.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |spec| spec.email = ['bougyman@users.noreply.github.com'] spec.summary = 'A server to supervise concurrent NATS ServiceApi workers.' - spec.description = 'Leopard is a puma-like server for managing concurrent NATS ServiceApi endpoint workers' # rubocop:disable Layout/LineLength + spec.description = 'Leopard is a puma-like server for managing concurrent NATS ServiceApi endpoint workers' spec.homepage = 'https://github.com/rubyists/leopard' spec.license = 'MIT' spec.required_ruby_version = '>= 3.3.0' diff --git a/lib/leopard/version.rb b/lib/leopard/version.rb new file mode 100644 index 0000000..be1c23a --- /dev/null +++ b/lib/leopard/version.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module Rubyists + module Leopard + # x-release-please-start-version + VERSION = '0.1.0' + # x-release-please-end + end +end