Skip to content
Browse files

Merge branch 'master' into deployment

  • Loading branch information...
2 parents f0c5d82 + b07e2a5 commit 0b2ea072e55a78708fc4c49cb0c292c2d4bc247c @chiku committed
View
1 Gemfile
@@ -4,6 +4,5 @@ gem "rake"
gem "rack"
group :development do
- gem "ffi", "=1.0.9"
gem "juicer"
end
View
2 Gemfile.lock
@@ -2,7 +2,6 @@ GEM
remote: http://rubygems.org/
specs:
cmdparse (2.0.3)
- ffi (1.0.9)
juicer (1.0.13)
cmdparse
nokogiri (>= 1.5.0)
@@ -16,7 +15,6 @@ PLATFORMS
ruby
DEPENDENCIES
- ffi (= 1.0.9)
juicer
rack
rake
View
8 spec/javascripts/collections/encounters.spec.js
@@ -3,7 +3,7 @@ describe("Encounters collection", function() {
it("has the URL to fetch encounters from", function() {
var encounters = new Application.Collections.Encounters();
- expect(encounters.url()).toEqual('/sampleWSResponses/encounter.json');
+ expect(/\/encounter\.json$/.test(encounters.url())).toBeTruthy("URL doesn't match");
});
describe("is ordered", function() {
@@ -12,19 +12,19 @@ describe("Encounters collection", function() {
patient : { display: "Xyz Abc" },
provider : { display: "Doctor A" },
id : "a2",
- encounterDatetime:"2011-12-31T12:00:00.000+0530"
+ encounterDatetime: "2011-12-31T12:00:00.000+0530"
});
this.encounterTwo = new Application.Models.Encounter({
patient : { display: "Abc Xyz" },
provider : { display: "Doctor C" },
id : "a3",
- encounterDatetime:"2011-12-31T10:00:00.000+0530"
+ encounterDatetime: "2011-12-31T10:00:00.000+0530"
});
this.encounterThree = new Application.Models.Encounter({
patient : { display: "ABc" },
provider : { display: "Doctor B" },
id : "a1",
- encounterDatetime:"2011-12-31T14:00:00.000+0530"
+ encounterDatetime: "2011-12-31T14:00:00.000+0530"
});
this.encounters = new Application.Collections.Encounters();
this.encounters.add([this.encounterOne, this.encounterTwo, this.encounterThree]);
View
15 spec/javascripts/helpers/error.trap.js
@@ -0,0 +1,15 @@
+jQuery(window).error(function(e) {
+ "use strict";
+
+ var event = e.originalEvent,
+ msg = event.message,
+ file = event.filename,
+ line = event.lineno,
+ text = "<h2>Syntax error detected in javascript!</h2>" +
+ "<h3>Message:<i>" + msg + "</i></h3>" +
+ "<h3>In <i>" + file + "</i> at line: <i>" + line + "</i></h3>";
+
+ jQuery(function() {
+ jQuery("#syntax-errors").append(text);
+ })
+});
View
2 spec/javascripts/index.dev.html
@@ -17,6 +17,7 @@
<script src="jasmine-standalone-1.1.0/jasmine.js"></script>
<script src="jasmine-standalone-1.1.0/jasmine-html.js"></script>
<script src="helpers/sinon-1.0.0.js"></script>
+ <script src="helpers/error.trap.js"></script>
<script src="helpers/fake.server.js"></script>
<!-- include source files here... -->
@@ -76,6 +77,7 @@
</head>
<body>
+ <div id="syntax-errors" style="color:#cc2222"></div>
<!-- include templates here... -->
<script type="text/template" id="template-encounters">
<header class="grey-gradient">Patients</header>
View
2 spec/javascripts/index.prod.html
@@ -17,6 +17,7 @@
<script src="jasmine-standalone-1.1.0/jasmine.js"></script>
<script src="jasmine-standalone-1.1.0/jasmine-html.js"></script>
<script src="helpers/sinon-1.0.0.js"></script>
+ <script src="helpers/error.trap.js"></script>
<script src="helpers/fake.server.js"></script>
<!-- include source files here... -->
@@ -64,6 +65,7 @@
</head>
<body>
+ <div id="syntax-errors" style="color:#cc2222"></div>
<!-- include templates here... -->
<script type="text/template" id="template-encounters">
<header class="grey-gradient">Patients</header>
View
2 spec/javascripts/models/encounter.spec.js
@@ -7,7 +7,7 @@ describe("Encounter", function() {
patient : { display: "Xyz Abc", uuid: 'abc123' },
provider : { display: "Doctor A" },
id : "a2",
- encounterDatetime:"2011-12-31T12:00:00.000+0530"
+ encounterDatetime: "2011-12-31T12:00:00.000+0530"
});
});
View
2 spec/javascripts/models/patient.spec.js
@@ -14,7 +14,7 @@ describe("Patient", function() {
});
it("knows its URL from the its ID", function() {
- expect(this.patient.url()).toBe("/sampleWSResponses/patient/abc123.json");
+ expect(/\/patient\/abc123\.json$/.test(this.patient.url())).toBeTruthy("URL doesn't match");
});
it("knows its name from the perferred address", function() {

0 comments on commit 0b2ea07

Please sign in to comment.
Something went wrong with that request. Please try again.