avm-tools 0.86.0 → 0.87.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/git/file_auto_fixup.rb +22 -3
  3. data/lib/avm/tools/runner.rb +2 -4
  4. data/lib/avm/tools/runner/eac_rails_base0.rb +1 -1
  5. data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +1 -1
  6. data/lib/avm/tools/runner/eac_redmine_base0.rb +1 -1
  7. data/lib/avm/tools/runner/eac_redmine_base0/core_update.rb +1 -1
  8. data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +1 -1
  9. data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +1 -1
  10. data/lib/avm/tools/runner/eac_wordpress_base0.rb +1 -1
  11. data/lib/avm/tools/runner/eac_writings_base0.rb +1 -1
  12. data/lib/avm/tools/runner/eac_writings_base1.rb +1 -1
  13. data/lib/avm/tools/runner/files.rb +7 -15
  14. data/lib/avm/tools/runner/files/format.rb +18 -27
  15. data/lib/avm/tools/runner/files/rotate.rb +11 -21
  16. data/lib/avm/tools/runner/git.rb +10 -15
  17. data/lib/avm/tools/runner/git/auto_commit.rb +2 -2
  18. data/lib/avm/tools/runner/git/auto_fixup.rb +23 -16
  19. data/lib/avm/tools/runner/git/commit.rb +2 -2
  20. data/lib/avm/tools/runner/git/deploy.rb +18 -28
  21. data/lib/avm/tools/runner/git/dirty_files.rb +2 -2
  22. data/lib/avm/tools/runner/git/issue.rb +2 -2
  23. data/lib/avm/tools/runner/git/organize.rb +2 -2
  24. data/lib/avm/tools/runner/git/revisions_test.rb +2 -2
  25. data/lib/avm/tools/runner/git/subrepo.rb +2 -2
  26. data/lib/avm/tools/runner/git/subrepo/check.rb +2 -2
  27. data/lib/avm/tools/runner/git/subrepo/clone.rb +2 -2
  28. data/lib/avm/tools/runner/git/subrepo/fix.rb +4 -3
  29. data/lib/avm/tools/runner/instance.rb +1 -1
  30. data/lib/avm/tools/runner/instance/info.rb +1 -1
  31. data/lib/avm/tools/runner/launcher.rb +1 -1
  32. data/lib/avm/tools/runner/launcher/instances.rb +1 -1
  33. data/lib/avm/tools/runner/launcher/projects.rb +1 -1
  34. data/lib/avm/tools/runner/launcher/publish.rb +1 -1
  35. data/lib/avm/tools/runner/local_project.rb +5 -8
  36. data/lib/avm/tools/runner/local_project/eac_writings_base0.rb +2 -2
  37. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +2 -2
  38. data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +2 -2
  39. data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +2 -2
  40. data/lib/avm/tools/runner/local_project/eac_writings_base1.rb +2 -2
  41. data/lib/avm/tools/runner/local_project/eac_writings_base1/build.rb +2 -2
  42. data/lib/avm/tools/runner/local_project/info.rb +2 -2
  43. data/lib/avm/tools/runner/local_project/ruby.rb +2 -2
  44. data/lib/avm/tools/runner/local_project/ruby/bundler.rb +2 -2
  45. data/lib/avm/tools/runner/local_project/ruby/bundler/gemfile_lock.rb +2 -2
  46. data/lib/avm/tools/runner/local_project/test.rb +2 -2
  47. data/lib/avm/tools/runner/local_project/update.rb +2 -2
  48. data/lib/avm/tools/runner/local_project/version_bump.rb +10 -13
  49. data/lib/avm/tools/runner/ruby.rb +1 -1
  50. data/lib/avm/tools/runner/ruby/gems.rb +1 -1
  51. data/lib/avm/tools/runner/ruby/gems/generate.rb +1 -1
  52. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  53. data/lib/avm/tools/runner/self.rb +1 -1
  54. data/lib/avm/tools/runner/self/docker.rb +1 -1
  55. data/lib/avm/tools/version.rb +1 -1
  56. data/vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb +15 -0
  57. data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +5 -0
  58. data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
  59. data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
  60. data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
  61. data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
  62. data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +45 -0
  63. data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +14 -2
  64. data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
  65. data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +22 -1
  66. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +1 -0
  67. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +9 -6
  68. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +4 -9
  69. data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  70. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
  71. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +4 -1
  72. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
  73. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
  74. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  75. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +8 -0
  76. data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
  77. metadata +7 -2
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.3'
5
5
  end
