This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'net/http' | |
require 'uri' | |
require 'vcap/common' | |
module VCAP | |
module Stager | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'net/http' | |
require 'uri' | |
require 'vcap/common' | |
module VCAP | |
module Stager | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VCAP::Stager::Config < VCAP::Config | |
DEFAULT_CONFIG_PATH = File.expand_path('../../../../config/dev.yml', __FILE__) | |
define_schema do | |
{ :logging => { | |
:level => String, # debug, info, etc. | |
optional(:file) => String, # Log file to use | |
optional(:syslog) => String, # Name to associate with syslog messages (should start with 'vcap.') | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
module Axon | |
class Mvar | |
SENTINEL = 'x'.freeze | |
def initialize | |
@pipe = IO.pipe | |
@value = nil | |
@was_set = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
module Axon | |
class Mvar | |
def initialize | |
@lock = Mutex.new | |
@cond = ConditionVariable.new | |
@value = nil | |
@was_set = false | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
require "axon/future" | |
module Axon | |
class Channel | |
attr_reader :buffer_size | |
class BufferReceiveFuture < Axon::Future | |
def initialize(buffer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
unless ARGV.size == 1 | |
puts "Usage: bundle_resolver.rb [/path/to/gemfile]" | |
exit 1 | |
end | |
defn = Bundler::Definition.build(ARGV[0], nil, nil) | |
defn.resolve_remotely! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
172.20.148.188 -- [2012-05-15 23:00:46.723203] cc - pid=18639 tid=c3ae fid=f2d2 INFO -- Added /var/vcap/data/cloud_controller/tmp/d20120515-18639-105al6k/app/controllers/application_controller.rb to /var/vcap | |
/shared/resources/102/56/17688588bee31ed3a3fed095a61b459f6012ad03, sha1=17688588bee31ed3a3fed095a61b459f6012ad03 | |
<cut> | |
172.20.148.189 -- [2012-05-15 23:00:50.020424] cc - pid=18894 tid=0ccc fid=0c0b WARN -- Can't copy {:size=>79, :sha1=>"17688588bee31ed3a3fed095a61b459f6012ad03", :fn=>"app/controllers/application_controller.rb"} to /var/vcap/data/cloud_controller/tmp/d20120515-18894-10a8ve7/app/controllers/application_controller.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "digest/md5" | |
require "logger" | |
require "tmpdir" | |
require "vmc" | |
# These are actually vmc requires | |
require "cli/config" | |
require "cli/zip_util" | |
def create_app_name | |
"nfs_race-" + Digest::MD5.hexdigest(Time.now.to_s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.instance | |
@instance ||= begin | |
new.tap { |instance| | |
prev_handler = Signal.trap("CLD") { | |
if EM.reactor_running? | |
EM.add_timer(0) { instance.signal } | |
end | |
prev_handler.call if prev_handler | |
} | |
} |