File tree 1 file changed +24
-23
lines changed
1 file changed +24
-23
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,28 @@ def pass?
43
43
end
44
44
end
45
45
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
+
46
68
private
47
69
48
70
# Check if current bundle is already usable
@@ -154,30 +176,9 @@ def self.current_projects
154
176
#
155
177
# @return [undefined]
156
178
def self . log ( message )
157
- $stderr . puts ( message )
179
+ warn ( message )
158
180
end
159
181
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
182
183
183
184
exit Project . run_cli ( ARGV )
You can’t perform that action at this time.
0 commit comments