capybara-ng 0.2.4 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be1d09148071e01a094f2a9cbecb642c95bb81ea
4
- data.tar.gz: d85deb17586269edd02764448aee3030e8007e45
3
+ metadata.gz: 8e0b654b35d7e33d4dc20626194e5bb310e74108
4
+ data.tar.gz: a3acaa24d555f1980b33603d841e2445f730146a
5
5
  SHA512:
6
- metadata.gz: 0db1d7f3ccb9ff4818587aa70c5d10dce59ea8be95b09fce0ae7495ad0df9426ff4e587b46a30b3056e26bdd55acda050329d5f8e359ff2e7e2c0c9d006736e8
7
- data.tar.gz: 99f180ad70ad9583c23038aeff5571264979820abbc5b9298b448521c602309d0976292f167e483efd6755e40abd46cd3b0cc8cd73381f4a245caa15eabc5ce4
6
+ metadata.gz: 92ec189e455673f6814fa25716384dbf445cec14510aa04e4bfd5d53043a97fc45cb42035ccbee2a440392c413653f4250a8e5e89cc39208e439bd7f27972aa6
7
+ data.tar.gz: a16b417a0006ed61bcf57f1637265ae132e67c8d27c5da87c4c2ea38ec5ffd9c802d18c2fac5f79ac89dc4ddfc9f9f366caf967a7a0161bbdc2a917563b01d04
@@ -3,6 +3,8 @@ require 'capybara'
3
3
  require 'logger'
4
4
 
5
5
  module Angular
6
+ ANGULAR_WAIT_TIME = 2.seconds
7
+
6
8
  class NotFound < StandardError
7
9
  end
8
10
 
@@ -20,6 +22,14 @@ module Angular
20
22
  @root_selector = root_selector
21
23
  end
22
24
 
25
+ def self.wait_time
26
+ @wait_time ||= ANGULAR_WAIT_TIME
27
+ end
28
+
29
+ def self.wait_time=(seconds)
30
+ @wait_time ||= seconds
31
+ end
32
+
23
33
  def self.logger
24
34
  @logger ||= defined?(::Rails) ? ::Rails.logger : Logger.new('capybara-ng.log')
25
35
  end
@@ -1,3 +1,3 @@
1
1
  module Angular
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.6"
3
3
  end
@@ -20,7 +20,7 @@ module Angular
20
20
  private
21
21
 
22
22
  def timeout?(start)
23
- Time.now - start > Capybara.default_max_wait_time
23
+ Time.now - start > Angular.wait_time
24
24
  end
25
25
 
26
26
  def timeout!
@@ -77,8 +77,12 @@ module Angular
77
77
  var app = angular.element(el);
78
78
  var injector = app.injector();
79
79
  var callback = function() {
80
- nglog("ready", []);
81
- window.ngReady = true;
80
+ nglog("ready-callback", []);
81
+ var $timeout = injector.get('$timeout');
82
+ $timeout(function() {
83
+ nglog("ready-$timeout", []);
84
+ window.ngReady = true;
85
+ }, 0);
82
86
  };
83
87
 
84
88
  try {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.3'
41
- - !ruby/object:Gem::Dependency
42
- name: awesome_print
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 1.2.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 1.2.0
55
41
  description: AngularJS bindings for capybara.
56
42
  email:
57
43
  - mr.kari.ikonen@gmail.com