Skip to content

Commit dc3b301

Browse files
committed
Extract to const
1 parent c2b881a commit dc3b301

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

_gem/lib/go_gem/rake_task.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ module GoGem
2020
# config.go_test_args = "#{GoGem::RakeTask::DEFAULT_GO_TEST_ARGS} -race"
2121
# end
2222
class RakeTask < ::Rake::TaskLib
23+
DEFAULT_TASK_NAMESPACE = :go
24+
25+
DEFAULT_GO_BIN_PATH = "go"
26+
27+
DEFAULT_GO_TEST_ARGS = "-mod=readonly -count=1"
28+
2329
# @!attribute [r] gem_name
2430
# @return [String]
2531
attr_reader :gem_name
@@ -44,9 +50,9 @@ def initialize(gem_name)
4450

4551
@gem_name = gem_name
4652

47-
@task_namespace = :go
48-
@go_bin_path = "go"
49-
@go_test_args = "-mod=readonly -count=1"
53+
@task_namespace = DEFAULT_TASK_NAMESPACE
54+
@go_bin_path = DEFAULT_GO_BIN_PATH
55+
@go_test_args = DEFAULT_GO_TEST_ARGS
5056

5157
yield(self) if block_given?
5258

0 commit comments

Comments
 (0)