appengine-apis 0.0.7 → 0.0.8
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/local_boot.rb +0 -1
- data/lib/appengine-apis/testing.rb +4 -6
- metadata +2 -2
data/lib/appengine-apis.rb
CHANGED
@@ -18,7 +18,6 @@
|
|
18
18
|
#
|
19
19
|
# Helpers for installing stub apis in unit tests.
|
20
20
|
|
21
|
-
|
22
21
|
require 'appengine-apis/apiproxy'
|
23
22
|
|
24
23
|
module AppEngine
|
@@ -109,8 +108,7 @@ module AppEngine
|
|
109
108
|
end
|
110
109
|
|
111
110
|
def factory # :nodoc:
|
112
|
-
|
113
|
-
@factory = begin
|
111
|
+
@factory ||= begin
|
114
112
|
Java.ComGoogleAppengineToolsDevelopment.ApiProxyLocalFactory.new
|
115
113
|
rescue
|
116
114
|
require 'appengine-sdk'
|
@@ -160,7 +158,7 @@ module AppEngine
|
|
160
158
|
# instead of dev_appserver. In that case you will need to install
|
161
159
|
# and configure a test environment for each request.
|
162
160
|
def install_api_stubs
|
163
|
-
current_delegate = ApiProxy.
|
161
|
+
current_delegate = ApiProxy.getDelegate
|
164
162
|
current_delegate.stop if current_delegate.respond_to? :stop
|
165
163
|
|
166
164
|
self.app_dir = '.' if app_dir.nil?
|
@@ -185,7 +183,7 @@ module AppEngine
|
|
185
183
|
#
|
186
184
|
def boot(app_dir=nil)
|
187
185
|
if AppEngine::ApiProxy.current_environment &&
|
188
|
-
AppEngine::ApiProxy.
|
186
|
+
AppEngine::ApiProxy.getDelegate
|
189
187
|
return
|
190
188
|
end
|
191
189
|
app_dir ||= ENV['APPLICATION_ROOT'] || '.'
|
@@ -194,7 +192,7 @@ module AppEngine
|
|
194
192
|
appid = get_app_id(app_dir)
|
195
193
|
env.appid = appid if appid
|
196
194
|
end
|
197
|
-
unless AppEngine::ApiProxy.
|
195
|
+
unless AppEngine::ApiProxy.getDelegate
|
198
196
|
self.app_dir = app_dir
|
199
197
|
install_api_stubs
|
200
198
|
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.8
|
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-08-
|
12
|
+
date: 2009-08-13 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|