avm-tools 0.42.0 → 0.43.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21c01866f9d3e2aaa7d30b254740a63daf91dcec77fc4da08b8eb0505832aeb0
4
- data.tar.gz: d9c0e0771add271642abb587119b4f887b40667882192612a40406c1fc8dca8a
3
+ metadata.gz: 4eaa25ad0b16e1e00f3d9efd040b44b4ce0025c1ad5143892d0849ee8bdff949
4
+ data.tar.gz: f67dc9660f344c09deb5af514e06bd24e61f381d640df39b53546f13d55492c9
5
5
  SHA512:
6
- metadata.gz: cb36cadc8af5d05e032a5f0fa83a9af30400ef3636d9d2696e41063ad9f6fb0ad947e013a966452e692628b045986d0586c905280f1b98a4e5baa50055f92fa9
7
- data.tar.gz: ddb1cbcd59038ce2374a0952eb1d2289da3f0dc621c48334f422d0b7347616702f82f880205afe8a4dda28ca552916032b0119a66b68fdc2aba0bb730962d5c5
6
+ metadata.gz: c0becf6917e2bc8bbbc6052a55100f97584a361cc32ee46bd4c42654649023dee8f9b98318e42640b79073e120be8a3f090e210fa44d70e23e78719ef49593eb
7
+ data.tar.gz: e3fbf5efed9dcb5e52ed19020fac23a3f15534921955d48f5df297a29deb685e86903a2905c8d274683b89069bdfa3f2ed7969d46b66498110362c898de3937f
@@ -14,7 +14,7 @@ module Avm
14
14
 
15
15
  private
16
16
 
17
- %w[docker file git php-cs-fixer yapf].each do |program|
17
+ %w[docker file git php-cs-fixer tidy yapf].each do |program|
18
18
  define_method(program.underscore + '_uncached') do
19
19
  env.executable(program, '--version')
20
20
  end
@@ -11,7 +11,7 @@ module Avm
11
11
  enable_console_speaker
12
12
  common_constructor :source_paths, :options
13
13
 
14
- FORMATS = %w[ruby html php python json generic_plain].freeze
14
+ FORMATS = %w[ruby html php python xml json generic_plain].freeze
15
15
 
16
16
  def run
17
17
  clear
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/files/formatter/formats/generic_plain'
4
+
5
+ module Avm
6
+ module Files
7
+ class Formatter
8
+ module Formats
9
+ class Xml < ::Avm::Files::Formatter::Formats::GenericPlain
10
+ VALID_BASENAMES = %w[*.xml].freeze
11
+ VALID_TYPES = ['xml'].freeze
12
+
13
+ def internal_apply(files)
14
+ format_command(files).system!
15
+ super(files)
16
+ end
17
+
18
+ def format_command(files)
19
+ ::Avm::Executables.tidy.command.append(
20
+ %w[-xml -modify --indent auto --indent-spaces 2 --wrap 100] + files
21
+ )
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.42.0'
5
+ VERSION = '0.43.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.0
4
+ version: 0.43.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
@@ -238,6 +238,7 @@ files:
238
238
  - lib/avm/files/formatter/formats/php.rb
239
239
  - lib/avm/files/formatter/formats/python.rb
240
240
  - lib/avm/files/formatter/formats/ruby.rb
241
+ - lib/avm/files/formatter/formats/xml.rb
241
242
  - lib/avm/files/formatter/utf8_assert.rb
242
243
  - lib/avm/files/info.rb
243
244
  - lib/avm/files/rotate.rb