avm-tools 0.90.0 → 0.94.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/eac_asciidoctor_base0/apache_path.rb +10 -0
  3. data/lib/avm/eac_asciidoctor_base0/build.rb +3 -1
  4. data/lib/avm/eac_asciidoctor_base0/build/file.rb +3 -3
  5. data/lib/avm/eac_rails_base0/apache_path.rb +6 -38
  6. data/lib/avm/eac_webapp_base0/apache_host.rb +7 -31
  7. data/lib/avm/eac_webapp_base0/apache_path.rb +51 -0
  8. data/lib/avm/eac_webapp_base0/deploy.rb +12 -30
  9. data/lib/avm/eac_webapp_base0/runner/apache_host.rb +7 -10
  10. data/lib/avm/eac_webapp_base0/runner/apache_path.rb +40 -0
  11. data/lib/avm/eac_webapp_base0/runner/data.rb +6 -15
  12. data/lib/avm/eac_webapp_base0/runner/data/dump.rb +18 -24
  13. data/lib/avm/eac_webapp_base0/runner/data/load.rb +12 -23
  14. data/lib/avm/executables.rb +1 -1
  15. data/lib/avm/git/auto_commit/commit_info.rb +23 -0
  16. data/lib/avm/git/auto_commit/rules.rb +31 -0
  17. data/lib/avm/git/auto_commit/rules/base.rb +39 -0
  18. data/lib/avm/git/auto_commit/rules/last.rb +19 -0
  19. data/lib/avm/git/auto_commit/rules/manual.rb +45 -0
  20. data/lib/avm/git/auto_commit/rules/new.rb +24 -0
  21. data/lib/avm/git/auto_commit/rules/nth.rb +31 -0
  22. data/lib/avm/git/auto_commit/rules/unique.rb +21 -0
  23. data/lib/avm/git/auto_commit_path.rb +0 -21
  24. data/lib/avm/git/file_auto_fixup.rb +26 -57
  25. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +7 -11
  26. data/lib/avm/tools/runner/git/auto_commit.rb +30 -31
  27. data/lib/avm/tools/runner/git/commit.rb +11 -20
  28. data/lib/avm/tools/runner/git/subrepo/fix.rb +1 -1
  29. data/lib/avm/tools/runner/local_project/ruby.rb +3 -7
  30. data/lib/avm/tools/runner/local_project/ruby/bundler.rb +1 -1
  31. data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +1 -1
  32. data/lib/avm/tools/runner/ruby.rb +6 -14
  33. data/lib/avm/tools/runner/ruby/gems.rb +4 -7
  34. data/lib/avm/tools/runner/ruby/gems/generate.rb +12 -23
  35. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  36. data/lib/avm/tools/version.rb +1 -1
  37. data/template/avm/eac_rails_base0/apache_path/extra_content.conf +5 -0
  38. data/template/avm/eac_webapp_base0/apache_path/default.conf +9 -0
  39. data/vendor/avm-apps/Gemfile +5 -0
  40. data/vendor/avm-apps/avm-apps.gemspec +18 -0
  41. data/vendor/avm-apps/lib/avm/apps.rb +9 -0
  42. data/vendor/avm-apps/lib/avm/apps/jobs.rb +11 -0
  43. data/vendor/avm-apps/lib/avm/apps/jobs/base.rb +64 -0
  44. data/vendor/avm-apps/lib/avm/apps/jobs/variables_source.rb +24 -0
  45. data/vendor/avm-apps/lib/avm/apps/version.rb +7 -0
  46. data/vendor/avm-apps/spec/rubocop_spec.rb +7 -0
  47. data/vendor/avm-apps/spec/spec_helper.rb +100 -0
  48. data/vendor/eac_cli/lib/eac_cli/core_ext.rb +2 -0
  49. data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +4 -7
  50. data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +8 -0
  51. data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +21 -9
  52. data/vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +47 -0
  53. data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +8 -0
  54. data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +12 -0
  55. data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +15 -1
  56. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +4 -2
  57. data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +3 -17
  58. data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +2 -1
  59. data/vendor/eac_cli/lib/eac_cli/runner_with_set.rb +50 -0
  60. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  61. data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +4 -0
  62. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +21 -3
  63. data/vendor/eac_git/lib/eac_git/local/dirty_files.rb +2 -3
  64. data/vendor/eac_git/lib/eac_git/version.rb +1 -1
  65. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/core_ext.rb +4 -0
  66. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +31 -0
  67. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +4 -0
  68. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +4 -0
  69. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +10 -0
  70. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +5 -0
  71. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +5 -0
  72. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +9 -0
  73. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb +36 -0
  74. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +52 -0
  75. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  76. data/vendor/eac_ruby_base0/spec/lib/eac_ruby_base0/runner_with/confirmation_spec.rb +42 -0
  77. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +8 -2
  78. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
  79. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
  80. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
  81. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  82. metadata +60 -5
  83. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +0 -38
  84. data/lib/avm/tools/runner/git/auto_fixup.rb +0 -53
  85. data/template/avm/eac_rails_base0/apache_path/default.conf +0 -13
