Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #34 - Adding hound and rubocop config and coveralls gem #39

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
scss:
enabled: false

ruby:
config_file: .rubocop.yml

jshint:
enabled: false

fail_on_violations: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 is everyone else good with failing on violations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require: rubocop-rspec

AllCops:
DisplayCopNames: true
Exclude:
- 'vendor/**/*'
- 'bin/**/*'
- 'db/**/*'
- 'app/assets/**/*'
- 'config/**/*'
- 'doc/**/*'
- 'spec/**/*'
- 'test/**/*'

Rails:
Enabled: true

Style/Encoding:
Enabled: true

Style/StringLiterals:
Enabled: true
EnforcedStyle: single_quotes

Style/Documentation:
Exclude:
- 'spec/**/*'
- 'app/**/*'

Style/Next:
Enabled: true

Metrics/AbcSize:
Max: 50



1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ gem 'jbuilder', '~> 2.5'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'json', '~> 1.8.6'
gem 'coveralls', require: false

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.0.4)
connection_pool (2.2.0)
coveralls (0.8.13)
json (~> 1.8)
simplecov (~> 0.11.0)
term-ansicolor (~> 1.3)
thor (~> 0.19.1)
tins (~> 1.6.0)
daemons (1.2.4)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
Expand Down Expand Up @@ -650,9 +656,12 @@ GEM
stomp (1.4.3)
sxp (1.0.0)
rdf (~> 2.0)
term-ansicolor (1.4.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.6)
tins (1.6.0)
tinymce-rails (4.5.2)
railties (>= 3.1.1)
tinymce-rails-imageupload (4.0.17.beta)
Expand Down Expand Up @@ -702,6 +711,7 @@ DEPENDENCIES
capistrano-rbenv (~> 2.0.4)
capybara (~> 2.6.0)
coffee-rails (~> 4.2.0)
coveralls
database_cleaner (~> 1.3)
devise
devise-guests (~> 0.5)
Expand Down
24 changes: 9 additions & 15 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
ENV["RAILS_ENV"] ||= 'test'
require "bundler/setup"

def coverage_needed?
(!ENV['RAILS_VERSION'] || ENV['RAILS_VERSION'].start_with?('5.0')) &&
(ENV['COVERAGE'] || ENV['TRAVIS'])
require 'simplecov'
require 'coveralls'
SimpleCov.root(File.expand_path('../..', __FILE__))
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start('rails') do
add_filter '/.internal_test_app'
add_filter '/lib/generators'
add_filter '/spec'
end
SimpleCov.command_name 'spec'

if coverage_needed?
require 'simplecov'
require 'coveralls'
SimpleCov.root(File.expand_path('../..', __FILE__))
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start('rails') do
add_filter '/.internal_test_app'
add_filter '/lib/generators'
add_filter '/spec'
end
SimpleCov.command_name 'spec'
end

require File.expand_path("../../config/environment", __FILE__)

Expand Down