paneron-register 0.3.0 → 0.3.1

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: 560320c2a03e90f346dafccc8a2088c4637ce9d80bf789a01b79d6711409b812
4
- data.tar.gz: 6a2996fe23f059d525a1ecb8b2d71384a22ba67adcfba27814855c5a2a18fc37
3
+ metadata.gz: 0006d40a56e3155c4d5d3390803b9b5d120f42e30949fdfa9d44f4d051a84eb6
4
+ data.tar.gz: f518719ed3a9cae79e1462777c100b09036963f43abdbc2e2c56d215373b167d
5
5
  SHA512:
6
- metadata.gz: 9885fa28ebdcf9c5dfc8899b125480e88d4876cba6473cff144e0f2dc5178d5478a8478b92eb44fd31e638d1a94a68362dd0bef9e324f51919189da601d904eb
7
- data.tar.gz: ef8c656a0d9c76bd1e38b43befc4689045e00e4cc88a966b9734ef4e2dd473139a037eeabc0f2e784743878748d572c5ac56290b3c8e9be56cfcecf1f23b2352
6
+ metadata.gz: 21bb20135041b297f6070676d5a2fe24ae3a8f690e570f8f22e20bdf243bd8df3611fa7e4faf8a86e7d94bf1f9b7966acaf1a4bdf3ad6c7987d53ee730161359
7
+ data.tar.gz: 3e62f904d0c9c1ecccca47ec54fffeccaea7a8db6c26f61e6a11391cf215321abccd4563f7f3053ec5750f32948f7d7ff25212fffe2e6513b6d7d94bddd48f81
@@ -128,16 +128,6 @@ module Paneron
128
128
  @git_save_fn = nil
129
129
 
130
130
  git_fn = proc {
131
- # Check if remote matches the provided git_url
132
- if !@git_client.remote(@git_remote_name).url.nil? && @git_client.remote(@git_remote_name).url != git_url
133
-
134
- raise Paneron::Register::Error,
135
- "Git remote @ #{clone_path} already exists " \
136
- "(#{@git_client.remote(@git_remote_name).url}) " \
137
- "but does not match provided URL (#{git_url}).\n" \
138
- "Instead, use `r = #{self}.new(\"#{path}\")` and "\
139
- "`r.git_url = \"#{git_url}\"` to change its Git URL."
140
- end
141
131
  log_change_git_remote(git_url)
142
132
  change_git_remote(git_url)
143
133
 
@@ -497,6 +487,14 @@ module Paneron
497
487
  }
498
488
  end
499
489
 
490
+ def git_client_remote_url
491
+ if @git_client.nil?
492
+ nil
493
+ else
494
+ @git_client.remote(@git_remote_name).url
495
+ end
496
+ end
497
+
500
498
  private
501
499
 
502
500
  def log_change_git_remote(new_url)
@@ -507,9 +505,10 @@ module Paneron
507
505
  def change_git_remote(new_url, git_client: @git_client)
508
506
  if !git_client.remote(@git_remote_name).url.nil?
509
507
  git_client.remove_remote(@git_remote_name)
510
- if !new_url.nil?
511
- git_client.add_remote(@git_remote_name)
512
- end
508
+ end
509
+
510
+ if !new_url.nil?
511
+ git_client.add_remote(@git_remote_name, new_url)
513
512
  end
514
513
  end
515
514
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Paneron
4
4
  module Register
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paneron-register
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-20 00:00:00.000000000 Z
11
+ date: 2024-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git