@@ -24,11 +24,7 @@ module EacCli
24
24
  end
25
25
 
26
26
  def collect(option, value)
27
- if data[option].is_a?(::Array)
28
- data[option] << value
29
- else
30
- data[option] = value
31
- end
27
+ data[option] = option.build_value(value, data[option])
32
28
  end
33
29
 
34
30
  def supplied?(option)
@@ -42,18 +38,8 @@ module EacCli
42
38
  end
43
39
 
44
40
  def default_values
45
- definition.options.each { |option| data[option] = option_default_value(option) }
46
- definition.positional.each do |positional|
47
- data[positional] = positional_default_value(positional)
48
- end
49
- end
50
-
51
- def option_default_value(option)
52
- option.argument? ? nil : false
53
- end
54
-
55
- def positional_default_value(positional)
56
- positional.repeat? ? [] : nil
41
+ definition.options.each { |option| data[option] = option.default_value }
42
+ definition.positional.each { |positional| data[positional] = positional.default_value }
57
43
  end
58
44
  end
59
45
  end
@@ -3,6 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'eac_cli/runner'
5
5
  require 'eac_cli/runner_with'
6
+ require 'eac_cli/runner_with_set'
6
7
 
7
8
  class Object
8
9
  def runner_with(*runners, &block)
@@ -10,7 +11,7 @@ class Object
10
11
  enable_simple_cache
11
12
  enable_console_speaker
12
13
  runners.each do |runner|
13
- include runner_with_to_module(runner)
14
+ include ::EacCli::RunnerWithSet.default.item_to_module(runner)
14
15
  end
15
16
  runner_definition(&block) if block
16
17
  end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacCli
4
+ class RunnerWithSet
5
+ class << self
6
+ def default
7
+ @default ||= new
8
+ end
9
+ end
10
+
11
+ def add_namespace(namespace)
12
+ namespace = sanitize_namespace(namespace)
13
+ raise "\"#{namespace}\" already was included" if namespace_set.include?(namespace)
14
+
15
+ namespace_set << namespace
16
+ self
17
+ end
18
+
19
+ def item_to_module(item)
20
+ item.is_a?(::Module) ? item : key_to_module(item)
21
+ end
22
+
23
+ def namespaces
24
+ namespace_set.dup
25
+ end
26
+
27
+ private
28
+
29
+ def namespace_set
30
+ @namespace_set ||= ::Array.new
31
+ end
32
+
33
+ def key_to_module(key)
34
+ namespace_set.lazy
35
+ .map { |namespace| key_to_module_in_namespace(namespace, key) }
36
+ .find(&:present?) ||
37
+ raise("Not module found with key \"#{key}\" (Namespaces: #{namespace_set})")
38
+ end
39
+
40
+ def key_to_module_in_namespace(namespace, key)
41
+ namespace.const_get(key.to_s.camelize)
42
+ rescue ::NameError
43
+ nil
44
+ end
45
+
46
+ def sanitize_namespace(source)
47
+ source.is_a?(::Module) ? source : source.to_s.constantize
48
+ end
49
+ end
50
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.12.6'
4
+ VERSION = '0.15.1'
5
5
  end
