Skip to content

Commit

Permalink
Fix a few Rubocop errors added in the latest version of Rubocop (0.48)
Browse files Browse the repository at this point in the history
The errors were being triggered by the following new cops:

- rubocop/rubocop#4133
- rubocop/rubocop#3889
- rubocop/rubocop#4028
  • Loading branch information
dennmart committed Apr 5, 2017
1 parent f81dae1 commit 86d7a86
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions ablecop.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8

$LOAD_PATH.push File.expand_path("../lib", __FILE__)
require "ablecop/version"

Expand All @@ -15,25 +16,24 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.post_install_message = <<-MSG
Ablecop Setup - Local
===========================================================================
You can generate the necessary configuration files to run any code
analysis locally by running the following command:
bundle exec rails g ablecop:install
Ablecop Setup - CircleCI
===========================================================================
To enable CircleCI to run ablecop's checks and comment on commits with each
push, add the following configuration to your circle.yml configuration:
test:
pre:
- bundle exec rails g ablecop:install
post:
- RAILS_ENV=development bundle exec rake ablecop:run_on_circleci
MSG
Ablecop Setup - Local
===========================================================================
You can generate the necessary configuration files to run any code
analysis locally by running the following command:
bundle exec rails g ablecop:install
Ablecop Setup - CircleCI
===========================================================================
To enable CircleCI to run ablecop's checks and comment on commits with each
push, add the following configuration to your circle.yml configuration:
test:
pre:
- bundle exec rails g ablecop:install
post:
- RAILS_ENV=development bundle exec rake ablecop:run_on_circleci
MSG

spec.required_ruby_version = ">= 2.2.0"

Expand Down
4 changes: 2 additions & 2 deletions lib/ablecop/tasks/ablecop.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ desc "Runs ablecop automatted code review on CircleCI"
namespace :ablecop do
desc "Run code analysis for the current commit / pull request on CircleCI"
task :run_on_circleci do
abort("The GitHub access token is missing. Please set the PRONTO_GITHUB_ACCESS_TOKEN environment variable as specified in the README: https://github.com/ableco/ablecop#circleci--github-setup") unless ENV["PRONTO_GITHUB_ACCESS_TOKEN"].present?
abort("The GitHub access token is missing. Please set the PRONTO_GITHUB_ACCESS_TOKEN environment variable as specified in the README: https://github.com/ableco/ablecop#circleci--github-setup") if ENV["PRONTO_GITHUB_ACCESS_TOKEN"].blank?

require_pronto_runners

# If CircleCI includes the pull request information, run the code analysis on the
# branch for the pull request.
if ENV["CI_PULL_REQUEST"].present?
ENV["PULL_REQUEST_ID"] = ENV["CI_PULL_REQUEST"].match("[0-9]+$").to_s
abort("Pull Request ID is missing") unless ENV["PULL_REQUEST_ID"].present?
abort("Pull Request ID is missing") if ENV["PULL_REQUEST_ID"].blank?

pull_request_formatter = Pronto::Formatter::GithubPullRequestFormatter.new
status_formatter = Pronto::Formatter::GithubStatusFormatter.new
Expand Down

0 comments on commit 86d7a86

Please sign in to comment.