patientgeist 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/patientgeist/client/browser_overrides.coffee +1 -2
- data/lib/patientgeist/client/compiled/browser_overrides.js +24 -23
- data/lib/patientgeist/client_override.rb +2 -0
- data/lib/patientgeist/version.rb +1 -1
- data/patientgeist.gemspec +2 -4
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06f1e3689e244aa27a62fc45981594bc15b15f17
|
4
|
+
data.tar.gz: 46effb09b2bccefee093ac191dcea7d87282b1fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95fc2f9011cad0fd3abe104e2f249c71863f2ce8a01caac5d60f8a8e05d43977e0335001a7b2895724cfb71b55538c32cb997fafdf4c3c7abb294d377aa0cb63
|
7
|
+
data.tar.gz: a88eff62b016331dd74eaa0177f6c1c226aa6caab8b4ad769f01073a4c92ea60a2252f5452d7ef7a5f4b433843d12c08aa908721b7ae4ceddb04447fc64e9c2d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.1
|
@@ -11,8 +11,7 @@ class Poltergeist.Browser extends Poltergeist.Browser
|
|
11
11
|
additionalReset: =>
|
12
12
|
@jsonRequests = []
|
13
13
|
@page.onResourceRequested = (request) =>
|
14
|
-
|
15
|
-
@jsonRequests.push(request.id)
|
14
|
+
@jsonRequests.push(request.id)
|
16
15
|
|
17
16
|
sendResponse: (response) ->
|
18
17
|
if not @responseCallback(response)
|
@@ -1,5 +1,4 @@
|
|
1
|
-
var
|
2
|
-
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
1
|
+
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
3
2
|
__hasProp = {}.hasOwnProperty,
|
4
3
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
5
4
|
|
@@ -7,39 +6,42 @@ Poltergeist.Browser = (function(_super) {
|
|
7
6
|
__extends(Browser, _super);
|
8
7
|
|
9
8
|
function Browser(owner, width, height) {
|
10
|
-
var initialReset, originalResetFunc
|
11
|
-
_this = this;
|
9
|
+
var initialReset, originalResetFunc;
|
12
10
|
this.owner = owner;
|
13
11
|
this.responseCallback = __bind(this.responseCallback, this);
|
14
12
|
this.additionalReset = __bind(this.additionalReset, this);
|
15
13
|
originalResetFunc = this.resetPage;
|
16
|
-
initialReset = function() {
|
17
|
-
return
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
initialReset = (function(_this) {
|
15
|
+
return function() {
|
16
|
+
return originalResetFunc.apply(_this);
|
17
|
+
};
|
18
|
+
})(this);
|
19
|
+
this.resetPage = (function(_this) {
|
20
|
+
return function() {
|
21
|
+
initialReset();
|
22
|
+
return _this.additionalReset();
|
23
|
+
};
|
24
|
+
})(this);
|
23
25
|
Browser.__super__.constructor.call(this, this.owner, width, height);
|
24
26
|
}
|
25
27
|
|
26
28
|
Browser.prototype.additionalReset = function() {
|
27
|
-
var _this = this;
|
28
29
|
this.jsonRequests = [];
|
29
|
-
return this.page.onResourceRequested = function(
|
30
|
-
|
30
|
+
return this.page.onResourceRequested = (function(_this) {
|
31
|
+
return function(request) {
|
31
32
|
return _this.jsonRequests.push(request.id);
|
32
|
-
}
|
33
|
-
};
|
33
|
+
};
|
34
|
+
})(this);
|
34
35
|
};
|
35
36
|
|
36
37
|
Browser.prototype.sendResponse = function(response) {
|
37
|
-
var callback
|
38
|
-
_this = this;
|
38
|
+
var callback;
|
39
39
|
if (!this.responseCallback(response)) {
|
40
|
-
callback = function() {
|
41
|
-
return
|
42
|
-
|
40
|
+
callback = (function(_this) {
|
41
|
+
return function() {
|
42
|
+
return _this.responseCallback(response);
|
43
|
+
};
|
44
|
+
})(this);
|
43
45
|
return this.responseInterval = setInterval(callback, 10);
|
44
46
|
}
|
45
47
|
};
|
@@ -69,8 +71,7 @@ Poltergeist.WebPage = (function(_super) {
|
|
69
71
|
__extends(WebPage, _super);
|
70
72
|
|
71
73
|
function WebPage() {
|
72
|
-
|
73
|
-
return _ref;
|
74
|
+
return WebPage.__super__.constructor.apply(this, arguments);
|
74
75
|
}
|
75
76
|
|
76
77
|
WebPage.prototype.allRequestsReceived = function(ids) {
|
data/lib/patientgeist/version.rb
CHANGED
data/patientgeist.gemspec
CHANGED
@@ -2,17 +2,15 @@
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'patientgeist/version'
|
5
|
-
gem 'coffee-script'
|
6
|
-
require 'coffee-script'
|
7
5
|
|
8
6
|
Gem::Specification.new do |spec|
|
9
7
|
spec.name = "patientgeist"
|
10
8
|
spec.version = Patientgeist::VERSION
|
11
9
|
spec.authors = ["Christopher Erin"]
|
12
10
|
spec.email = ["chris.erin@gmail.com"]
|
13
|
-
spec.description = %q{Enable capybara
|
11
|
+
spec.description = %q{Enable capybara to wait for json ajax requests by default.}
|
14
12
|
spec.summary = %q{Enable capybara to wait for json ajax requests by default.}
|
15
|
-
spec.homepage = "
|
13
|
+
spec.homepage = ""
|
16
14
|
spec.license = "MIT"
|
17
15
|
|
18
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,67 +1,67 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patientgeist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Erin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-script
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: Enable capybara
|
55
|
+
description: Enable capybara to wait for json ajax requests by default.
|
56
56
|
email:
|
57
57
|
- chris.erin@gmail.com
|
58
58
|
executables: []
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
63
|
-
- .ruby-gemset
|
64
|
-
- .ruby-version
|
62
|
+
- ".gitignore"
|
63
|
+
- ".ruby-gemset"
|
64
|
+
- ".ruby-version"
|
65
65
|
- Gemfile
|
66
66
|
- LICENSE.txt
|
67
67
|
- README.md
|
@@ -74,7 +74,7 @@ files:
|
|
74
74
|
- lib/patientgeist/client_override.rb
|
75
75
|
- lib/patientgeist/version.rb
|
76
76
|
- patientgeist.gemspec
|
77
|
-
homepage:
|
77
|
+
homepage: ''
|
78
78
|
licenses:
|
79
79
|
- MIT
|
80
80
|
metadata: {}
|
@@ -84,17 +84,17 @@ require_paths:
|
|
84
84
|
- lib
|
85
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.2.2
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Enable capybara to wait for json ajax requests by default.
|