rfix 1.2.0 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rfix/branches/main.rb +1 -1
- data/lib/rfix/commands/helper/args.rb +5 -1
- data/lib/rfix/repository.rb +4 -1
- data/lib/rfix/tracked.rb +2 -6
- data/lib/rfix/version.rb +1 -1
- data/rfix.gemspec +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: 0c8798e4878ee4ad37aab733473ce82d50881bedadb93daaa5ced93bea364480
|
4
|
+
data.tar.gz: '08d0952d66e3c3cfb68f906a5ec0154bba294c8a8aaf628279ed8f84bc808abe'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a97a0f8265bf1c24d01f3b73a4c012e040914e85b9f4b69506f9003e7fd26ee1cd10d9d30a4fc16a5e19bbe029ee1127a2e0869ad82d61247721a819e96874c0
|
7
|
+
data.tar.gz: cee388a2b404aa6313bed6bb0c655370b1a0ab67af41112676f9c28ad3e4c6fa2fb857d16942baa9c0317df502f5e5e3d70cdc3e64e2b4312a26acf7d8072031
|
data/Gemfile.lock
CHANGED
data/lib/rfix/branches/main.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
option :r, :root, "{{*}} Project root path", default: Dir.pwd, argument: :required
|
2
|
-
option :b, :"main-branch", "{{*}} Branch to use",
|
2
|
+
option :b, :"main-branch", "{{*}} Branch to use", argument: :required
|
3
3
|
option :l, :limit, "{{*}} Limit number of files", argument: :required, transform: method(:Integer)
|
4
4
|
|
5
5
|
flag nil, :dry, "{{*}} Run in dry mode"
|
@@ -78,6 +78,10 @@ def setup(r_args = [], opts, _args, files: [], reference:)
|
|
78
78
|
say_debug "Cleared Rubocop`s cache"
|
79
79
|
end
|
80
80
|
|
81
|
+
if opts[:debug]
|
82
|
+
Rfix.test = true
|
83
|
+
end
|
84
|
+
|
81
85
|
if block_given?
|
82
86
|
yield(repo, [])
|
83
87
|
end
|
data/lib/rfix/repository.rb
CHANGED
@@ -47,10 +47,13 @@ class Rfix::Repository
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def include?(path, line)
|
50
|
+
say_debug "Checking #{path}:#{line}"
|
51
|
+
|
50
52
|
if file = @files.get(path)
|
51
53
|
return file.include?(line)
|
52
54
|
end
|
53
55
|
|
56
|
+
say_debug "\tSkip file (return false)"
|
54
57
|
return false
|
55
58
|
end
|
56
59
|
|
@@ -110,7 +113,7 @@ class Rfix::Repository
|
|
110
113
|
params[:paths] = @paths
|
111
114
|
end
|
112
115
|
|
113
|
-
say_debug("Run diff on
|
116
|
+
say_debug("Run diff on {{info:#{reference}}}")
|
114
117
|
upstream.diff(head, **params).tap do |diff|
|
115
118
|
diff.find_similar!(
|
116
119
|
renames_from_rewrites: true,
|
data/lib/rfix/tracked.rb
CHANGED
@@ -5,6 +5,7 @@ class Rfix::Tracked < Rfix::File
|
|
5
5
|
|
6
6
|
def include?(line)
|
7
7
|
set = diff.each_line.to_a.map{ |l| l.new_lineno }.reject { |l| l == -1 }.to_set
|
8
|
+
say_debug "Does {{yellow:#{set}}} contain {{red:#{line}}}"
|
8
9
|
set.include?(line)
|
9
10
|
end
|
10
11
|
|
@@ -52,14 +53,10 @@ class Rfix::Tracked < Rfix::File
|
|
52
53
|
end
|
53
54
|
|
54
55
|
def diff
|
55
|
-
upstream.
|
56
|
+
upstream.diff_workdir({
|
56
57
|
include_untracked_content: true,
|
57
|
-
# ignore_whitespace_change: true,
|
58
58
|
recurse_untracked_dirs: true,
|
59
|
-
disable_pathspec_match: false,
|
60
|
-
# ignore_whitespace_eol: false,
|
61
59
|
include_untracked: true,
|
62
|
-
# ignore_whitespace: true,
|
63
60
|
ignore_submodules: true,
|
64
61
|
include_ignored: false,
|
65
62
|
context_lines: 0,
|
@@ -67,7 +64,6 @@ class Rfix::Tracked < Rfix::File
|
|
67
64
|
}).tap do |diff|
|
68
65
|
diff.find_similar!(
|
69
66
|
renames_from_rewrites: true,
|
70
|
-
# ignore_whitespace: true,
|
71
67
|
renames: true,
|
72
68
|
copies: true
|
73
69
|
)
|
data/lib/rfix/version.rb
CHANGED
data/rfix.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
if ENV["TRAVIS"]
|
13
13
|
spec.version = "#{Rfix::VERSION}-#{ENV.fetch('TRAVIS_BUILD_NUMBER')}"
|
14
|
-
|
14
|
+
elsif ENV["GITHUB_RUN_ID"]
|
15
15
|
spec.version = "#{Rfix::VERSION}-#{ENV.fetch('GITHUB_RUN_ID')}"
|
16
16
|
else
|
17
17
|
# rubocop:disable Gemspec/DuplicatedAssignment
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linus Oleander
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cri
|