Skip to content

Commit

Permalink
Setup codeclimate and coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
elct9620 committed May 12, 2017
1 parent a8b414f commit 72e8acf
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ test/dummy/db/*.sqlite3
test/dummy/db/*.sqlite3-journal
test/dummy/log/*.log
test/dummy/tmp/

coverage/
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.gemfile
before_install:
- "rm -f Gemfile.lock"
install: "bundle install --jobs=3 --retry=3"
script: "bundle exec rspec"
- rm -f Gemfile.lock
install: bundle install --jobs=3 --retry=3
script:
- bundle exec rspec
- bundle exec codeclimate-test-reporter
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

appraise 'rails-4' do
gem 'rails', '4.2.8'
gem 'rails', '~> 4.2'
end

appraise 'rails-5' do
gem 'rails', '5.1.0'
gem 'rails', '~> 5.1'
end
21 changes: 21 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,24 @@ GEM
thor (>= 0.14.0)
arel (8.0.0)
builder (3.2.3)
codeclimate-test-reporter (1.0.7)
simplecov
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
diff-lcs (1.3)
docile (1.1.5)
erubi (1.6.0)
faraday (0.12.1)
multipart-post (>= 1.2, < 3)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.1)
json (2.1.0)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.5)
Expand Down Expand Up @@ -121,15 +131,23 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tins (1.13.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)
websocket-driver (0.6.5)
Expand All @@ -141,8 +159,11 @@ PLATFORMS

DEPENDENCIES
appraisal
codeclimate-test-reporter
coveralls
rails-letsencrypt!
rspec-rails
simplecov

BUNDLED WITH
1.14.6
2 changes: 1 addition & 1 deletion gemfiles/rails_4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "rails", "4.2.8"
gem "rails", "~> 4.2"

gemspec path: "../"
20 changes: 19 additions & 1 deletion gemfiles/rails_4.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,21 @@ GEM
arel (6.0.4)
builder (3.2.3)
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
diff-lcs (1.3)
docile (1.1.5)
erubis (2.7.0)
faraday (0.12.1)
multipart-post (>= 1.2, < 3)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.1)
json (2.1.0)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.5)
Expand Down Expand Up @@ -117,15 +125,23 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tins (1.13.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)

Expand All @@ -134,9 +150,11 @@ PLATFORMS

DEPENDENCIES
appraisal
rails (= 4.2.8)
coveralls
rails (~> 4.2)
rails-letsencrypt!
rspec-rails
simplecov

BUNDLED WITH
1.14.6
2 changes: 1 addition & 1 deletion gemfiles/rails_5.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "rails", "5.1.0"
gem "rails", "~> 5.1"

gemspec path: "../"
20 changes: 19 additions & 1 deletion gemfiles/rails_5.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,21 @@ GEM
arel (8.0.0)
builder (3.2.3)
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
diff-lcs (1.3)
docile (1.1.5)
erubi (1.6.0)
faraday (0.12.1)
multipart-post (>= 1.2, < 3)
globalid (0.4.0)
activesupport (>= 4.2.0)
i18n (0.8.1)
json (2.1.0)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.5)
Expand Down Expand Up @@ -121,15 +129,23 @@ GEM
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tins (1.13.2)
tzinfo (1.2.3)
thread_safe (~> 0.1)
websocket-driver (0.6.5)
Expand All @@ -141,9 +157,11 @@ PLATFORMS

DEPENDENCIES
appraisal
rails (= 5.1.0)
coveralls
rails (~> 5.1)
rails-letsencrypt!
rspec-rails
simplecov

BUNDLED WITH
1.14.6
3 changes: 3 additions & 0 deletions rails-letsencrypt.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ Gem::Specification.new do |s|

s.add_development_dependency "appraisal"
s.add_development_dependency "rspec-rails"
s.add_development_dependency "simplecov"
s.add_development_dependency "coveralls"
s.add_development_dependency "codeclimate-test-reporter"
end
30 changes: 26 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@
# it.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

require 'simplecov'
require 'coveralls'
require 'codeclimate-test-reporter'

SimpleCov.start do
formatter SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]

load_profile 'test_frameworks'

add_group 'Let\'s Encrypt', 'lib/letsencrypt'
add_group 'Generators', 'lib/generators/lets_encrypt'
add_group 'Controllers', 'app/controllers'
add_group 'Models', 'app/models'
add_group 'Jobs', 'app/jobs'

track_files '{app,lib}/**/*.rb'
end

RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
Expand All @@ -22,9 +44,9 @@
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
# be_bigger_than(2).and_smaller_than(4).description
# # => "be bigger than 2 and smaller than 4"
# # => 'be bigger than 2 and smaller than 4'
# ...rather than:
# # => "be bigger than 2"
# # => 'be bigger than 2'
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end

Expand Down Expand Up @@ -57,7 +79,7 @@
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file.
config.example_status_persistence_file_path = "spec/examples.txt"
config.example_status_persistence_file_path = 'spec/examples.txt'
# Limits the available syntax to the non-monkey patched syntax that is
# recommended. For more details, see:
Expand All @@ -73,7 +95,7 @@
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
config.default_formatter = "doc"
config.default_formatter = 'doc'
end
# Print the 10 slowest examples and example groups at the
Expand Down

0 comments on commit 72e8acf

Please sign in to comment.