lib/cfoundry/app.rb in cfoundry-0.2.1 vs lib/cfoundry/app.rb in cfoundry-0.2.2
- old
+ new
@@ -58,11 +58,12 @@
@name = name
@client = client
@manifest = manifest
end
- def inspect # :nodoc:
+ # Show string representing the application.
+ def inspect
"#<App '#@name'>"
end
# Delete the application from the target.
#
@@ -207,11 +208,12 @@
end
alias :url :uri
alias :url= :uri=
- def framework # :nodoc:
+ # Application framework.
+ def framework
manifest["staging"]["framework"] ||
manifest["staging"]["model"]
end
def framework=(v) # :nodoc:
@@ -223,11 +225,12 @@
else
@manifest["staging"]["framework"] = v
end
end
- def runtime # :nodoc:
+ # Application runtime.
+ def runtime
manifest["staging"]["runtime"] ||
manifest["staging"]["stack"]
end
def runtime=(v) # :nodoc:
@@ -240,33 +243,38 @@
@manifest["staging"]["runtime"] = v
end
end
- def command # :nodoc:
+ # Application startup command.
+ #
+ # Used for standalone apps.
+ def command
manifest["staging"]["command"]
end
def command=(v) # :nodoc:
@manifest ||= {}
@manifest["staging"] ||= {}
@manifest["staging"]["command"] = v
end
- def memory # :nodoc:
+ # Application memory.
+ def memory
manifest["resources"]["memory"]
end
def memory=(v) # :nodoc:
@manifest ||= {}
@manifest["resources"] ||= {}
@manifest["resources"]["memory"] = v
end
- def debug_mode # :nodoc:
+ # Application debug mode.
+ def debug_mode
manifest.fetch("debug") do
manifest["meta"] && manifest["meta"]["debug"]
end
end
@@ -308,12 +316,10 @@
def file(*path)
Instance.new(@name, 0, @client).file(*path)
end
# Default paths to exclude from upload payload.
- #
- # Value: .git, _darcs, .svn
UPLOAD_EXCLUDE = %w{.git _darcs .svn}
# Upload application's code to target. Do this after #create! and before
# #start!
#
@@ -400,12 +406,10 @@
end
end
end
# Minimum size for an application payload to bother checking resources.
- #
- # Value: 64kb
RESOURCE_CHECK_LIMIT = 64 * 1024
def determine_resources(path)
fingerprints = []
total_size = 0
@@ -478,10 +482,11 @@
@index = index
@client = client
@manifest = manifest
end
- def inspect # :nodoc:
+ # Show string representing the application instance.
+ def inspect
"#<App::Instance '#@app' \##@index>"
end
# Instance state.
def state