Module: AppEngine::SDK
- Defined in:
- lib/appengine-sdk.rb
Constant Summary collapse
- VERSION =
'1.6.2.1'
- SDK_ROOT =
File.(File.join(File.dirname(__FILE__), '..', 'appengine-java-sdk-1.6.2.1'))
- TOOLS_JAR =
File.join(SDK_ROOT, *%w{lib appengine-tools-api.jar})
- API_JAR =
File.join(SDK_ROOT, *%w{lib impl appengine-api.jar})
- LABS_JAR =
File.join(SDK_ROOT, *%w{lib impl appengine-api-labs.jar})
- AGENT_JAR =
File.join(SDK_ROOT, *%w{lib agent appengine-agent.jar})
- RUNTIME_JARS =
File.join(SDK_ROOT, *%w{lib shared appengine-local-runtime-shared.jar}), File.join(SDK_ROOT, *%w{lib impl appengine-api-stubs.jar}), File.join(SDK_ROOT, *%w{lib impl appengine-local-runtime.jar}), File.join(SDK_ROOT, *%w{lib testing appengine-testing.jar})
Class Method Summary collapse
-
.load_apiproxy ⇒ Object
Tries to load the ApiProxy class.
- .load_appcfg ⇒ Object
-
.load_kickstart ⇒ Object
Tries to load the Kickstart class.
- .load_labs ⇒ Object
-
.load_local_test_helper ⇒ Object
Tries to load the LocalServiceTestHelper class.
-
.sdk_path(*pieces) ⇒ Object
Tries to find the Google App Engine SDK for Java.
-
.with_jars(*jars) ⇒ Object
:nodoc:.
Class Method Details
.load_apiproxy ⇒ Object
Tries to load the ApiProxy class.
37 38 39 40 41 |
# File 'lib/appengine-sdk.rb', line 37 def load_apiproxy with_jars(API_JAR) do return Java.ComGoogleApphostingApi.ApiProxy end end |
.load_appcfg ⇒ Object
69 70 71 72 73 |
# File 'lib/appengine-sdk.rb', line 69 def load_appcfg with_jars(TOOLS_JAR) do return Java.ComGoogleAppengineToolsAdmin.AppCfg end end |
.load_kickstart ⇒ Object
Tries to load the Kickstart class.
59 60 61 62 63 64 65 66 67 |
# File 'lib/appengine-sdk.rb', line 59 def load_kickstart cp = java.lang.System.get_property('java.class.path') sep = java.io.File::pathSeparator java.lang.System.set_property('java.class.path', "#{TOOLS_JAR}#{sep}#{cp}") with_jars(TOOLS_JAR) do return Java.ComGoogleAppengineTools.KickStart end end |
.load_labs ⇒ Object
43 44 45 46 47 |
# File 'lib/appengine-sdk.rb', line 43 def load_labs with_jars(LABS_JAR) do return Java.ComGoogleAppengineApiLabsTaskqueue.QueueFactory end end |
.load_local_test_helper ⇒ Object
Tries to load the LocalServiceTestHelper class.
50 51 52 53 54 55 56 |
# File 'lib/appengine-sdk.rb', line 50 def load_local_test_helper load_apiproxy load_labs with_jars(*RUNTIME_JARS) do return Java.ComGoogleAppengineToolsDevelopmentTesting.LocalServiceTestHelper end end |
.sdk_path(*pieces) ⇒ Object
102 103 104 |
# File 'lib/appengine-sdk.rb', line 102 def sdk_path(*pieces) File.join(SDK_ROOT, *pieces) end |
.with_jars(*jars) ⇒ Object
:nodoc:
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/appengine-sdk.rb', line 75 def with_jars(*jars) # :nodoc: failed = false begin yield rescue NameError => ex if failed raise ex else failed = true jars.each do |jar| $CLASSPATH << jar end retry end end end |