Sha256: 85bfefa73a2e8fff3ef0beecdc00dda723f274b7442de3047d8597f02a64e454

Contents?: true

Size: 1.16 KB

Versions: 32

Compression:

Stored size: 1.16 KB

Contents


library :rudy, 'lib'
group "Metadata"

tryout "Rudy::Machines API" do
  
  set :test_domain, Rudy::DOMAIN #'test_' << Rudy::Utils.strand(4)
  set :test_env, 'stage' #'env_' << Rudy::Utils.strand(4)

  setup do
    #Rudy.enable_debug
    Rudy::Huxtable.global.offline = true
    Rudy::Huxtable.update_config          # Read config files
    global = Rudy::Huxtable.global
    global.environment = test_env
    akey, skey, region = global.accesskey, global.secretkey, global.region
    Rudy::Metadata.connect akey, skey, region
    Rudy::AWS::EC2.connect akey, skey, region
    Rudy::Machine.new('07').save
    Rudy::Machine.new('08').save
    Rudy::Machine.new('09').save
  end
  
  clean do
    Rudy::Machine.new('07').destroy
    Rudy::Machine.new('08').destroy
    Rudy::Machine.new('09').destroy
    if Rudy.debug?
      puts $/, "Rudy Debugging:"
      Rudy::Huxtable.logger.rewind
      puts Rudy::Huxtable.logger.read unless Rudy::Huxtable.logger.closed_read?
    end
  end
  
  dream :class, Rudy::Machine
  drill "get machine metadata" do
    Rudy::Machines.get '07'
  end
  
  drill "knows when the current group is not running", false do
    Rudy::Machines.running?
  end

end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
solutious-rudy-0.9.2 tryouts/30_metadata/77_machines_tryouts.rb
solutious-rudy-0.9.3 tryouts/30_metadata/77_machines_tryouts.rb
solutious-rudy-0.9.4 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.020 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.019 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.018 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.017 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.016 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.015 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.014 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.013 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.012 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.011 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.010 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.009 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.008 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.007 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.006 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.005 tryouts/30_metadata/77_machines_tryouts.rb
rudy-0.9.8.004 tryouts/30_metadata/77_machines_tryouts.rb