-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rubocop - Moved rubocop checks into travis and disabled hound - Hound did not support rubocop 0.50.x, which is the last version to support Ruby v2 - Condensed/simplified .rubocop.yml - Corrected easily fixed cops - Gemfile - Added extra constraints due to encountered bugs - Added pry enhancements - TODO: add to gemspec - Rake - Added Rakefile with tasks to simplify testing (both locally and on travis) - Travis - Upgraded OS to use Ubuntu xenial rather than trusty (end of life) - Script now runs bundle exec rake rather than rspec directly
- Loading branch information
Showing
17 changed files
with
262 additions
and
172 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
ruby: | ||
config_file: .rubocop.yml | ||
# config_file: .rubocop.yml | ||
enabled: false |
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 was deleted.
Oops, something went wrong.
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,19 +1,25 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
group :test do | ||
gem "rspec" | ||
gem "simplecov", require: false | ||
gem 'rspec' | ||
gem 'simplecov', require: false | ||
end | ||
|
||
group :development do | ||
gem "rubocop", ">= 0.50", "< 0.51", require: false | ||
gem "rubocop-rspec", require: false | ||
group :development, :test do | ||
gem 'rubocop', '>= 0.50', '< 0.51', require: false | ||
gem 'rubocop-rspec', require: false | ||
end | ||
|
||
group :development, :test do | ||
gem "pry" | ||
gem 'jazz_fingers' | ||
gem 'rake' | ||
# byebug constraint due to lack of support for binding.local_variables | ||
# in ruby 2.0 | ||
gem 'byebug', '< 9.0.0' | ||
# pry constraints fix https://github.com/pry/pry/issues/2121 | ||
gem 'pry', '!= 0.13.0', '!= 0.13.1' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require 'bundler/setup' | ||
Bundler.require(:test, :development) | ||
|
||
begin | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
rescue LoadError => e | ||
require 'shellwords' | ||
raise "Required gem #{e.path.inspect} not found. " \ | ||
'Be sure you ran `bundle install` and are launching rake via ' \ | ||
"`bundle exec rake #{ARGV.shelljoin}`." | ||
end | ||
|
||
namespace :test do | ||
RSpec::Core::RakeTask.new(:rspec) do |t| | ||
t.rspec_opts = '-w --backtrace --no-fail-fast' | ||
end | ||
|
||
RuboCop::RakeTask.new('rubocop') do |t, _task_args| | ||
t.options << '--require' << 'rubocop-rspec' | ||
t.options << '--fail-level' << 'convention' | ||
t.options << '--display-cop-names' | ||
t.options << '--extra-details' | ||
t.options << '--display-style-guide' | ||
# Can't enable parallel because it will break rubocop:autocorrect | ||
# t.options << '--parallel' | ||
end | ||
|
||
desc 'Run all tests' | ||
task all: %w[test:rubocop test:rspec] | ||
|
||
task ci: %w[test:all] | ||
end | ||
|
||
desc 'Alias for test:all' | ||
task test: %w[test:all] | ||
|
||
task default: %w[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
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
Oops, something went wrong.