rfix 1.2.2.pre → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba53958e4103258b8e86578694c48233c47ffef40f9731086a3cd99b1da5b719
4
- data.tar.gz: b8aacca8d0c536a3c4f4135f15951be49fcad5d89524e2d8f2f1b85459667b9f
3
+ metadata.gz: 979604266b50448ef2a189a633eda6a6057e179ef67962a850718c07f8e2c726
4
+ data.tar.gz: 60b0a5b249baf32b738bde9ae350af154b3bf7862af836b42b960d5c91347b0f
5
5
  SHA512:
6
- metadata.gz: f2bca003e662486e4d96a1619c4f90d2a17e8ac2ec64b43b12b4841fcdbe3d66d18238a62c2d21fb8e210a1bb22e66c0e4ab2162155a6668e6814c44ff522adb
7
- data.tar.gz: 9a53c0431ab2ea56084b2cc6de231869b00e0bf91acb6a73cd89fd623ad569c0f638f48927f7a39d55260f62ce990750d33334950a729246d774f97a3b12ce77
6
+ metadata.gz: 7efcea3b4f4419c05fca0467bfa1748d2cf1eb2c7771aeaa7f8bb83826016ece746635eb1303b6e881a1e108d4d06f9d6c0730db447314500ff1f30f5259b3b1
7
+ data.tar.gz: 3aba1e9526e140517131811ec818edcc437274cf36746b5253bffd86fcf301ffde93d40370264157a7099b30e7fd906f198b765dfb523725e6a752a8cbdb9c1d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rfix (1.2.2.pre)
4
+ rfix (1.2.5)
5
5
  cri (~> 2.15.10)
6
6
  listen (~> 3.0)
7
7
  rainbow (~> 3.0)
data/exe/rfix CHANGED
@@ -27,4 +27,6 @@ begin
27
27
  end
28
28
  rescue RuntimeError => e
29
29
  say_abort e.to_s
30
+ rescue Rfix::Error => e
31
+ say_abort e.to_s
30
32
  end
@@ -7,20 +7,6 @@ class Rfix::Branch::Base
7
7
  raise Rfix::NotYetImplementedError.new("#to_s")
8
8
  end
9
9
 
10
- def branch(using:)
11
- names(using: using).last or raise Rfix::Error.new("No named branch found for {{error:#{self}}}")
12
- end
13
-
14
- def names(using:)
15
- oid = resolve(with: using).oid
16
- locals = using.branches.each_name(:local).to_a
17
-
18
- using.branches.select do |branch|
19
- next false unless locals.include?(branch.name)
20
- branch.target_id == oid
21
- end
22
- end
23
-
24
10
  def revparse(using:, ref:)
25
11
  using.rev_parse(ref)
26
12
  rescue Rugged::InvalidError
@@ -10,17 +10,11 @@ module Rfix
10
10
  raise Error.new("Please run {{command:rfix setup}} first")
11
11
  end
12
12
 
13
- String.new(name).resolve(with: with)
13
+ Branch::Name.new(name).resolve(with: with)
14
14
  end
15
15
 
16
16
  def self.set(branch, at: Dir.pwd)
17
- unless branch.is_a?(String)
18
- raise Rfix::Error.new("Branch must be a string, got {{error:#{branch.class}}}")
19
- end
20
-
21
- check = Branch::Name.new(branch)
22
- repo = Branch.repo(at: at)
23
- Branch.repo(at: at).config[KEY] = check.branch(using: repo).name
17
+ Branch.repo(at: at).config[KEY] = branch
24
18
  end
25
19
 
26
20
  def self.get(at: Dir.pwd)
@@ -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", default: "master", argument: :required
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
@@ -31,9 +31,9 @@ module Rfix::Log
31
31
  end
32
32
 
33
33
  def say_debug(message)
34
- # if debug? or test?
34
+ if debug? or test?
35
35
  prt("{{i}} #{strip(message)}", to: $stderr)
36
- # end
36
+ end
37
37
  end
38
38
 
39
39
  def say_abort(message)
@@ -113,7 +113,7 @@ class Rfix::Repository
113
113
  params[:paths] = @paths
114
114
  end
115
115
 
116
- say_debug("Run diff on #{reference}")
116
+ say_debug("Run diff on {{info:#{reference}}}")
117
117
  upstream.diff(head, **params).tap do |diff|
118
118
  diff.find_similar!(
119
119
  renames_from_rewrites: true,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rfix
4
- VERSION = "1.2.2"
4
+ VERSION = "1.2.5"
5
5
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.version = "#{Rfix::VERSION}-#{ENV.fetch('GITHUB_RUN_ID')}"
16
16
  else
17
17
  # rubocop:disable Gemspec/DuplicatedAssignment
18
- spec.version = [Rfix::VERSION, "pre"].join(".")
18
+ spec.version = Rfix::VERSION
19
19
  # rubocop:enable Gemspec/DuplicatedAssignment
20
20
  end
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2.pre
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander
@@ -337,9 +337,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
337
337
  version: 2.5.0
338
338
  required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  requirements:
340
- - - ">"
340
+ - - ">="
341
341
  - !ruby/object:Gem::Version
342
- version: 1.3.1
342
+ version: '0'
343
343
  requirements:
344
344
  - git, v2.0+
345
345
  rubygems_version: 3.0.3