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.
- data/lib/appengine-apis.rb +1 -1
- data/lib/appengine-apis/apiproxy.rb +17 -18
- metadata +2 -2
data/lib/appengine-apis.rb
CHANGED
@@ -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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
30
|
+
def get_auth_domain
|
31
|
+
get_current_environment.getAuthDomain
|
32
|
+
end
|
35
33
|
|
36
|
-
|
34
|
+
alias :add_log_record :log
|
37
35
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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.
|
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-
|
12
|
+
date: 2009-08-10 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|