avm-tools 0.36.0 → 0.37.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/executables.rb +4 -0
- data/lib/avm/files/formatter.rb +2 -2
- data/lib/avm/files/formatter/formats/generic_plain.rb +2 -2
- data/lib/avm/files/formatter/formats/per_file_base.rb +17 -0
- data/lib/avm/files/formatter/formats/php.rb +22 -0
- data/lib/avm/tools/version.rb +1 -1
- metadata +6 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e112c35554da958b5bcee6263e3ad3d6c2cd93cf70ab56eba9fb9bb689199cb8
|
4
|
+
data.tar.gz: 877e71a8bb6c19ab1285a88e54feba27e59bdbbc05c574c6e183c6d9d8625159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05d3e02a29bf1e45049f22dfd194e6d33d71d25967616544496d77d1b72f95753aac1e4b7365689fcf644d92fef4df0b08b7d0762f43fef97c48829f23548021
|
7
|
+
data.tar.gz: 4ab2a54b3b9d0c94925d47759ca7b05bd40ed8db9219aa36e2e57f3ff1b68aca330e3ebf7a82fb2a0024158d2693daa9f8f1cc2111bc9f56bf207a637ad34e84
|
data/lib/avm/executables.rb
CHANGED
data/lib/avm/files/formatter.rb
CHANGED
@@ -11,7 +11,7 @@ module Avm
|
|
11
11
|
enable_console_speaker
|
12
12
|
common_constructor :source_paths, :options
|
13
13
|
|
14
|
-
FORMATS = %w[generic_plain].freeze
|
14
|
+
FORMATS = %w[php generic_plain].freeze
|
15
15
|
|
16
16
|
def run
|
17
17
|
clear
|
@@ -77,7 +77,7 @@ module Avm
|
|
77
77
|
def show_results
|
78
78
|
changed = @result.select(&:changed)
|
79
79
|
changed.each do |h|
|
80
|
-
out h.file.
|
80
|
+
out h.file.to_s.cyan
|
81
81
|
out " (#{h.format})".yellow
|
82
82
|
puts ' changed'.green
|
83
83
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/files/formatter/formats/
|
3
|
+
require 'avm/files/formatter/formats/per_file_base'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module Files
|
7
7
|
class Formatter
|
8
8
|
module Formats
|
9
|
-
class GenericPlain < ::Avm::Files::Formatter::Formats::
|
9
|
+
class GenericPlain < ::Avm::Files::Formatter::Formats::PerFileBase
|
10
10
|
VALID_EXTENSIONS = %w[.bat .css.coffee .java .js .json .php .rb .scss .sql .tex .url .yml
|
11
11
|
.yaml].freeze
|
12
12
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/files/formatter/formats/base'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Files
|
7
|
+
class Formatter
|
8
|
+
module Formats
|
9
|
+
class PerFileBase < ::Avm::Files::Formatter::Formats::Base
|
10
|
+
def internal_apply(files)
|
11
|
+
files.each { |file| file_apply(file) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/files/formatter/formats/per_file_base'
|
4
|
+
require 'avm/files/formatter/formats/generic_plain'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Files
|
8
|
+
class Formatter
|
9
|
+
module Formats
|
10
|
+
class Php < ::Avm::Files::Formatter::Formats::PerFileBase
|
11
|
+
VALID_EXTENSIONS = %w[.php].freeze
|
12
|
+
VALID_TYPES = ['PHP script'].freeze
|
13
|
+
|
14
|
+
def file_apply(file)
|
15
|
+
::Avm::Executables.php_cs_fixer.command.append(['fix', file]).system!
|
16
|
+
::Avm::Files::Formatter::Formats::GenericPlain.new.file_apply(file)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/avm/tools/version.rb
CHANGED
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.37.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-
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.1.1
|
19
|
+
version: '0.4'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.1.1
|
26
|
+
version: '0.4'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: clipboard
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,6 +199,8 @@ files:
|
|
205
199
|
- lib/avm/files/formatter/formats.rb
|
206
200
|
- lib/avm/files/formatter/formats/base.rb
|
207
201
|
- lib/avm/files/formatter/formats/generic_plain.rb
|
202
|
+
- lib/avm/files/formatter/formats/per_file_base.rb
|
203
|
+
- lib/avm/files/formatter/formats/php.rb
|
208
204
|
- lib/avm/files/rotate.rb
|
209
205
|
- lib/avm/fs_cache.rb
|
210
206
|
- lib/avm/git.rb
|