File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11module Bashly
22 class Settings
33 class << self
4- attr_writer :source_dir , :target_dir
4+ attr_writer :source_dir , :target_dir , :strict
55
66 def source_dir
77 @source_dir ||= ENV [ 'BASHLY_SOURCE_DIR' ] || 'src'
@@ -10,6 +10,10 @@ def source_dir
1010 def target_dir
1111 @target_dir ||= ENV [ 'BASHLY_TARGET_DIR' ] || '.'
1212 end
13+
14+ def strict
15+ @strict ||= ENV [ 'BASHLY_STRICT' ] || '.'
16+ end
1317 end
1418 end
1519end
Original file line number Diff line number Diff line change 22initialize() {
33 version="<%= version %> "
44 long_usage=''
5- <%= ENV['BASHLY_STRICT'] ? "set -euo pipefail" : "set -e" %>
5+ <%= Settings.strict ? "set -euo pipefail" : "set -e" %>
66
77<%= load_user_file("initialize.sh", placeholder: false).indent 2 %>
88}
Original file line number Diff line number Diff line change 1414# Set up working directory for the specs
1515Settings . source_dir = 'spec/tmp/src'
1616Settings . target_dir = 'spec/tmp'
17+ Settings . strict = '1' # generate scripts with `set -euo pipefile`
1718reset_tmp_dir
1819
1920# Consistent Colsole output (for rspec_fixtures)
2021ENV [ 'TTY' ] = 'off'
2122ENV [ 'COLUMNS' ] = '80'
2223ENV [ 'LINES' ] = '30'
2324
24- # Force generated scripts to strict mode (set -euo pipefile)
25- ENV [ 'BASHLY_STRICT' ] = '1'
2625
2726RSpec . configure do |c |
2827 c . include SpecMixin
You can’t perform that action at this time.
0 commit comments