File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1212module Cuber
1313 class CLI
1414
15- def initialize
15+ def initialize ( file_path = 'Cuberfile' )
1616 @options = { }
1717 parse_command!
18- parse_cuberfile
18+ parse_cuberfile ( file_path )
1919 validate_cuberfile
2020 execute
2121 end
@@ -26,9 +26,9 @@ def parse_command!
2626 @options [ :cmd ] = ARGV . shift &.to_sym
2727 end
2828
29- def parse_cuberfile
30- abort 'Cuberfile not found in current directory' unless File . exist? 'Cuberfile'
31- content = File . read 'Cuberfile'
29+ def parse_cuberfile ( file_path )
30+ abort 'Cuberfile not found in current directory' unless File . exist? file_path
31+ content = File . read file_name
3232 parser = CuberfileParser . new
3333 parser . instance_eval ( content )
3434 cuberfile_options = parser . instance_variables . map do |name |
You can’t perform that action at this time.
0 commit comments