avm-tools 0.43.0 → 0.44.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/files/info.rb +2 -0
- data/lib/avm/patches/eac_launcher_git_base.rb +10 -0
- data/lib/avm/ruby/rubocop/_gemfile.rb +1 -1
- data/lib/avm/tools/runner/files/format.rb +15 -1
- data/lib/avm/tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 998ac2a1aa3e9b7cc2ef9ee50fb91ea89ea3e82aa5f185bbfe436bd6e3415b4f
|
4
|
+
data.tar.gz: 6a807ba7c42769009199fb6ff63f81076f93bd21d26be66e5fb8bfe3f44e42a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bf91fa6a966ef1c62031fe6422db8b4a1de4c96c0cb1e2e17c45204ee8e187b9c38c764de962900185e41cf5579472af8b0e9b996c08e0ab5f06347f8d6c446
|
7
|
+
data.tar.gz: dbe91e4b2c7275183afdd29608f2bacd32d8f2c09c5b003562e444ac36e02cf2d71c1e4cdd2507da0b295b9bc41531b8c91b90aa81493f4ea6cfceff07de83fd
|
data/lib/avm/files/info.rb
CHANGED
@@ -29,6 +29,16 @@ module Avm
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def root_path
|
33
|
+
r = ::Pathname.new(to_s).expand_path
|
34
|
+
loop do
|
35
|
+
return r if r.join('.git').exist?
|
36
|
+
raise "\".git\" not found for \"#{self}\"" if r.dirname.root?
|
37
|
+
|
38
|
+
r = r.dirname
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
32
42
|
private
|
33
43
|
|
34
44
|
def parse_status_line(line)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/files/formatter'
|
4
|
+
require 'avm/patches/eac_launcher_git_base'
|
4
5
|
require 'eac_ruby_utils/console/docopt_runner'
|
5
6
|
require 'eac_ruby_utils/core_ext'
|
6
7
|
|
@@ -23,6 +24,7 @@ module Avm
|
|
23
24
|
-a --apply Confirm changes.
|
24
25
|
-n --no-recursive No recursive.
|
25
26
|
-v --verbose Verbose
|
27
|
+
-d --git-dirty Select Git dirty files to format.
|
26
28
|
DOCOPT
|
27
29
|
|
28
30
|
def run
|
@@ -34,8 +36,20 @@ module Avm
|
|
34
36
|
verbose: options.fetch('--verbose') }
|
35
37
|
end
|
36
38
|
|
39
|
+
def git
|
40
|
+
@git ||= ::EacLauncher::Git::Base.new('.')
|
41
|
+
end
|
42
|
+
|
43
|
+
def git_dirty_files
|
44
|
+
git.dirty_files.map { |f| git.root_path.join(f.path) }.select(&:exist?).map(&:to_s)
|
45
|
+
end
|
46
|
+
|
37
47
|
def source_paths
|
38
|
-
options.fetch('
|
48
|
+
if options.fetch('--git-dirty')
|
49
|
+
options.fetch('<paths>') + git_dirty_files
|
50
|
+
else
|
51
|
+
options.fetch('<paths>').if_present(%w[.])
|
52
|
+
end
|
39
53
|
end
|
40
54
|
end
|
41
55
|
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.44.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-04-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|