-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade RuboCop 0.35.1 -> 0.36.0 for Travis builds
This required a number of fixes to address new cops introduced in version 0.36.0.
- Loading branch information
Showing
19 changed files
with
53 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Global application constants. | ||
module Overcommit | ||
HOME = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) | ||
CONFIG_FILE_NAME = '.overcommit.yml' | ||
HOME = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')).freeze | ||
CONFIG_FILE_NAME = '.overcommit.yml'.freeze | ||
|
||
HOOK_DIRECTORY = File.join(HOME, 'lib', 'overcommit', 'hook') | ||
HOOK_DIRECTORY = File.join(HOME, 'lib', 'overcommit', 'hook').freeze | ||
|
||
REPO_URL = 'https://github.com/brigade/overcommit' | ||
BUG_REPORT_URL = "#{REPO_URL}/issues" | ||
REPO_URL = 'https://github.com/brigade/overcommit'.freeze | ||
BUG_REPORT_URL = "#{REPO_URL}/issues".freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Defines the gem version. | ||
module Overcommit | ||
VERSION = '0.30.0' | ||
VERSION = '0.30.0'.freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,12 @@ | |
module GitSpecHelpers | ||
module_function | ||
|
||
def repo(options = {}, &block) | ||
# Creates an empty git repository, allowing you to execute a block where | ||
# the current working directory is set to that repository's root directory. | ||
# | ||
# @param options [Hash] | ||
# @return [String] path of the repository | ||
def repo(options = {}) | ||
directory('some-repo') do | ||
`git init --template="#{options[:template_dir]}"` | ||
|
||
|
@@ -13,26 +18,30 @@ def repo(options = {}, &block) | |
`git config --local user.email "[email protected]"` | ||
`git config --local rerere.enabled 0` # Don't record resolutions in tests | ||
|
||
block.call if block_given? | ||
yield if block_given? | ||
end | ||
end | ||
|
||
# Creates a directory (with an optional specific name) in a temporary | ||
# directory which will automatically be destroyed. | ||
# | ||
# @param name [String] base name of the directory | ||
# @return [String] path of the directory that was created | ||
def directory(name = 'some-dir', &block) | ||
tmpdir = Dir.mktmpdir.tap do |path| | ||
Dir.chdir(path) do | ||
Dir.mkdir(name) | ||
Dir.chdir(name) do | ||
block.call if block_given? | ||
end | ||
Dir.chdir(name, &block) if block_given? | ||
end | ||
end | ||
|
||
File.join(tmpdir, name) | ||
end | ||
|
||
# Returns a random git object hash. | ||
# | ||
# @return [String] | ||
def random_hash | ||
40.times.map { (65 + rand(26)).chr }.join | ||
Array.new(40) { (65 + rand(26)).chr }.join | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters