diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3bf9e8d..49722ad 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,13 +1,14 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-07-30 11:43:22 -0400 using RuboCop version 0.42.0. +# on 2020-05-09 10:55:58 -0400 using RuboCop version 0.82.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 18 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes. +# Offense count: 14 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https -Metrics/LineLength: - Max: 195 +Layout/LineLength: + Max: 169 diff --git a/.travis.yml b/.travis.yml index 0f113d6..fbcb0e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,17 +3,7 @@ language: ruby sudo: false rvm: - - 2.3.1 - - 2.3.0 - - 2.2 - - 2.1 - - ruby-head - - jruby-9.0.5.0 - - rbx-2 - -allow_failures: - - ruby-head - - rbx-2 + - 2.6.6 before_script: - bundle exec danger diff --git a/CHANGELOG.md b/CHANGELOG.md index e4dfaa2..00dda63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ### Changelog -### 0.1.2 (Next) +### 0.2.0 (Next) +* [#8](https://github.com/ruby-grape/danger/pull/8): Upgraded Danger 8.0, danger-changelog 0.6.1 and added danger-toc 0.2.0 - [@dblock](https://github.com/dblock). * Your contribution here. ### 0.1.1 (12/5/2016) diff --git a/Dangerfile b/Dangerfile index ec3d605..c042e5f 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # -------------------------------------------------------------------------------------------------------------------- # Has any changes happened inside the actual library code? # -------------------------------------------------------------------------------------------------------------------- @@ -7,9 +9,7 @@ has_spec_changes = !git.modified_files.grep(/spec/).empty? # -------------------------------------------------------------------------------------------------------------------- # You've made changes to lib, but didn't write any tests? # -------------------------------------------------------------------------------------------------------------------- -if has_app_changes && !has_spec_changes - warn("There're library changes, but not tests. That's OK as long as you're refactoring existing code.", sticky: false) -end +warn("There're library changes, but not tests. That's OK as long as you're refactoring existing code.", sticky: false) if has_app_changes && !has_spec_changes # -------------------------------------------------------------------------------------------------------------------- # You've made changes to specs, but no library code has changed? @@ -21,15 +21,21 @@ end # -------------------------------------------------------------------------------------------------------------------- # Have you updated CHANGELOG.md? # -------------------------------------------------------------------------------------------------------------------- -changelog.check +changelog.check! + +# -------------------------------------------------------------------------------------------------------------------- +# Do you have a TOC? +# -------------------------------------------------------------------------------------------------------------------- +toc.check! # -------------------------------------------------------------------------------------------------------------------- # Don't let testing shortcuts get into master by accident, # ensuring that we don't get green builds based on a subset of tests. # -------------------------------------------------------------------------------------------------------------------- -(git.modified_files + git.added_files - %w(Dangerfile)).each do |file| +(git.modified_files + git.added_files - %w[Dangerfile]).each do |file| next unless File.file?(file) + contents = File.read(file) if file.start_with?('spec') fail("`xit` or `fit` left in tests (#{file})") if contents =~ /^\w*[xf]it/ diff --git a/Gemfile b/Gemfile index ce44404..c2c2974 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,4 @@ source 'https://rubygems.org' gemspec -gem 'rubocop', '0.42.0' +gem 'rubocop', '0.82.0' diff --git a/Rakefile b/Rakefile index 29d6713..15ea21e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rubygems' require 'bundler' @@ -11,4 +13,4 @@ RuboCop::RakeTask.new require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -task default: [:rubocop, :spec] +task default: %i[rubocop spec] diff --git a/ruby-grape-danger.gemspec b/ruby-grape-danger.gemspec index 38fbef6..8414fdd 100644 --- a/ruby-grape-danger.gemspec +++ b/ruby-grape-danger.gemspec @@ -17,6 +17,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake' s.add_development_dependency 'rspec' - s.add_runtime_dependency 'danger', '~> 4.0.1' - s.add_runtime_dependency 'danger-changelog', '~> 0.2.0' + s.add_runtime_dependency 'danger', '~> 8.0.0' + s.add_runtime_dependency 'danger-changelog', '~> 0.6.1' + s.add_runtime_dependency 'danger-toc', '~> 0.2.0' end