@@ -57,8 +57,6 @@ module EacRubyUtils
57
57
  user_check_file(path)
58
58
  elsif path.directory?
59
59
  inner_check_directory(path, level)
60
- else
61
- raise "Unknown filesystem object: #{path}"
62
60
  end
63
61
  end
64
62
 
@@ -1,12 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'active_support/inflector'
4
+
3
5
  module EacRubyUtils
4
6
  class Inflector
5
7
  class << self
6
8
  VARIABLE_NAME_PATTERN = /[_a-z][_a-z0-9]*/i.freeze
7
9
 
8
10
  def variableize(string)
9
- r = string.gsub(/[^_a-z0-9]/i, '_').gsub(/_+/, '_').gsub(/_\z/, '').gsub(/\A_/, '').downcase
11
+ r = ::ActiveSupport::Inflector.transliterate(string).gsub(/[^_a-z0-9]/i, '_')
12
+ .gsub(/_+/, '_').gsub(/_\z/, '').gsub(/\A_/, '').downcase
10
13
  m = VARIABLE_NAME_PATTERN.match(r)
11
14
  return r if m
12
15
 
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/string/inflections'
4
+ require 'eac_ruby_utils/templates/searcher'
5
+
6
+ class Module
7
+ def template
8
+ @template ||= ::EacRubyUtils::Templates::Searcher.default.template(name.underscore)
9
+ end
10
+ end
@@ -1,15 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/string/inflections'
4
- require 'eac_ruby_utils/templates/searcher'
3
+ require 'eac_ruby_utils/patches/module/template'
5
4
 
6
5
  class Object
7
- class << self
8
- def template
9
- @template ||= ::EacRubyUtils::Templates::Searcher.default.template(name.underscore)
10
- end
11
- end
12
-
13
6
  def template
14
7
  self.class.template
15
8
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.56.2'
4
+ VERSION = '0.57.1'
5
5
  end
@@ -14,10 +14,18 @@ module EacRubyUtils
14
14
  ::YAML.dump(sanitize(object))
15
15
  end
16
16
 
17
+ def dump_file(path, object)
18
+ ::File.write(path.to_s, dump(object))
19
+ end
20
+
17
21
  def load(string)
18
22
  ::YAML.safe_load(string, permitted_classes)
19
23
  end
20
24
 
25
+ def load_file(path)
26
+ load(::File.read(path.to_s))
27
+ end
28
+
21
29
  def permitted_classes
22
30
  DEFAULT_PERMITTED_CLASSES
23
31
  end
@@ -5,7 +5,8 @@ require 'eac_ruby_utils/inflector'
5
5
  RSpec.describe ::EacRubyUtils::Inflector do
6
6
  describe '#variableize' do
7
7
  {
8
- '_A_variableName' => 'a_variablename'
8
+ '_A_variableName' => 'a_variablename',
9
+ 'àéíöũ' => 'aeiou'
9
10
  }.each do |source, expected|
10
11
  context "when source is \"#{source}\"" do
11
12
  it { expect(described_class.variableize(source)).to eq(expected) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.86.0
4
+ version: 0.87.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-28 00:00:00.000000000 Z
11
+ date: 2021-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -622,13 +622,17 @@ files:
622
622
  - vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb
623
623
  - vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb
624
624
  - vendor/eac_cli/lib/eac_cli/docopt/doc_builder/alternative.rb
625
+ - vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb
625
626
  - vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb
626
627
  - vendor/eac_cli/lib/eac_cli/parser.rb
627
628
  - vendor/eac_cli/lib/eac_cli/parser/alternative.rb
628
629
  - vendor/eac_cli/lib/eac_cli/parser/alternative/argv.rb
629
630
  - vendor/eac_cli/lib/eac_cli/parser/alternative/double_dash.rb
631
+ - vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb
632
+ - vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb
630
633
  - vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb
631
634
  - vendor/eac_cli/lib/eac_cli/parser/alternative/positionals.rb
635
+ - vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb
632
636
  - vendor/eac_cli/lib/eac_cli/parser/collector.rb
633
637
  - vendor/eac_cli/lib/eac_cli/parser/error.rb
634
638
  - vendor/eac_cli/lib/eac_cli/patches.rb
@@ -1014,6 +1018,7 @@ files:
1014
1018
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/patch.rb
1015
1019
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/require_sub.rb
1016
1020
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/simple_cache.rb
1021
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb
1017
1022
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object.rb
1018
1023
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/asserts.rb
1019
1024
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb