avm-tools 0.84.0 → 0.87.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/git/file_auto_fixup.rb +22 -3
- data/lib/avm/instances/base/auto_values/database.rb +10 -0
- data/lib/avm/instances/base/auto_values/filesystem.rb +12 -0
- data/lib/avm/instances/entry_keys.rb +1 -1
- data/lib/avm/instances/runner.rb +2 -4
- data/lib/avm/projects/stereotypes/git/update.rb +42 -0
- data/lib/avm/projects/stereotypes/git/update/subrepo.rb +85 -0
- data/lib/avm/tools/runner.rb +2 -4
- data/lib/avm/tools/runner/eac_rails_base0.rb +1 -1
- data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +1 -1
- data/lib/avm/tools/runner/eac_wordpress_base0.rb +1 -1
- data/lib/avm/tools/runner/eac_writings_base0.rb +1 -1
- data/lib/avm/tools/runner/eac_writings_base1.rb +1 -1
- data/lib/avm/tools/runner/files.rb +7 -15
- data/lib/avm/tools/runner/files/format.rb +18 -27
- data/lib/avm/tools/runner/files/rotate.rb +11 -21
- data/lib/avm/tools/runner/git.rb +10 -15
- data/lib/avm/tools/runner/git/auto_commit.rb +2 -2
- data/lib/avm/tools/runner/git/auto_fixup.rb +23 -16
- data/lib/avm/tools/runner/git/commit.rb +2 -2
- data/lib/avm/tools/runner/git/deploy.rb +18 -28
- data/lib/avm/tools/runner/git/dirty_files.rb +2 -2
- data/lib/avm/tools/runner/git/issue.rb +2 -2
- data/lib/avm/tools/runner/git/organize.rb +2 -2
- data/lib/avm/tools/runner/git/revisions_test.rb +2 -2
- data/lib/avm/tools/runner/git/subrepo.rb +2 -2
- data/lib/avm/tools/runner/git/subrepo/check.rb +2 -2
- data/lib/avm/tools/runner/git/subrepo/clone.rb +2 -2
- data/lib/avm/tools/runner/git/subrepo/fix.rb +4 -3
- data/lib/avm/tools/runner/instance.rb +1 -1
- data/lib/avm/tools/runner/instance/info.rb +1 -1
- data/lib/avm/tools/runner/launcher.rb +1 -1
- data/lib/avm/tools/runner/launcher/instances.rb +1 -1
- data/lib/avm/tools/runner/launcher/projects.rb +1 -1
- data/lib/avm/tools/runner/launcher/publish.rb +1 -1
- data/lib/avm/tools/runner/local_project.rb +5 -8
- data/lib/avm/tools/runner/local_project/eac_writings_base0.rb +5 -6
- data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +4 -6
- data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +4 -5
- data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +4 -5
- data/lib/avm/tools/runner/local_project/eac_writings_base1.rb +2 -2
- data/lib/avm/tools/runner/local_project/eac_writings_base1/build.rb +2 -2
- data/lib/avm/tools/runner/local_project/info.rb +2 -2
- data/lib/avm/tools/runner/local_project/ruby.rb +2 -2
- data/lib/avm/tools/runner/local_project/ruby/bundler.rb +2 -2
- data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +2 -2
- data/lib/avm/tools/runner/local_project/test.rb +2 -2
- data/lib/avm/tools/runner/local_project/update.rb +2 -2
- data/lib/avm/tools/runner/local_project/version_bump.rb +10 -13
- data/lib/avm/tools/runner/ruby.rb +1 -1
- data/lib/avm/tools/runner/ruby/gems.rb +1 -1
- data/lib/avm/tools/runner/ruby/gems/generate.rb +1 -1
- data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
- data/lib/avm/tools/runner/self.rb +1 -1
- data/lib/avm/tools/runner/self/docker.rb +1 -1
- data/lib/avm/tools/version.rb +1 -1
- data/template/avm/eac_rails_base0/deploy/config/database.yml.template +3 -2
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb +15 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +5 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +45 -0
- data/vendor/eac_cli/lib/eac_cli/runner.rb +0 -48
- data/vendor/eac_cli/lib/eac_cli/runner/after_class_methods.rb +29 -0
- data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +31 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +15 -3
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +22 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +1 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +9 -6
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +16 -6
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +2 -99
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +10 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +4 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +38 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +8 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +3 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +8 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +14 -4
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +30 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
- metadata +18 -3
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb +0 -25
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/core_ext/time/zones'
|
4
|
-
require 'eac_ruby_utils/envs'
|
5
|
-
|
6
|
-
class Time
|
7
|
-
class << self
|
8
|
-
TIMEDATECTL_TIMEZONE_LINE_PATTERN = %r{\s*Time zone:\s*(\S+/\S+)\s}.freeze
|
9
|
-
|
10
|
-
def local_time_zone
|
11
|
-
local_time_zone_by_timedatectl || local_time_zone_by_offset
|
12
|
-
end
|
13
|
-
|
14
|
-
def local_time_zone_by_timedatectl
|
15
|
-
executable = ::EacRubyUtils::Envs.local.executable('timedatectl', '--version')
|
16
|
-
return nil unless executable.exist?
|
17
|
-
|
18
|
-
TIMEDATECTL_TIMEZONE_LINE_PATTERN.if_match(executable.command.execute!) { |m| m[1] }
|
19
|
-
end
|
20
|
-
|
21
|
-
def local_time_zone_by_offset
|
22
|
-
::ActiveSupport::TimeZone[::Time.now.getlocal.gmt_offset].name
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|