diff --git a/.gitmodules b/.gitmodules index 7f52fdb66..80bb4f695 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "vendor/rubocop"] - path = vendor/rubocop - url = git://github.com/bbatsov/rubocop.git + path = vendor/rubocop + url = https://github.com/bbatsov/rubocop.git diff --git a/.travis.yml b/.travis.yml index 513beb235..f7f237831 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,20 @@ +sudo: false language: ruby + rvm: - 1.9.3 - - 2.0.0 + - 2.0 - 2.1 - - ruby-head - - jruby-19mode + - 2.2 + - 2.3 + - jruby - rbx-2 + matrix: allow_failures: - - rvm: ruby-head + - rvm: jruby - rvm: rbx-2 -before_install: - - gem update --remote bundler -script: - - bundle exec rake + fast_finish: true + +before_install: "gem update --remote bundler" +script: "bundle exec rake" diff --git a/Gemfile b/Gemfile index 9fc7dbeed..a873952f3 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ source 'https://rubygems.org' gemspec group :test do - gem 'coveralls', require: false + gem 'codeclimate-test-reporter', require: false end local_gemfile = 'Gemfile.local' diff --git a/lib/rubocop/rspec/top_level_describe.rb b/lib/rubocop/rspec/top_level_describe.rb index 3c7f2e92d..0faacf803 100644 --- a/lib/rubocop/rspec/top_level_describe.rb +++ b/lib/rubocop/rspec/top_level_describe.rb @@ -26,7 +26,7 @@ def top_level_nodes nodes = describe_statement_children(root_node) # If we have no top level describe statements, we need to check any # blocks on the top level (e.g. after a require). - if nodes.size == 0 + if nodes.empty? nodes = node_children(root_node).map do |child| describe_statement_children(child) if child.type == :block end.flatten.compact diff --git a/rubocop-rspec.gemspec b/rubocop-rspec.gemspec index 49788715b..b378ef0f5 100644 --- a/rubocop-rspec.gemspec +++ b/rubocop-rspec.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^spec/}) spec.extra_rdoc_files = ['MIT-LICENSE.md', 'README.md'] - spec.add_development_dependency('rubocop', '~> 0.36') + spec.add_development_dependency('rubocop', '0.37.1') spec.add_development_dependency('rake', '~> 10.1') spec.add_development_dependency('rspec', '~> 3.0') spec.add_development_dependency('simplecov', '~> 0.8') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 770bdb376..1b52ae015 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,9 +3,11 @@ require 'rubocop' rubocop_path = File.join(File.dirname(__FILE__), '../vendor/rubocop') + unless File.directory?(rubocop_path) - fail "Can't run specs without a local RuboCop checkout. Look in the README." + raise "Can't run specs without a local RuboCop checkout. Look in the README." end + Dir["#{rubocop_path}/spec/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| diff --git a/vendor/rubocop b/vendor/rubocop index 3ec1ef133..66c73b7da 160000 --- a/vendor/rubocop +++ b/vendor/rubocop @@ -1 +1 @@ -Subproject commit 3ec1ef13365b6ff70131e36d28765ad8afe44e74 +Subproject commit 66c73b7dadc15cbba427ffd4b41e11ae8e7eb146