Skip to content

Commit 40955dd

Browse files
Fixed rubocop issues in build-ci
1 parent 900ebd8 commit 40955dd

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

build-ci.rb

+24-23
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,28 @@ def pass?
4343
end
4444
end
4545

46+
# Process CLI arguments
47+
#
48+
# @param [Array<String>] arguments
49+
#
50+
# @return [Boolean]
51+
# the success of the CLI run
52+
def self.run_cli(arguments)
53+
raise ArgumentError if arguments.length > 1
54+
55+
mode = arguments.fetch(0, DEFAULT_MODE)
56+
57+
case mode
58+
when 'install'
59+
install
60+
true
61+
when 'test'
62+
test
63+
else
64+
raise "Unknown mode: #{mode.inspect}"
65+
end
66+
end
67+
4668
private
4769

4870
# Check if current bundle is already usable
@@ -154,30 +176,9 @@ def self.current_projects
154176
#
155177
# @return [undefined]
156178
def self.log(message)
157-
$stderr.puts(message)
179+
warn(message)
158180
end
159181
private_class_method :log
160-
161-
# Process CLI arguments
162-
#
163-
# @param [Array<String>] arguments
164-
#
165-
# @return [Boolean]
166-
# the success of the CLI run
167-
def self.run_cli(arguments)
168-
raise ArgumentError if arguments.length > 1
169-
mode = arguments.fetch(0, DEFAULT_MODE)
170-
171-
case mode
172-
when 'install'
173-
install
174-
true
175-
when 'test'
176-
test
177-
else
178-
raise "Unknown mode: #{mode.inspect}"
179-
end
180-
end
181-
end # Project
182+
end
182183

183184
exit Project.run_cli(ARGV)

0 commit comments

Comments
 (0)