Skip to content

Commit

Permalink
Merge pull request rubocop#65 from nevir/rubocop-0.37.1
Browse files Browse the repository at this point in the history
rubocop 0.37.1
  • Loading branch information
nijikon committed Feb 9, 2016
2 parents 22a91cd + 812a3f3 commit 13497ba
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
32 changes: 24 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
sudo: false
cache: bundler
language: ruby

rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.0.0-p648
- 2.1.8
- 2.2.4
- 2.3.0
- ruby-head
- jruby-19mode
- rbx-2
- jruby-9.0.1.0
- rbx-3

env:
# this doesn't do anything for MRI or RBX, but it doesn't hurt them either
# for JRuby, it enables us to get more accurate coverage data
- JRUBY_OPTS="--debug"

matrix:
allow_failures:
- rvm: ruby-head
- rvm: rbx-2
before_install:
- gem update --remote bundler
script:
- bundle exec rake
- rvm: rbx-3
fast_finish: true

addons:
code_climate:
repo_token: 40adf93a016e2779eef43dce8f16ca10098ed9f498522e87c8bc94cf14f3e977

before_install: gem update --remote bundler
script: bundle exec rake
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rspec/top_level_describe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rubocop-rspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
9 changes: 8 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
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 }

if ENV['CI']
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
end

RSpec.configure do |config|
config.order = :random

Expand Down
2 changes: 1 addition & 1 deletion vendor/rubocop

0 comments on commit 13497ba

Please sign in to comment.