Skip to content

Commit 75c3688

Browse files
committed
Fix quoting issues
1 parent 246267d commit 75c3688

File tree

10 files changed

+70
-70
lines changed

10 files changed

+70
-70
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source 'https://rubygems.org'
1+
source "https://rubygems.org"
22

33
# Specify your gem's dependencies in codeclimate-test-reporter.gemspec
44
gemspec

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require "bundler/gem_tasks"
2-
require 'rspec/core/rake_task'
2+
require "rspec/core/rake_task"
33

44
RSpec::Core::RakeTask.new(:spec)
55

bin/cc-tddium-post-worker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

3-
require 'codeclimate-test-reporter'
4-
require 'tmpdir'
3+
require "codeclimate-test-reporter"
4+
require "tmpdir"
55

66
if ENV["CODECLIMATE_REPO_TOKEN"]
77
tmpdir = Dir.tmpdir

lib/code_climate/test_reporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module TestReporter
44
def self.start
55
if run?
66
require "simplecov"
7-
::SimpleCov.add_filter 'vendor'
7+
::SimpleCov.add_filter "vendor"
88
::SimpleCov.formatter = Formatter
99
::SimpleCov.start(configuration.profile) do
1010
skip_token CodeClimate::TestReporter.configuration.skip_token

lib/code_climate/test_reporter/calculate_blob.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def calculate_with_file
2828

2929
def calculate_with_git
3030
output = `git hash-object -t blob #{@file_path}`.chomp
31-
raise 'ERROR: Failed to calculate blob with git' unless $?.success?
31+
raise "ERROR: Failed to calculate blob with git" unless $?.success?
3232

3333
output
3434
end

lib/code_climate/test_reporter/ci.rb

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,97 +3,97 @@ module TestReporter
33
class Ci
44

55
def self.service_data(env = ENV)
6-
if env['TRAVIS']
6+
if env["TRAVIS"]
77
{
88
name: "travis-ci",
9-
branch: env['TRAVIS_BRANCH'],
10-
build_identifier: env['TRAVIS_JOB_ID'],
11-
pull_request: env['TRAVIS_PULL_REQUEST']
9+
branch: env["TRAVIS_BRANCH"],
10+
build_identifier: env["TRAVIS_JOB_ID"],
11+
pull_request: env["TRAVIS_PULL_REQUEST"]
1212
}
13-
elsif env['CIRCLECI']
13+
elsif env["CIRCLECI"]
1414
{
1515
name: "circlci",
16-
build_identifier: env['CIRCLE_BUILD_NUM'],
17-
branch: env['CIRCLE_BRANCH'],
18-
commit_sha: env['CIRCLE_SHA1']
16+
build_identifier: env["CIRCLE_BUILD_NUM"],
17+
branch: env["CIRCLE_BRANCH"],
18+
commit_sha: env["CIRCLE_SHA1"]
1919
}
20-
elsif env['SEMAPHORE']
20+
elsif env["SEMAPHORE"]
2121
{
2222
name: "semaphore",
23-
branch: env['BRANCH_NAME'],
24-
build_identifier: env['SEMAPHORE_BUILD_NUMBER']
23+
branch: env["BRANCH_NAME"],
24+
build_identifier: env["SEMAPHORE_BUILD_NUMBER"]
2525
}
26-
elsif env['JENKINS_URL']
26+
elsif env["JENKINS_URL"]
2727
{
2828
name: "jenkins",
29-
build_identifier: env['BUILD_NUMBER'],
30-
build_url: env['BUILD_URL'],
31-
branch: env['GIT_BRANCH'],
32-
commit_sha: env['GIT_COMMIT']
29+
build_identifier: env["BUILD_NUMBER"],
30+
build_url: env["BUILD_URL"],
31+
branch: env["GIT_BRANCH"],
32+
commit_sha: env["GIT_COMMIT"]
3333
}
34-
elsif env['TDDIUM']
34+
elsif env["TDDIUM"]
3535
{
3636
name: "tddium",
37-
build_identifier: env['TDDIUM_SESSION_ID'],
38-
worker_id: env['TDDIUM_TID']
37+
build_identifier: env["TDDIUM_SESSION_ID"],
38+
worker_id: env["TDDIUM_TID"]
3939
}
40-
elsif env['WERCKER']
40+
elsif env["WERCKER"]
4141
{
4242
name: "wercker",
43-
build_identifier: env['WERCKER_BUILD_ID'],
44-
build_url: env['WERCKER_BUILD_URL'],
45-
branch: env['WERCKER_GIT_BRANCH'],
46-
commit_sha: env['WERCKER_GIT_COMMIT']
43+
build_identifier: env["WERCKER_BUILD_ID"],
44+
build_url: env["WERCKER_BUILD_URL"],
45+
branch: env["WERCKER_GIT_BRANCH"],
46+
commit_sha: env["WERCKER_GIT_COMMIT"]
4747
}
48-
elsif env['APPVEYOR']
48+
elsif env["APPVEYOR"]
4949
{
5050
name: "appveyor",
51-
build_identifier: env['APPVEYOR_BUILD_ID'],
52-
build_url: env['APPVEYOR_API_URL'],
53-
branch: env['APPVEYOR_REPO_BRANCH'],
54-
commit_sha: env['APPVEYOR_REPO_COMMIT'],
55-
pull_request: env['APPVEYOR_PULL_REQUEST_NUMBER']
51+
build_identifier: env["APPVEYOR_BUILD_ID"],
52+
build_url: env["APPVEYOR_API_URL"],
53+
branch: env["APPVEYOR_REPO_BRANCH"],
54+
commit_sha: env["APPVEYOR_REPO_COMMIT"],
55+
pull_request: env["APPVEYOR_PULL_REQUEST_NUMBER"]
5656
}
57-
elsif env['CI_NAME'] =~ /DRONE/i
57+
elsif env["CI_NAME"] =~ /DRONE/i
5858
{
5959
name: "drone",
60-
build_identifier: env['CI_BUILD_NUMBER'],
61-
build_url: env['CI_BUILD_URL'],
62-
branch: env['CI_BRANCH'],
63-
commit_sha: env['CI_BUILD_NUMBER'],
64-
pull_request: env['CI_PULL_REQUEST']
60+
build_identifier: env["CI_BUILD_NUMBER"],
61+
build_url: env["CI_BUILD_URL"],
62+
branch: env["CI_BRANCH"],
63+
commit_sha: env["CI_BUILD_NUMBER"],
64+
pull_request: env["CI_PULL_REQUEST"]
6565
}
66-
elsif env['CI_NAME'] =~ /codeship/i
66+
elsif env["CI_NAME"] =~ /codeship/i
6767
{
6868
name: "codeship",
69-
build_identifier: env['CI_BUILD_NUMBER'],
70-
build_url: env['CI_BUILD_URL'],
71-
branch: env['CI_BRANCH'],
72-
commit_sha: env['CI_COMMIT_ID'],
69+
build_identifier: env["CI_BUILD_NUMBER"],
70+
build_url: env["CI_BUILD_URL"],
71+
branch: env["CI_BRANCH"],
72+
commit_sha: env["CI_COMMIT_ID"],
7373
}
74-
elsif env['CI_NAME'] =~ /VEXOR/i
74+
elsif env["CI_NAME"] =~ /VEXOR/i
7575
{
76-
name: 'vexor',
77-
build_identifier: env['CI_BUILD_NUMBER'],
78-
build_url: env['CI_BUILD_URL'],
79-
branch: env['CI_BRANCH'],
80-
commit_sha: env['CI_BUILD_SHA'],
81-
pull_request: env['CI_PULL_REQUEST_ID']
76+
name: "vexor",
77+
build_identifier: env["CI_BUILD_NUMBER"],
78+
build_url: env["CI_BUILD_URL"],
79+
branch: env["CI_BRANCH"],
80+
commit_sha: env["CI_BUILD_SHA"],
81+
pull_request: env["CI_PULL_REQUEST_ID"]
8282
}
83-
elsif env['BUILDKITE']
83+
elsif env["BUILDKITE"]
8484
{
8585
name: "buildkite",
86-
build_identifier: env['BUILDKITE_JOB_ID'],
87-
build_url: env['BUILDKITE_BUILD_URL'],
88-
branch: env['BUILDKITE_BRANCH'],
89-
commit_sha: env['BUILDKITE_COMMIT']
86+
build_identifier: env["BUILDKITE_JOB_ID"],
87+
build_url: env["BUILDKITE_BUILD_URL"],
88+
branch: env["BUILDKITE_BRANCH"],
89+
commit_sha: env["BUILDKITE_COMMIT"]
9090
}
91-
elsif env['GITLAB_CI']
91+
elsif env["GITLAB_CI"]
9292
{
9393
name: "gitlab-ci",
94-
build_identifier: env['CI_BUILD_ID'],
95-
branch: env['CI_BUILD_REF_NAME'],
96-
commit_sha: env['CI_BUILD_REF']
94+
build_identifier: env["CI_BUILD_ID"],
95+
branch: env["CI_BUILD_REF_NAME"],
96+
commit_sha: env["CI_BUILD_REF"]
9797
}
9898
else
9999
{}

