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 +4 -4
- data/lib/paneron/register/raw/register.rb +12 -13
- data/lib/paneron/register/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: 0006d40a56e3155c4d5d3390803b9b5d120f42e30949fdfa9d44f4d051a84eb6
|
4
|
+
data.tar.gz: f518719ed3a9cae79e1462777c100b09036963f43abdbc2e2c56d215373b167d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
511
|
-
|
512
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|