Browse Source

Move preloaded modules to separate file

master
Patrick Lühne 2 years ago
parent
commit
65df9d8fcc
Signed by: patrick GPG Key ID: 05F3611E97A70ABF
  1. 1
      Cargo.toml
  2. 6
      github-fast-env/github-fast-envd.rb
  3. 5
      github-fast-env/preload.rb

1
Cargo.toml

@ -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"],

6
github-fast-env/github-fast-envd.rb

@ -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"

5
github-fast-env/preload.rb

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