lib/code_climate/test_reporter/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def http_client(uri)
8080
if uri.scheme == "https"
8181
http.use_ssl = true
8282
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
83-
http.ca_file = File.expand_path('../../../../config/cacert.pem', __FILE__)
83+
http.ca_file = File.expand_path("../../../../config/cacert.pem", __FILE__)
8484
http.verify_depth = 5
8585
end
8686
http.open_timeout = CodeClimate::TestReporter.configuration.timeout

lib/code_climate/test_reporter/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'logger'
1+
require "logger"
22

33
module CodeClimate
44
module TestReporter

lib/code_climate/test_reporter/formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def format(result)
3939
# actually private ...
4040
def short_filename(filename)
4141
return filename unless ::SimpleCov.root
42-
filename = filename.gsub(::SimpleCov.root, '.').gsub(/^\.\//, '')
42+
filename = filename.gsub(::SimpleCov.root, ".").gsub(/^\.\//, "")
4343
apply_prefix filename
4444
end
4545

lib/code_climate/test_reporter/git.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def head
3636
end
3737

3838
def committed_at
39-
committed_at = git('log -1 --pretty=format:%ct')
39+
committed_at = git("log -1 --pretty=format:%ct")
4040
committed_at.to_i.zero? ? nil : committed_at.to_i
4141
end
4242

4343
def branch_from_git
44-
git('rev-parse --abbrev-ref HEAD').chomp
44+
git("rev-parse --abbrev-ref HEAD").chomp
4545
end
4646

4747
def git(command)
@@ -50,7 +50,7 @@ def git(command)
5050

5151
def git_dir
5252
return configured_git_dir unless configured_git_dir.nil?
53-
rails_git_dir_present? ? Rails.root : '.'
53+
rails_git_dir_present? ? Rails.root : "."
5454
end
5555

5656
def configured_git_dir
@@ -59,7 +59,7 @@ def configured_git_dir
5959

6060
def rails_git_dir_present?
6161
const_defined?(:Rails) && Rails.respond_to?(:root) && !Rails.root.nil? &&
62-
File.directory?(File.expand_path('.git', Rails.root))
62+
File.directory?(File.expand_path(".git", Rails.root))
6363
end
6464
end
6565
end

0 commit comments

Comments
 (0)