From d03fa2d3f63de010776fd44b42ed4263dfff7fa7 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Tue, 24 Mar 2015 09:53:13 -0500 Subject: [PATCH] Add Rubocop scan --- .rubocop.yml | 2 ++ .travis.yml | 4 +++- Gemfile | 1 + Gemfile.lock | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..c3f35c6a --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,2 @@ +AllCops: + RunRailsCops: true diff --git a/.travis.yml b/.travis.yml index 50b1d22a..cc5c588c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,4 +30,6 @@ before_script: - cp config/database.yml.travis config/database.yml - psql -c 'create database travis_ci_test;' -U postgres -script: "bundle exec rake test:$TEST_SUITE" +script: + - bundle exec rake test:$TEST_SUITE + - bundle exec rubocop diff --git a/Gemfile b/Gemfile index c1ce9fd3..bc3c195d 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,7 @@ group :test, :development do gem 'selenium-webdriver' gem 'coveralls', :require => false gem 'simplecov', :require => false + gem 'rubocop', require: false gem 'sqlite3' gem 'tzinfo-data' # addresses a bug when working on Windows end diff --git a/Gemfile.lock b/Gemfile.lock index 42331f24..778500c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,6 +28,9 @@ GEM thread_safe (~> 0.1) tzinfo (~> 1.1) arel (5.0.1.20140414130214) + ast (2.0.0) + astrolabe (1.3.0) + parser (>= 2.2.0.pre.3, < 3.0) aws-sdk (1.63.0) aws-sdk-v1 (= 1.63.0) aws-sdk-v1 (1.63.0) @@ -97,9 +100,12 @@ GEM activesupport (>= 3.0.0) cocaine (~> 0.5.3) mime-types + parser (2.2.0.3) + ast (>= 1.1, < 3.0) pg (0.18.1) pg (0.18.1-x86-mingw32) polyglot (0.3.5) + powerpack (0.1.0) rack (1.5.2) rack-test (0.6.3) rack (>= 1.0) @@ -118,6 +124,7 @@ GEM activesupport (= 4.1.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) + rainbow (2.0.0) rake (10.4.2) ref (1.0.5) rest-client (1.7.3) @@ -128,6 +135,13 @@ GEM mime-types (>= 1.16, < 3.0) netrc (~> 0.7) rmagick (2.13.4) + rubocop (0.29.1) + astrolabe (~> 1.3) + parser (>= 2.2.0.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.4) + ruby-progressbar (1.7.1) rubyzip (1.1.7) sass (3.2.19) sass-rails (4.0.5) @@ -196,6 +210,7 @@ DEPENDENCIES pg rails (= 4.1.0) rmagick + rubocop sass-rails (~> 4.0.3) selenium-webdriver simplecov