@@ -7,6 +7,10 @@ RSpec.describe ::EacCli::Definition::Alternative do
7
7
 
8
8
  it { expect { instance.arg_opt '-a', '--opt2', 'A argument option' }.not_to raise_error }
9
9
  it { expect { instance.bool_opt '-b', '--opt1', 'A boolean option' }.not_to raise_error }
10
+ it { expect { instance.bool_opt '-b', '--no-description' }.not_to raise_error }
11
+ it { expect { instance.bool_opt '--opt1', 'A option without short' }.not_to raise_error }
12
+ it { expect { instance.bool_opt '-b', 'A option without long' }.not_to raise_error }
13
+ it { expect { instance.bool_opt 'A option without selectors' }.to raise_error(::StandardError) }
10
14
  it { expect { instance.options_argument(true) }.not_to raise_error }
11
15
  it { expect { instance.pos_arg :pos1 }.not_to raise_error }
12
16
  it { expect { instance.pos_arg :pos2, optional: true, repeat: true }.not_to raise_error }
@@ -12,6 +12,8 @@ RSpec.describe ::EacCli::Runner do
12
12
  runner_definition do
13
13
  arg_opt '-o', '--opt1', 'A arg option.'
14
14
  bool_opt '-p', '--opt2', 'A boolean option'
15
+ arg_opt '-q', '--opt4', 'A repeatable argument option.', repeat: true
16
+ bool_opt '-r', '--opt5', 'A repeatable boolean option', repeat: true
15
17
  pos_arg :pos1
16
18
  pos_arg :pos2, repeat: true, optional: true
17
19
  alt do
@@ -29,7 +31,7 @@ RSpec.describe ::EacCli::Runner do
29
31
  context 'when all args are supplied' do
30
32
  let(:argv) { %w[--opt1 aaa --opt2 bbb ccc ddd] }
31
33
  let(:parsed_expected) do
