diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..8ce10a16 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,13 @@ +AllCops: + Exclude: + - bin/* + - config/initializers/sorcery.rb + - db/schema.rb + RunRailsCops: true +Metrics/LineLength: + Enabled: false +require: rubocop-rspec +Style/Documentation: + Enabled: false +Style/SpaceInsideHashLiteralBraces: + EnforcedStyle: no_space diff --git a/Gemfile b/Gemfile index dbe7af28..c8ab5e68 100644 --- a/Gemfile +++ b/Gemfile @@ -41,6 +41,8 @@ group :development do gem 'capistrano-rails', '~> 1.1' gem 'capistrano-rvm' gem 'capistrano-upload-config' + gem 'rubocop', require: false + gem 'rubocop-rspec' gem 'spring' end diff --git a/Gemfile.lock b/Gemfile.lock index 021f01bb..5148d938 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,6 +35,9 @@ GEM tzinfo (~> 1.1) archive-tar-minitar (0.5.2) arel (5.0.1.20140414130214) + ast (2.0.0) + astrolabe (1.3.0) + parser (>= 2.2.0.pre.3, < 3.0) autotest-rails (4.2.1) ZenTest (~> 4.5) bcrypt (3.1.10) @@ -163,9 +166,12 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) + parser (2.2.0.2) + ast (>= 1.1, < 3.0) pg (0.18.1) polyamorous (1.1.0) activerecord (>= 3.0) + powerpack (0.1.0) pry (0.10.1) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -202,6 +208,7 @@ GEM activesupport (= 4.1.9) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) + rainbow (2.0.0) rake (10.4.2) ransack (1.6.3) actionpack (>= 3.0) @@ -233,6 +240,14 @@ GEM rspec-mocks (~> 3.1.0) rspec-support (~> 3.1.0) rspec-support (3.1.2) + 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) + rubocop-rspec (1.2.1) + ruby-progressbar (1.7.1) rubytree (0.9.4) json (~> 1.8) structured_warnings (~> 0.1) @@ -344,6 +359,8 @@ DEPENDENCIES ransack rspec-autotest rspec-rails (~> 3.1.0) + rubocop + rubocop-rspec rubytree sass-rails (~> 4.0.3) sdoc (~> 0.4.0)