appengine-apis 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,5 +19,5 @@ $:.unshift(File.dirname(__FILE__)) unless
19
19
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
20
20
 
21
21
  module AppEngine
22
- VERSION = '0.0.6'
22
+ VERSION = '0.0.7'
23
23
  end
@@ -18,29 +18,28 @@
18
18
  #
19
19
  # Ruby interface to the Java ApiProxy.
20
20
 
21
- require 'appengine-apis/sdk'
22
-
23
21
  module AppEngine
22
+ if defined? Java
23
+ import com.google.apphosting.api.ApiProxy
24
24
 
25
- ApiProxy = AppEngine::SDK.load_apiproxy
26
-
27
- class << ApiProxy
28
- def get_app_id
29
- get_current_environment.getAppId
30
- end
25
+ class << ApiProxy
26
+ def get_app_id
27
+ get_current_environment.getAppId
28
+ end
31
29
 
32
- def get_auth_domain
33
- get_current_environment.getAuthDomain
34
- end
30
+ def get_auth_domain
31
+ get_current_environment.getAuthDomain
32
+ end
35
33
 
36
- alias :add_log_record :log
34
+ alias :add_log_record :log
37
35
 
38
- def log(level, message)
39
- message = (message || "").to_s.chomp
40
- return if message.nil? || message.empty?
41
- record = AppEngine::ApiProxy::LogRecord.new(
42
- level, java.lang.System.currentTimeMillis() * 1000, message.to_s)
43
- add_log_record(record)
36
+ def log(level, message)
37
+ message = (message || "").to_s.chomp
38
+ return if message.nil? || message.empty?
39
+ record = AppEngine::ApiProxy::LogRecord.new(
40
+ level, java.lang.System.currentTimeMillis() * 1000, message.to_s)
41
+ add_log_record(record)
42
+ end
44
43
  end
45
44
  end
46
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appengine-apis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Brown
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-27 00:00:00 -07:00
12
+ date: 2009-08-10 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency