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.
- checksums.yaml +4 -4
- data/lib/avm/git/file_auto_fixup.rb +22 -3
- 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 +2 -2
- data/lib/avm/tools/runner/local_project/eac_writings_base0/build_chapters.rb +2 -2
- data/lib/avm/tools/runner/local_project/eac_writings_base0/build_single.rb +2 -2
- data/lib/avm/tools/runner/local_project/eac_writings_base0/info.rb +2 -2
- 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/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_with/subcommands.rb +14 -2
- 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/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/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/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/inflector_spec.rb +2 -1
- metadata +7 -2
@@ -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, '_')
|
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 '
|
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
|
@@ -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.
|
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:
|
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
|