File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ module Cuber
1313 class CLI
1414
1515 def initialize
16+ file_path = ARGV [ 1 ] || 'Cuberfile'
17+
1618 @options = { }
1719 parse_command!
18- parse_cuberfile
20+ parse_cuberfile ( file_path )
1921 validate_cuberfile
2022 execute
2123 end
@@ -26,9 +28,9 @@ def parse_command!
2628 @options [ :cmd ] = ARGV . shift &.to_sym
2729 end
2830
29- def parse_cuberfile
30- abort 'Cuberfile not found in current directory' unless File . exist? 'Cuberfile'
31- content = File . read 'Cuberfile'
31+ def parse_cuberfile ( file_path )
32+ abort 'Cuberfile not found in current directory' unless File . exist? file_path
33+ content = File . read file_path
3234 parser = CuberfileParser . new
3335 parser . instance_eval ( content )
3436 cuberfile_options = parser . instance_variables . map do |name |
You can’t perform that action at this time.
0 commit comments