gitbroker 0.6.3 → 0.6.4
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 +4 -4
- data/lib/gitbroker/cli.rb +15 -0
- data/lib/gitbroker/version.rb +1 -1
- data/plugin/.claude-plugin/plugin.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6c41dc04d47bc8bfbad2ccb322b3a952b58e4957c2e282c25cb9075e58e83b2
|
|
4
|
+
data.tar.gz: 6d2f1b148005c310ed3538fe6fc4349cbaa38821bd1aa0f2ef25117477f146fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 271fb887ec812d171902d32a53ed027bd3107194c19e0d67f14a1e5d22352f143add06b8090f2ba9ddd57e5853e35c773541234ad50d4666a064d49a9683513f
|
|
7
|
+
data.tar.gz: 9a259bd5c66d1836d85b23f7e017a4011ff28722cd068f5eaeaf746eb7be8e0d2d6dbf578067cd529ed9a8858e9970fd1712d6feabc39a505afca5d9f3bd69bc
|
data/lib/gitbroker/cli.rb
CHANGED
|
@@ -111,10 +111,25 @@ module Gitbroker
|
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
return run_daemon if foreground
|
|
114
|
+
return set_up_separate_instance(options[:name] || Socket.gethostname) if separate_instance?
|
|
114
115
|
|
|
115
116
|
set_up(options[:name] || Socket.gethostname)
|
|
116
117
|
end
|
|
117
118
|
|
|
119
|
+
# A GITBROKER_CONFIG_DIR that is not the default is another companion (say, one for a local dev server). The background
|
|
120
|
+
# service belongs to the default one, so this one is paired and then kept in this window; it never touches the service.
|
|
121
|
+
def separate_instance?
|
|
122
|
+
custom = @env["GITBROKER_CONFIG_DIR"]
|
|
123
|
+
custom && File.expand_path(custom) != File.expand_path(Config.default_dir(@env.reject { |key, _| key == "GITBROKER_CONFIG_DIR" }))
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def set_up_separate_instance(name)
|
|
127
|
+
Login.new(config:, out: @out, name:).run unless config.paired?
|
|
128
|
+
@out.puts "This companion uses its own settings (#{config.dir}), so the background service is left alone. Keeping it in this " \
|
|
129
|
+
"window, connected to #{config.server}; press Ctrl-C to stop it."
|
|
130
|
+
run_daemon
|
|
131
|
+
end
|
|
132
|
+
|
|
118
133
|
def run_daemon
|
|
119
134
|
raise Error, "This machine is not paired. Run `gitbroker start` in a terminal to pair it." unless config.paired?
|
|
120
135
|
|
data/lib/gitbroker/version.rb
CHANGED