32
- { opt1: 'aaa', opt2: true, opt3: false, pos1: 'bbb',
34
+ { opt1: 'aaa', opt2: true, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
33
35
  pos2: %w[ccc ddd] }
34
36
  end
35
37
 
@@ -63,7 +65,10 @@ RSpec.describe ::EacCli::Runner do
63
65
 
64
66
  context 'when only required args are supplied' do
65
67
  let(:argv) { %w[bbb] }
66
- let(:parsed_expected) { { opt1: nil, opt2: false, opt3: false, pos1: 'bbb', pos2: [] } }
68
+ let(:parsed_expected) do
69
+ { opt1: nil, opt2: false, opt3: false, opt4: [], opt5: 0, pos1: 'bbb',
70
+ pos2: [] }
71
+ end
67
72
 
68
73
  it { expect(parsed_actual).to eq(parsed_expected) }
69
74
  it { expect(instance.parsed.opt1).to be_nil }
@@ -82,12 +87,25 @@ RSpec.describe ::EacCli::Runner do
82
87
 
83
88
  context 'when alternative args are supplied' do
84
89
  let(:argv) { %w[--opt3] }
85
- let(:parsed_expected) { { opt1: nil, opt2: false, opt3: true, pos1: nil, pos2: [] } }
90
+ let(:parsed_expected) do
91
+ { opt1: nil, opt2: false, opt3: true, opt4: [], opt5: 0, pos1: nil,
92
+ pos2: [] }
93
+ end
86
94
 
87
95
  it { expect(parsed_actual).to eq(parsed_expected) }
88
96
  it { expect(instance.parsed.opt3?).to eq(true) }
89
97
  end
90
98
 
99
+ context 'when repeated options are supplied' do
100
+ let(:argv) { %w[--opt5 -rrr --opt4=A -q B --opt4 C AAA] }
101
+ let(:parsed_expected) do
102
+ { opt1: nil, opt2: false, opt3: false, opt4: %w[A B C], opt5: 4, pos1: 'AAA',
103
+ pos2: [] }
104
+ end
105
+
106
+ it { expect(parsed_actual).to eq(parsed_expected) }
107
+ end
108
+
91
109
  context 'when extra args are not supplied' do
92
110
  let(:runner_class) do
93
111
  the_module = described_class
@@ -20,9 +20,8 @@ module EacGit
20
20
  end
21
21
 
22
22
  def dirty_files
23
- command('status', '--porcelain', '--untracked-files').execute!.each_line.map do |line|
24
- parse_status_line(line.gsub(/\n\z/, ''))
25
- end
23
+ command('status', '--porcelain=v1', '--untracked-files', '--no-renames')
24
+ .execute!.each_line.map { |line| parse_status_line(line.gsub(/\n\z/, '')) }
26
25
  end
27
26
 
28
27
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacGit
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'eac_ruby_base0/patches'
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/console/speaker'
4
+ require 'eac_ruby_utils/settings_provider'
5
+
6
+ module EacRubyBase0
7
+ module JobsRunner
8
+ common_concern do
9
+ include ::EacRubyUtils::Console::Speaker
10
+ include ::EacRubyUtils::SettingsProvider
11
+ end
12
+
13
+ def run_job(job)
14
+ return unless run_job?(job)
15
+
16
+ infom "Running job \"#{job}\"..."
17
+ send(job)
18
+ end
19
+
20
+ def run_job?(job)
21
+ the_method = "run_#{job}?"
22
+ respond_to?(the_method, true) ? send(the_method) : true
23
+ end
24
+
25
+ def run_jobs(*jobs)
26
+ jobs = setting_value(:jobs) if jobs.empty?
27
+ jobs.each { |job| run_job(job) }
28
+ success 'Done'
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ ::EacRubyUtils.require_sub(__FILE__)
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/require_sub'
4
+ ::EacRubyUtils.require_sub(__FILE__)
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_base0/jobs_runner'
4
+ require 'eac_ruby_utils/patch'
5
+
6
+ class Class
7
+ def enable_jobs_runner
8
+ ::EacRubyUtils.patch(self, ::EacRubyBase0::JobsRunner)
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ Dir["#{File.dirname(__FILE__)}/#{::File.basename(__FILE__, '.*')}/*.rb"].sort.each do |path|
4
+ require path
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'eac_ruby_base0/runner_with'
5
+ ::EacCli::RunnerWithSet.default.add_namespace(::EacRubyBase0::RunnerWith)
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacRubyBase0
6
+ module RunnerWith
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/runner'
4
+ require 'eac_ruby_utils/core_ext'
5
+ require 'eac_ruby_utils/fs/traversable'
6
+
7
+ module EacRubyBase0
8
+ module RunnerWith
9
+ module Confirmation
10
+ DEFAULT_CONFIRM_QUESTION_TEXT = 'Confirm?'
11
+
12
+ common_concern do
13
+ include ::EacCli::Runner
14
+ enable_settings_provider
15
+ runner_definition do
16
+ bool_opt '--no', 'Deny confirmation without question.'
17
+ bool_opt '--yes', 'Accept confirmation without question.'
18
+ end
19
+ end
20
+
21
+ def confirm?(message = nil)
22
+ return false if parsed.no?
23
+ return true if parsed.yes?
24
+
25
+ request_input(
26
+ message || setting_value(:confirm_question_text, default: DEFAULT_CONFIRM_QUESTION_TEXT),
27
+ bool: true
28
+ )
29
+ end
30
+
31
+ def run_confirm(message = nil)
32
+ yield if confirm?(message)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/runner'
4
+ require 'eac_ruby_utils/core_ext'
5
+ require 'eac_ruby_utils/fs/traversable'
6
+ require 'eac_ruby_utils/settings_provider'
7
+
8
+ module EacRubyBase0
9
+ module RunnerWith
10
+ module FilesystemTraverser
11
+ DEFAULT_DEFAULT_TRAVERSER_RECURSIVE = false
12
+
13
+ common_concern do
14
+ include ::EacCli::Runner
15
+ include ::EacRubyUtils::Fs::Traversable
16
+ enable_settings_provider
17
+ include TopMethods
18
+ runner_definition do
19
+ bool_opt '-R', '--recursive', 'Recursive.'
20
+ bool_opt '--no-recursive', 'No recursive.'
21
+ pos_arg :paths, optional: true, repeat: true
22
+ end
23
+ end
24
+
25
+ module TopMethods
26
+ def on_none_path_informed
27
+ infom 'Warning: none path informed'
28
+ end
29
+
30
+ def paths
31
+ parsed.paths.map(&:to_pathname)
32
+ end
33
+
34
+ def run_filesystem_traverser
35
+ if parsed.paths.any?
36
+ parsed.paths.each { |path| traverser_check_path(path) }
37
+ else
38
+ on_none_path_informed
39
+ end
40
+ end
41
+
42
+ def traverser_recursive
43
+ return false if parsed.no_recursive?
44
+ return true if parsed.recursive?
45
+
46
+ setting_value(:default_traverser_recursive, required: false)
47
+ .if_not_nil(DEFAULT_DEFAULT_TRAVERSER_RECURSIVE)
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.3.3'
4
+ VERSION = '0.5.0'
5
5
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_base0/runner_with/confirmation'
4
+
5
+ ::RSpec.describe ::EacRubyBase0::RunnerWith::Confirmation do
6
+ let(:runner) do
7
+ the_module = described_class
8
+ Class.new do
9
+ include the_module
10
+
11
+ runner_definition do
12
+ desc 'A stub runner.'
13
+ end
14
+
15
+ def run
16
+ if confirm?
17
+ ::Kernel.puts 'Accepted'
18
+ else
19
+ ::Kernel.puts 'Denied'
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ let(:instance) { runner.create(argv: runner_argv) }
26
+
27
+ context 'without --no option' do
28
+ let(:runner_argv) { %w[--no] }
29
+
30
+ it do
31
+ expect { instance.run }.to output("Denied\n").to_stdout_from_any_process
32
+ end
33
+ end
34
+
35
+ context 'without --yes option' do
36
+ let(:runner_argv) { %w[--yes] }
37
+
38
+ it do
39
+ expect { instance.run }.to output("Accepted\n").to_stdout_from_any_process
40
+ end
41
+ end
42
+ end
@@ -10,6 +10,7 @@ module EacRubyUtils
10
10
  class << self
11
11
  TIMEDATECTL_TIMEZONE_LINE_PATTERN = %r{\s*Time zone:\s*(\S+/\S+)\s}.freeze
12
12
 
13
+ # @return [ActiveSupport::TimeZone]
13
14
  def auto
14
15
  %w[tz_env debian_config offset].lazy.map { |s| send("by_#{s}") }.find(&:present?)
15
16
  end
@@ -18,22 +19,27 @@ module EacRubyUtils
18
19
  ::Time.zone = auto
19
20
  end
20
21
 
22
+ # @return [ActiveSupport::TimeZone]
21
23
  def by_debian_config
22
24
  path = ::Pathname.new(DEBIAN_CONFIG_PATH)
23
- path.exist? ? path.read.strip.presence : nil
25
+ path.exist? ? path.read.strip.if_present { |v| ::ActiveSupport::TimeZone[v] } : nil
24
26
  end
25
27
 
28
+ # @return [ActiveSupport::TimeZone]
26
29
  def by_offset
27
- ::ActiveSupport::TimeZone[::Time.now.getlocal.gmt_offset].name
30
+ ::ActiveSupport::TimeZone[::Time.now.getlocal.gmt_offset]
28
31
  end
29
32
 
33
+ # @return [ActiveSupport::TimeZone]
30
34
  def by_timedatectl
31
35
  executable = ::EacRubyUtils::Envs.local.executable('timedatectl', '--version')
32
36
  return nil unless executable.exist?
33
37
 
34
38
  TIMEDATECTL_TIMEZONE_LINE_PATTERN.if_match(executable.command.execute!) { |m| m[1] }
39
+ .if_present { |v| ::ActiveSupport::TimeZone[v] }
35
40
  end
36
41
 
42
+ # @return [ActiveSupport::TimeZone]
37
43
  def by_tz_env
38
44
  ENV['TZ'].presence
39
45
  end