-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Rubocop with omakse rules, correct them, add to gh workflow
- Loading branch information
1 parent
f9b4be7
commit 0a87253
Showing
10 changed files
with
131 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,21 @@ on: | |
- main | ||
|
||
jobs: | ||
rubocop: | ||
name: RuboCop | ||
runs-on: ubuntu-latest | ||
env: | ||
BUNDLE_ONLY: rubocop | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Ruby and install gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.3.0 | ||
bundler-cache: true | ||
- name: Run Rubocop | ||
run: bundle exec rubocop --parallel | ||
test: | ||
name: ${{ format('Unit tests (Ruby {0})', matrix.ruby-version) }} | ||
runs-on: ubuntu-latest | ||
|
@@ -21,18 +36,19 @@ jobs: | |
- "3.4" | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby and install gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name $NAME | ||
git config --global user.email $EMAIL | ||
env: | ||
NAME: "George Costanza" | ||
EMAIL: "[email protected]" | ||
- name: Run tests | ||
run: bundle exec rake test | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup Ruby and install gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name $NAME | ||
git config --global user.email $EMAIL | ||
env: | ||
NAME: "George Costanza" | ||
EMAIL: "[email protected]" | ||
- name: Run tests | ||
run: bundle exec rake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inherit_gem: | ||
rubocop-rails-omakase: rubocop.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
gemspec | ||
|
||
group :rubocop do | ||
gem "rubocop-rails-omakase", require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'lolcommits/tranzlate/version' | ||
require 'lolcommits/plugin/tranzlate' | ||
require "lolcommits/tranzlate/version" | ||
require "lolcommits/plugin/tranzlate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ require 'lolcommits/tranzlate/version' | |
Gem::Specification.new do |spec| | ||
spec.name = "lolcommits-tranzlate" | ||
spec.version = Lolcommits::Tranzlate::VERSION | ||
spec.authors = ["Matthew Hutchinson"] | ||
spec.email = ["[email protected]"] | ||
spec.summary = %q{lolcommits lolspekk tranzlation plugin} | ||
spec.authors = [ "Matthew Hutchinson" ] | ||
spec.email = [ "[email protected]" ] | ||
spec.summary = %q(lolcommits lolspekk tranzlation plugin) | ||
spec.homepage = "https://github.com/lolcommits/lolcommits-tranzlate" | ||
spec.license = "LGPL-3.0" | ||
spec.description = %q{TRANZLATE YOAR LOLCOMMIT MSG TO LOLSPEKK} | ||
spec.description = %q(TRANZLATE YOAR LOLCOMMIT MSG TO LOLSPEKK) | ||
|
||
spec.metadata = { | ||
"homepage_uri" => "https://github.com/lolcommits/lolcommits-tranzlate", | ||
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec| | |
spec.test_files = `git ls-files -- {test,features}/*`.split("\n") | ||
spec.bindir = "bin" | ||
spec.executables = [] | ||
spec.require_paths = ["lib"] | ||
spec.require_paths = [ "lib" ] | ||
|
||
spec.required_ruby_version = ">= 3.1" | ||
spec.add_runtime_dependency "lolcommits", ">= 0.17.2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) | ||
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) | ||
|
||
# lolcommits gem | ||
require 'lolcommits' | ||
require "lolcommits" | ||
|
||
# lolcommit test helpers | ||
require 'lolcommits/test_helpers/git_repo' | ||
require 'lolcommits/test_helpers/fake_io' | ||
require "lolcommits/test_helpers/git_repo" | ||
require "lolcommits/test_helpers/fake_io" | ||
|
||
# plugin gem test libs | ||
require 'lolcommits/tranzlate' | ||
require 'minitest/autorun' | ||
require "lolcommits/tranzlate" | ||
require "minitest/autorun" | ||
|
||
# swallow all debug output during test runs | ||
def debug(msg); end |