Skip to content

Commit

Permalink
Rubocopify gem
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Nov 12, 2023
1 parent 2c463b3 commit 7c287f7
Show file tree
Hide file tree
Showing 18 changed files with 397 additions and 161 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.rubocop_todo.yml linguist-generated
28 changes: 28 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: RuboCop

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

permissions:
contents: read

jobs:
rubocop:
name: RuboCop
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.2']

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: RuboCop
run: bundle exec rubocop
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.1
NewCops: enable
Exclude:
- 'bin/*'
- 'coverage/**/*'
- 'doc/**/*'
- 'gemfiles/*'
- 'vendor/**/*'

Gemspec:
Enabled: false
149 changes: 149 additions & 0 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# frozen_string_literal: true

source 'https://rubygems.org'
gem 'byebug'

# Specify your gem's dependencies in omniauth-cas.gemspec
gemspec

if RUBY_VERSION < "2.2.2"
if RUBY_VERSION < '2.2.2'
# Rack 2 needs Ruby 2.2.2+
gem 'rack', '< 2'
end

gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rake'
gem 'rubocop-rspec'
4 changes: 3 additions & 1 deletion Rakefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env rake
# frozen_string_literal: true

require 'bundler/gem_tasks'

require 'rspec/core/rake_task'
Expand All @@ -11,5 +13,5 @@ RSpec::Core::RakeTask.new(:spec) do |t|
end

task :test do
fail %q{This application uses RSpec. Try running "rake spec"}
raise 'This application uses RSpec. Try running "rake spec"'
end
1 change: 0 additions & 1 deletion lib/omniauth-cas.rb

This file was deleted.

4 changes: 3 additions & 1 deletion lib/omniauth/cas.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

require 'omniauth/cas/version'
require 'omniauth/strategies/cas'
require 'omniauth/strategies/cas'
2 changes: 2 additions & 0 deletions lib/omniauth/cas/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Omniauth
module Cas
VERSION = '2.0.0'
Expand Down
Loading

0 comments on commit 7c287f7

Please sign in to comment.