Sha256: f5cf08a7f01d6e88341aaa20bdd4a591ec99277ef7aa08a29f73bf61a9f42fff

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

#!/usr/bin/env ruby

# This script is the entry point for the Ansible "Ruby Interop" filter plugins
# that execute QB Ruby code via a sub-process to do shitty RPC.
# 
# @todo
#   Should prob eventually be merged into `//exe/qb` under a command, but
#   not gonna right now. At least it's not a string in the Python file anymore.
# 

# Reinstate Bundler ENV vars if they have been moved
load ENV['QB_REBUNDLE_PATH'] if ENV['QB_REBUNDLE_PATH']

# Set the thread name so that logs make sense.
require 'thread'
Thread.current.name = "qb_interop_receive"

require 'qb'

# Connect to the master QB process for logging to CLI STDOUT (if it's there,
# which it should be in this case).
if ENV['QB_STDIO_ERR']
  $stderr = UNIXSocket.new ENV['QB_STDIO_ERR']
  
  NRSER::Log.setup_for_cli! application: 'qb'
  
  QB.debug "Connected to QB stderr stream at #{ ENV['QB_STDIO_ERR'] } #{ $stderr.path }."
end

# Kick off the interop. Payload will be read from STDIN and results written to
# STDOUT (both YAML at the moment).
QB::Util::Interop.receive

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
qb-0.4.3 exe/.qb_interop_receive
qb-0.4.2 exe/.qb_interop_receive
qb-0.4.1 exe/.qb_interop_receive
qb-0.4.0 exe/.qb_interop_receive