eris 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,9 +19,14 @@ jasmineEnyoBootstrap.getXhr = function() {
19
19
  jasmineEnyoBootstrap.setLaunchParams = function() {
20
20
 
21
21
  var xhr = jasmineEnyoBootstrap.getXhr();
22
- var erisConfig = JSON.parse(xhr.open("GET", "eris_config.json", true).responseText);
22
+ xhr.open("GET", "eris_config.json", false);
23
+ xhr.send();
23
24
 
24
- var launchParams = erisConfig.enyoLaunchParams;
25
+ if (xhr.status != 200) {
26
+ return;
27
+ }
28
+
29
+ var launchParams = JSON.parse(xhr.responseText).enyoLaunchParams;
25
30
 
26
31
  if (!launchParams) {
27
32
  return;
@@ -35,3 +40,5 @@ jasmineEnyoBootstrap.setLaunchParams = function() {
35
40
  }).join('&');
36
41
  }
37
42
  };
43
+
44
+ jasmineEnyoBootstrap.setLaunchParams();
@@ -27,8 +27,8 @@ module Jasmine
27
27
  map('/__JASMINE_ROOT__') { run Rack::File.new(Jasmine.root) }
28
28
  map(config.spec_path) { run Rack::File.new(config.spec_dir) }
29
29
  map(config.root_path) { run Rack::File.new(config.project_root) }
30
- eris_config = ErisConfig.new(:config_path => 'eris_config.json', :app_root => config.project_root)
31
30
 
31
+ eris_config = ErisConfig.new(:config_path => 'eris_config.json', :app_root => config.project_root)
32
32
  map("/usr/palm/frameworks") { run Rack::File.new(eris_config.enyo_root) }
33
33
 
34
34
  map("/__ERIS_RESOURCES__") { run Rack::File.new(File.expand_path(File.join(File.dirname(__FILE__), '/../js'))) }
@@ -1,3 +1,3 @@
1
1
  module Eris
2
- Eris::VERSION = "0.0.7"
2
+ Eris::VERSION = "0.0.8"
3
3
  end
@@ -1,19 +1,21 @@
1
1
  describe("setLaunchParams", function () {
2
-
2
+ var fakeXhr, fakeResponse;
3
3
  beforeEach(function() {
4
4
  window.history.pushState({}, "Jasmine Suite", "http://localhost:8888/");
5
+ fakeXhr = {
6
+ open: function() {},
7
+ send: function() {
8
+ fakeXhr.status = fakeResponse.status;
9
+ fakeXhr.responseText = fakeResponse.responseText;
10
+ },
11
+ responseText: null
12
+ };
13
+ spyOn(jasmineEnyoBootstrap, 'getXhr').andReturn(fakeXhr);
5
14
  });
6
15
 
7
16
  describe("when no launch parameters are specified", function () {
8
17
  beforeEach(function() {
9
- spyOn(jasmineEnyoBootstrap, 'getXhr').andCallFake(function() {
10
- return {
11
- open: function() {
12
- return testResponses.erisConfig.noLaunchParams.success;
13
- }
14
- }
15
- });
16
-
18
+ fakeResponse = testResponses.erisConfig.noLaunchParams.success;
17
19
  jasmineEnyoBootstrap.setLaunchParams();
18
20
  });
19
21
 
@@ -24,14 +26,7 @@ describe("setLaunchParams", function () {
24
26
 
25
27
  describe("when launch parameters are specified", function () {
26
28
  beforeEach(function() {
27
- spyOn(jasmineEnyoBootstrap, 'getXhr').andCallFake(function() {
28
- return {
29
- open: function() {
30
- return testResponses.erisConfig.withLaunchParams.success;
31
- }
32
- }
33
- });
34
-
29
+ fakeResponse = testResponses.erisConfig.withLaunchParams.success;
35
30
  jasmineEnyoBootstrap.setLaunchParams();
36
31
  });
37
32
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eris
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - HP webOS
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-05 00:00:00 -07:00
19
+ date: 2011-08-08 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency