lib/cfoundry/v2/app.rb in cfoundry-0.3.28 vs lib/cfoundry/v2/app.rb in cfoundry-0.3.29

- old
+ new

@@ -34,10 +34,20 @@ alias :total_instances :instances alias :total_instances= :instances= private :environment_json, :environment_json= + def instances + @client.base.instances(@guid).collect do |i, m| + Instance.new(self, i.to_s, @client, m) + end + end + + def stats + @client.base.stats(@guid) + end + def services service_bindings.collect(&:service_instance) end def env @@ -194,14 +204,14 @@ FileUtils.rm_f(zipfile) if zipfile FileUtils.rm_rf(tmpdir) if tmpdir end def files(*path) - Instance.new(self, 0, @client).files(*path) + Instance.new(self, "0", @client).files(*path) end def file(*path) - Instance.new(self, 0, @client).file(*path) + Instance.new(self, "0", @client).file(*path) end class Instance attr_reader :app, :id