Move preloaded modules to separate file

master
Patrick Lühne 2020-05-26 04:01:52 +02:00
parent 519c05d9c9
commit 65df9d8fcc
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
3 changed files with 8 additions and 4 deletions

View File

@ -9,6 +9,7 @@ edition = "2018"
assets = [
["github-fast-env/github-fast-envd.rb", "usr/bin/github-fast-envd", "755"],
["github-fast-env/github-fast-env.rb", "usr/bin/github-fast-env", "755"],
["github-fast-env/preload.rb", "usr/lib/github-fast-env/", "755"],
["github-fast-env/systemd/github-fast-envd.service", "usr/lib/systemd/system/", "644"],
["ghe-fast-tools/ghe-fast-console.rb", "usr/lib/ghe-fast-tools/", "644"],
["ghe-fast-tools/bin/ghe-fast-console.rb", "usr/bin/ghe-fast-console", "755"],

View File

@ -4,10 +4,6 @@ require "base64"
require "io/console"
require "socket"
require "/data/github/current/config/environment"
require "irb"
require "irb/completion"
class ClientError < StandardError
def initialize(message)
super(message)
@ -154,6 +150,8 @@ def set_up_pseudoterminal(control_socket, pseudoterminal_path)
control_socket.puts "ready"
end
load "/usr/lib/github-fast-env/preload.rb"
while true
control_socket = control_server.accept
$original_stderr.puts "- new connection"

View File

@ -0,0 +1,5 @@
#!/usr/bin/env ruby
require "/data/github/current/config/environment"
require "irb"
require "irb/completion"