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.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/git/file_auto_fixup.rb +22 -3
  3. data/lib/avm/instances/base/auto_values/database.rb +10 -0
  4. data/lib/avm/instances/base/auto_values/filesystem.rb +12 -0
  5. data/lib/avm/instances/entry_keys.rb +1 -1
  6. data/lib/avm/instances/runner.rb +2 -4
  7. data/lib/avm/projects/stereotypes/git/update.rb +42 -0
  8. data/lib/avm/projects/stereotypes/git/update/subrepo.rb +85 -0
  9. data/lib/avm/tools/runner.rb +2 -4
  10. data/lib/avm/tools/runner/eac_rails_base0.rb +1 -1
  11. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
  12. data/lib/avm/tools/runner/eac_redmine_base0.rb +1 -1
  13. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
  14. data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
  15. data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +1 -1
  16. data/lib/avm/tools/runner/eac_wordpress_base0.rb +1 -1
  17. data/lib/avm/tools/runner/eac_writings_base0.rb +1 -1
  18. data/lib/avm/tools/runner/eac_writings_base1.rb +1 -1
  19. data/lib/avm/tools/runner/files.rb +7 -15
  20. data/lib/avm/tools/runner/files/format.rb +18 -27
  21. data/lib/avm/tools/runner/files/rotate.rb +11 -21
  22. data/lib/avm/tools/runner/git.rb +10 -15
  23. data/lib/avm/tools/runner/git/auto_commit.rb +2 -2
  24. data/lib/avm/tools/runner/git/auto_fixup.rb +23 -16
  25. data/lib/avm/tools/runner/git/commit.rb +2 -2
  26. data/lib/avm/tools/runner/git/deploy.rb +18 -28
  27. data/lib/avm/tools/runner/git/dirty_files.rb +2 -2
  28. data/lib/avm/tools/runner/git/issue.rb +2 -2
  29. data/lib/avm/tools/runner/git/organize.rb +2 -2
  30. data/lib/avm/tools/runner/git/revisions_test.rb +2 -2
  31. data/lib/avm/tools/runner/git/subrepo.rb +2 -2
  32. data/lib/avm/tools/runner/git/subrepo/check.rb +2 -2
  33. data/lib/avm/tools/runner/git/subrepo/clone.rb +2 -2
  34. data/lib/avm/tools/runner/git/subrepo/fix.rb +4 -3
  35. data/lib/avm/tools/runner/instance.rb +1 -1
  36. data/lib/avm/tools/runner/instance/info.rb +1 -1
  37. data/lib/avm/tools/runner/launcher.rb +1 -1
  38. data/lib/avm/tools/runner/launcher/instances.rb +1 -1
  39. data/lib/avm/tools/runner/launcher/projects.rb +1 -1
  40. data/lib/avm/tools/runner/launcher/publish.rb +1 -1
  41. data/lib/avm/tools/runner/local_project.rb +5 -8
  42. data/lib/avm/tools/runner/local_project/eac_writings_base0.rb +5 -6
  43. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +4 -6
  44. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +4 -5
  45. data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +4 -5
  46. data/lib/avm/tools/runner/local_project/eac_writings_base1.rb +2 -2
  47. data/lib/avm/tools/runner/local_project/eac_writings_base1/build.rb +2 -2
  48. data/lib/avm/tools/runner/local_project/info.rb +2 -2
  49. data/lib/avm/tools/runner/local_project/ruby.rb +2 -2
  50. data/lib/avm/tools/runner/local_project/ruby/bundler.rb +2 -2
  51. data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +2 -2
  52. data/lib/avm/tools/runner/local_project/test.rb +2 -2
  53. data/lib/avm/tools/runner/local_project/update.rb +2 -2
  54. data/lib/avm/tools/runner/local_project/version_bump.rb +10 -13
  55. data/lib/avm/tools/runner/ruby.rb +1 -1
  56. data/lib/avm/tools/runner/ruby/gems.rb +1 -1
  57. data/lib/avm/tools/runner/ruby/gems/generate.rb +1 -1
  58. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  59. data/lib/avm/tools/runner/self.rb +1 -1
  60. data/lib/avm/tools/runner/self/docker.rb +1 -1
  61. data/lib/avm/tools/version.rb +1 -1
  62. data/template/avm/eac_rails_base0/deploy/config/database.yml.template +3 -2
  63. data/vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb +15 -0
  64. data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +5 -0
  65. data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
  66. data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
  67. data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
  68. data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
  69. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +45 -0
  70. data/vendor/eac_cli/lib/eac_cli/runner.rb +0 -48
  71. data/vendor/eac_cli/lib/eac_cli/runner/after_class_methods.rb +29 -0
  72. data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +31 -0
  73. data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +15 -3
  74. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  75. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +22 -1
  76. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +1 -0
  77. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +9 -6
  78. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
  79. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  80. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +16 -6
  81. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +2 -99
  82. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
  83. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
  84. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
  85. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +10 -1
  86. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
  87. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +4 -1
  88. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +38 -0
  89. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
  90. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +8 -0
  91. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
  92. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
  93. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +3 -2
  94. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  95. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +8 -0
  96. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +14 -4
  97. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +30 -0
  98. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
  99. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
  100. metadata +18 -3
  101. 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