Sha256: 2046daddb93b42ed0dfd5f3036b32470d759c7ac9b4184c879e392c5539bd3e7

Contents?: true

Size: 1.35 KB

Versions: 1

Compression:

Stored size: 1.35 KB

Contents

require 'tools.rb'
require 'pp'

class Certificate
  attr_accessor :description
  attr_accessor :publicKey
end

class MyCertificate<Certificate
  attr_accessor :privateKey
  
  def initialize
  end
end

class Permissions<Hash
  PERMISSIONS=[:access_net,:access_temp,:run_cron,:run_continously]
  def initialize
    super
    PERMISSIONS.each{|perm|self[perm]=false}
  end
end

class Information
  attr_accessor :author
  attr_accessor :description
end

class Package
  attr_accessor :source
  attr_reader :permissions
  attr_accessor :information

  attr_accessor :sign
end

class Configuration
  attr_accessor :acceptedCertificates
  
  def packagePermitted?(package)
  end
end

class NetworkNode
end

class AbstractNetwork
  def getNodesProviding(what,many)
    []
  end
end

class OpenNetwork<AbstractNetwork
end

class CertificateGetter
end

def applicationDir
  File.expand_path("../../../apps",__FILE__)
end

def loadApp(cluster,name)
  filename=File.join(applicationDir,name,name+".rb")
  cluster.log "LOADING #{filename}"
  require filename
end


def loadApps(cluster)
  allApps=[]
  Dir[File.join(applicationDir,'*')].each{|dir|
    if File.directory?(dir)
      $:<<dir
      name=File.split(dir)[1]
      loadApp(cluster,name)
      app=nil
      begin
        app=eval(name.camelCase+"App")
      rescue
      end
      allApps<<app
    end
  }
  allApps.select{|a|a}
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appswarm-0.0.1 lib/appswarm/package.rb