Skip to content

Commit

Permalink
Merge pull request #4 from ifad/chore/rubocopify
Browse files Browse the repository at this point in the history
Rubocopify gem
  • Loading branch information
tagliala authored Nov 12, 2023
2 parents 2c463b3 + c6d62bf commit 9ddb639
Show file tree
Hide file tree
Showing 18 changed files with 409 additions and 172 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.

19 changes: 17 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# 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

if RUBY_VERSION >= '2.7'
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rake', require: false
gem 'rubocop-rspec', require: false
end

gem 'awesome_print'
gem 'byebug'
gem 'rack-test'
gem 'rake'
gem 'rspec'
gem 'webmock'
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 9ddb639

Please sign in to comment.