File tree Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 11module Bashly
22 module Commands
33 class Generate < Base
4- using ComposeRefinements
5-
64 help "Generate the bash script and required files"
75
86 usage "bashly generate [--force --quiet --upgrade --wrap FUNCTION]"
@@ -118,7 +116,7 @@ def master_script_path
118116 end
119117
120118 def config
121- @config ||= Config . new ( "#{ Settings . source_dir } /bashly.yml" ) . compose
119+ @config ||= Config . new "#{ Settings . source_dir } /bashly.yml"
122120 end
123121
124122 def command
Original file line number Diff line number Diff line change 11module Bashly
22 module Commands
33 class Preview < Base
4- using ComposeRefinements
5-
64 help "Generate the bash script to STDOUT"
75
86 usage "bashly preview"
@@ -11,7 +9,7 @@ class Preview < Base
119 environment "BASHLY_SOURCE_DIR" , "The path containing the bashly configuration and source files [default: src]"
1210
1311 def run
14- config = Config . new ( "#{ Settings . source_dir } /bashly.yml" ) . compose
12+ config = Config . new "#{ Settings . source_dir } /bashly.yml"
1513 command = Script ::Command . new ( config )
1614 script = Script ::Wrapper . new command
1715 puts script . code
Original file line number Diff line number Diff line change 11module Bashly
22 module Commands
33 class Validate < Base
4- using ComposeRefinements
5-
64 help "Scan the configuration file for errors"
75
86 usage "bashly validate"
@@ -11,7 +9,7 @@ class Validate < Base
119 environment "BASHLY_SOURCE_DIR" , "The path containing the bashly configuration and source files [default: src]"
1210
1311 def run
14- config = Config . new ( "#{ Settings . source_dir } /bashly.yml" ) . compose
12+ config = Config . new "#{ Settings . source_dir } /bashly.yml"
1513 validator = ConfigValidator . new config
1614 validator . validate
1715 say "!txtgrn!OK"
Original file line number Diff line number Diff line change @@ -4,11 +4,13 @@ module Bashly
44 # A convenience class to use either a hash or a filename as a configuration
55 # source
66 class Config
7+ using ComposeRefinements
8+
79 attr_reader :config
810
911 def self . new ( config )
1012 if config . is_a? String
11- YAML . load_file config
13+ YAML . load_file ( config ) . compose
1214 else
1315 config
1416 end
Original file line number Diff line number Diff line change 11module Bashly
22 module Libraries
33 class Completions < Base
4- using ComposeRefinements
5-
64 protected
75 def command
86 @command ||= Script ::Command . new config
97 end
108
119 def config
12- @config ||= Bashly ::Config . new ( "#{ Settings . source_dir } /bashly.yml" ) . compose
10+ @config ||= Bashly ::Config . new "#{ Settings . source_dir } /bashly.yml"
1311 end
1412 end
1513 end
You can’t perform that action at this time.
0 commit comments