capybara-webkit 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.travis.yml +19 -13
  4. data/Appraisals +8 -4
  5. data/Gemfile.lock +29 -14
  6. data/NEWS.md +4 -0
  7. data/README.md +1 -1
  8. data/Rakefile +1 -1
  9. data/capybara-webkit.gemspec +2 -1
  10. data/gemfiles/2.0.gemfile.lock +10 -6
  11. data/gemfiles/2.1.gemfile.lock +22 -9
  12. data/gemfiles/2.2.gemfile +7 -0
  13. data/gemfiles/2.2.gemfile.lock +77 -0
  14. data/gemfiles/2.3.gemfile +7 -0
  15. data/gemfiles/2.3.gemfile.lock +77 -0
  16. data/lib/capybara/webkit/browser.rb +28 -4
  17. data/lib/capybara/webkit/connection.rb +9 -24
  18. data/lib/capybara/webkit/driver.rb +40 -4
  19. data/lib/capybara/webkit/errors.rb +3 -0
  20. data/lib/capybara/webkit/version.rb +1 -1
  21. data/spec/browser_spec.rb +1 -1
  22. data/spec/connection_spec.rb +27 -5
  23. data/spec/driver_rendering_spec.rb +10 -0
  24. data/spec/driver_resize_window_spec.rb +22 -0
  25. data/spec/driver_spec.rb +117 -9
  26. data/spec/selenium_compatibility_spec.rb +3 -0
  27. data/spec/spec_helper.rb +22 -3
  28. data/spec/support/matchers/include_response.rb +24 -0
  29. data/src/CommandFactory.cpp +7 -1
  30. data/src/GoBack.cpp +12 -0
  31. data/src/GoBack.h +10 -0
  32. data/src/GoForward.cpp +12 -0
  33. data/src/GoForward.h +10 -0
  34. data/src/Render.cpp +10 -1
  35. data/src/Reset.cpp +0 -2
  36. data/src/SocketCommand.cpp +6 -0
  37. data/src/SocketCommand.h +1 -0
  38. data/src/StdinNotifier.cpp +16 -0
  39. data/src/StdinNotifier.h +20 -0
  40. data/src/WebPage.cpp +20 -5
  41. data/src/WebPage.h +4 -1
  42. data/src/WebPageManager.cpp +18 -7
  43. data/src/WebPageManager.h +2 -1
  44. data/src/WindowClose.cpp +10 -0
  45. data/src/WindowClose.h +12 -0
  46. data/src/WindowCommand.cpp +27 -0
  47. data/src/WindowCommand.h +21 -0
  48. data/src/WindowFocus.cpp +2 -25
  49. data/src/WindowFocus.h +4 -7
  50. data/src/WindowMaximize.cpp +14 -0
  51. data/src/WindowMaximize.h +12 -0
  52. data/src/WindowOpen.cpp +12 -0
  53. data/src/WindowOpen.h +10 -0
  54. data/src/WindowResize.cpp +16 -0
  55. data/src/WindowResize.h +12 -0
  56. data/src/WindowSize.cpp +17 -0
  57. data/src/WindowSize.h +12 -0
  58. data/src/capybara.js +19 -3
  59. data/src/find_command.h +7 -1
  60. data/src/main.cpp +4 -0
  61. data/src/webkit_server.pro +20 -4
  62. data/templates/Command.cpp +2 -0
  63. data/templates/Command.h +1 -3
  64. metadata +82 -54
  65. data/src/ResizeWindow.cpp +0 -17
  66. data/src/ResizeWindow.h +0 -10
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 96071aafa2680ebbe7213a1f0b016c35b9a09c0e
4
+ data.tar.gz: 8af0313facae8400b3838c7a3267f3571161c84d
5
+ SHA512:
6
+ metadata.gz: ce938a58c3fd9e640905092b24390d47091885d6545ed6390bba4cb75f53ada557bc1a78dff7cc26071c62adf3b13dfea430991ad659151b015e49b0687ef1fd
7
+ data.tar.gz: d49e72b00a410e69e9afecaa967a00913b7741ad14ce789314aa3ccd52f88128ed350e3a1deea62b70b1dc05085d7005f893590300c11c59e73dc2582884f38b
data/.gitignore CHANGED
@@ -23,3 +23,5 @@ webkit_server.pro.user
23
23
  *.gch
24
24
  .ruby-version
25
25
  .ruby-gemset
26
+ .idea
27
+ .qmake.stash
data/.travis.yml CHANGED
@@ -1,26 +1,32 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
- - 2.0.0
5
- matrix:
6
- exclude:
7
- - rvm: 1.9.3
8
- gemfile: gemfiles/2.0.gemfile
9
- env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
10
- - rvm: 2.0.0
11
- gemfile: gemfiles/2.0.gemfile
12
- env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
4
+ - 2.1.2
5
+ - jruby-19mode
13
6
  notifications:
14
7
  email: false
15
8
  script: xvfb-run rake
16
9
  env:
17
- - QMAKE=/usr/bin/qmake
18
- - QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
10
+ global:
11
+ - BUNDLE_JOBS=4
12
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
13
+ matrix:
14
+ include:
15
+ - rvm: 1.9.3
16
+ gemfile: gemfiles/2.1.gemfile
17
+ env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
18
+ - rvm: 1.9.3
19
+ gemfile: gemfiles/2.2.gemfile
20
+ env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
21
+ - rvm: 1.9.3
22
+ gemfile: gemfiles/2.3.gemfile
23
+ env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
19
24
  gemfile:
20
- - gemfiles/2.0.gemfile
21
25
  - gemfiles/2.1.gemfile
26
+ - gemfiles/2.2.gemfile
27
+ - gemfiles/2.3.gemfile
22
28
  before_install:
23
- - sudo apt-add-repository -y ppa:canonical-qt5-edgers/qt5-proper
29
+ - sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
24
30
  - sudo apt-get update
25
31
  - sudo apt-get install libqt5webkit5-dev qtdeclarative5-dev qtlocation5-dev qtsensors5-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev qt4-default
26
32
  install: bundle
data/Appraisals CHANGED
@@ -1,7 +1,11 @@
1
- appraise "2.0" do
2
- gem "capybara", "~> 2.0.2"
3
- end
4
-
5
1
  appraise "2.1" do
6
2
  gem "capybara", "~> 2.1.0"
7
3
  end
4
+
5
+ appraise "2.2" do
6
+ gem "capybara", "~> 2.2.0"
7
+ end
8
+
9
+ appraise "2.3" do
10
+ gem "capybara", "~> 2.3.0"
11
+ end
data/Gemfile.lock CHANGED
@@ -1,35 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-webkit (1.1.1)
5
- capybara (>= 2.0.2, < 2.2.0)
4
+ capybara-webkit (1.2.0)
5
+ capybara (>= 2.0.2, < 2.4.0)
6
6
  json
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
+ addressable (2.3.6)
11
12
  appraisal (0.4.0)
12
13
  bundler
13
14
  rake
14
- capybara (2.1.0)
15
+ capybara (2.3.0)
15
16
  mime-types (>= 1.16)
16
17
  nokogiri (>= 1.3.3)
17
18
  rack (>= 1.0.0)
18
19
  rack-test (>= 0.5.4)
19
20
  xpath (~> 2.0)
20
- childprocess (0.3.9)
21
+ childprocess (0.4.1)
21
22
  ffi (~> 1.0, >= 1.0.11)
22
23
  diff-lcs (1.2.4)
23
- ffi (1.9.0)
24
- ffi (1.9.0-x86-mingw32)
24
+ ffi (1.9.3)
25
+ ffi (1.9.3-java)
26
+ ffi (1.9.3-x86-mingw32)
25
27
  json (1.8.1)
26
- mime-types (2.0)
28
+ json (1.8.1-java)
29
+ launchy (2.4.2)
30
+ addressable (~> 2.3)
31
+ launchy (2.4.2-java)
32
+ addressable (~> 2.3)
33
+ spoon (~> 0.0.1)
34
+ mime-types (2.3)
27
35
  mini_magick (3.2.1)
28
36
  subexec (~> 0.0.4)
29
- mini_portile (0.5.2)
30
- multi_json (1.7.8)
31
- nokogiri (1.6.0)
32
- mini_portile (~> 0.5.0)
37
+ mini_portile (0.6.0)
38
+ multi_json (1.8.4)
39
+ nokogiri (1.6.2.1)
40
+ mini_portile (= 0.6.0)
41
+ nokogiri (1.6.2.1-java)
42
+ nokogiri (1.6.2.1-x86-mingw32)
43
+ mini_portile (= 0.6.0)
33
44
  rack (1.5.2)
34
45
  rack-protection (1.3.2)
35
46
  rack
@@ -44,16 +55,18 @@ GEM
44
55
  rspec-expectations (2.14.1)
45
56
  diff-lcs (>= 1.1.3, < 2.0)
46
57
  rspec-mocks (2.14.3)
47
- rubyzip (0.9.9)
48
- selenium-webdriver (2.33.0)
58
+ rubyzip (1.1.0)
59
+ selenium-webdriver (2.39.0)
49
60
  childprocess (>= 0.2.5)
50
61
  multi_json (~> 1.0)
51
- rubyzip
62
+ rubyzip (~> 1.0)
52
63
  websocket (~> 1.0.4)
53
64
  sinatra (1.3.5)
54
65
  rack (~> 1.4)
55
66
  rack-protection (~> 1.3)
56
67
  tilt (~> 1.3, >= 1.3.3)
68
+ spoon (0.0.4)
69
+ ffi
57
70
  subexec (0.0.4)
58
71
  tilt (1.3.3)
59
72
  websocket (1.0.7)
@@ -61,12 +74,14 @@ GEM
61
74
  nokogiri (~> 1.3)
62
75
 
63
76
  PLATFORMS
77
+ java
64
78
  ruby
65
79
  x86-mingw32
66
80
 
67
81
  DEPENDENCIES
68
82
  appraisal (~> 0.4.0)
69
83
  capybara-webkit!
84
+ launchy
70
85
  mini_magick
71
86
  rake
72
87
  rspec (~> 2.14.0)
data/NEWS.md CHANGED
@@ -1,3 +1,7 @@
1
+ New for 1.2.0:
2
+ * Capybara 2.3 compatibility.
3
+ * Kill webkit_server when parent process closes stdin.
4
+
1
5
  New for 1.1.1:
2
6
  * Lock capybara dependency to < 2.2.0.
3
7
 
data/README.md CHANGED
@@ -38,7 +38,7 @@ If you're having trouble compiling or installing, please check out the [wiki].
38
38
  If you don't have any luck there, please post to [Stack Overflow]. Please don't
39
39
  open a Github issue for a system-specific compiler issue.
40
40
 
41
- [Reporting Crashes]: http://stackoverflow.com/questions/tagged/capybara-webkit
41
+ [Reporting Crashes]: https://github.com/thoughtbot/capybara-webkit/wiki/Reporting-Crashes
42
42
  [capybara-webkit wiki]: https://github.com/thoughtbot/capybara-webkit/wiki
43
43
  [Stack Overflow]: http://stackoverflow.com/questions/tagged/capybara-webkit
44
44
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'bundler'
2
2
  require 'rspec/core/rake_task'
3
- require 'capybara_webkit_builder'
3
+ require_relative './lib/capybara_webkit_builder'
4
4
  require 'appraisal'
5
5
 
6
6
  Bundler::GemHelper.install_tasks
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.required_ruby_version = ">= 1.9.0"
21
21
 
22
- s.add_runtime_dependency("capybara", ">= 2.0.2", "< 2.2.0")
22
+ s.add_runtime_dependency("capybara", ">= 2.0.2", "< 2.4.0")
23
23
  s.add_runtime_dependency("json")
24
24
 
25
25
  s.add_development_dependency("rspec", "~> 2.14.0")
@@ -29,5 +29,6 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency("rake")
30
30
  s.add_development_dependency("appraisal", "~> 0.4.0")
31
31
  s.add_development_dependency("selenium-webdriver")
32
+ s.add_development_dependency("launchy")
32
33
  end
33
34
 
@@ -18,16 +18,19 @@ GEM
18
18
  rack-test (>= 0.5.4)
19
19
  selenium-webdriver (~> 2.0)
20
20
  xpath (~> 1.0.0)
21
- childprocess (0.3.9)
21
+ childprocess (0.4.1)
22
22
  ffi (~> 1.0, >= 1.0.11)
23
23
  diff-lcs (1.2.5)
24
- ffi (1.9.0)
24
+ ffi (1.9.3)
25
+ ffi (1.9.3-java)
25
26
  json (1.8.1)
27
+ json (1.8.1-java)
26
28
  mime-types (1.23)
27
29
  mini_magick (3.5.0)
28
30
  subexec (~> 0.2.1)
29
- multi_json (1.7.8)
31
+ multi_json (1.8.4)
30
32
  nokogiri (1.5.9)
33
+ nokogiri (1.5.9-java)
31
34
  rack (1.5.2)
32
35
  rack-protection (1.3.2)
33
36
  rack
@@ -42,11 +45,11 @@ GEM
42
45
  rspec-expectations (2.14.4)
43
46
  diff-lcs (>= 1.1.3, < 2.0)
44
47
  rspec-mocks (2.14.4)
45
- rubyzip (0.9.9)
46
- selenium-webdriver (2.33.0)
48
+ rubyzip (1.1.0)
49
+ selenium-webdriver (2.39.0)
47
50
  childprocess (>= 0.2.5)
48
51
  multi_json (~> 1.0)
49
- rubyzip
52
+ rubyzip (~> 1.0)
50
53
  websocket (~> 1.0.4)
51
54
  sinatra (1.3.5)
52
55
  rack (~> 1.4)
@@ -59,6 +62,7 @@ GEM
59
62
  nokogiri (~> 1.3)
60
63
 
61
64
  PLATFORMS
65
+ java
62
66
  ruby
63
67
 
64
68
  DEPENDENCIES
@@ -1,13 +1,14 @@
1
1
  PATH
2
- remote: /home/mhoran/capybara-webkit
2
+ remote: ../
3
3
  specs:
4
- capybara-webkit (1.1.1)
5
- capybara (>= 2.0.2, < 2.2.0)
4
+ capybara-webkit (1.2.0)
5
+ capybara (>= 2.0.2, < 2.4.0)
6
6
  json
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
+ addressable (2.3.6)
11
12
  appraisal (0.4.1)
12
13
  bundler
13
14
  rake
@@ -17,16 +18,24 @@ GEM
17
18
  rack (>= 1.0.0)
18
19
  rack-test (>= 0.5.4)
19
20
  xpath (~> 2.0)
20
- childprocess (0.3.9)
21
+ childprocess (0.4.1)
21
22
  ffi (~> 1.0, >= 1.0.11)
22
23
  diff-lcs (1.2.5)
23
- ffi (1.9.0)
24
+ ffi (1.9.3)
25
+ ffi (1.9.3-java)
24
26
  json (1.8.1)
27
+ json (1.8.1-java)
28
+ launchy (2.4.2)
29
+ addressable (~> 2.3)
30
+ launchy (2.4.2-java)
31
+ addressable (~> 2.3)
32
+ spoon (~> 0.0.1)
25
33
  mime-types (1.23)
26
34
  mini_magick (3.5.0)
27
35
  subexec (~> 0.2.1)
28
- multi_json (1.7.8)
36
+ multi_json (1.8.4)
29
37
  nokogiri (1.5.9)
38
+ nokogiri (1.5.9-java)
30
39
  rack (1.5.2)
31
40
  rack-protection (1.3.2)
32
41
  rack
@@ -41,16 +50,18 @@ GEM
41
50
  rspec-expectations (2.14.4)
42
51
  diff-lcs (>= 1.1.3, < 2.0)
43
52
  rspec-mocks (2.14.4)
44
- rubyzip (0.9.9)
45
- selenium-webdriver (2.33.0)
53
+ rubyzip (1.1.0)
54
+ selenium-webdriver (2.39.0)
46
55
  childprocess (>= 0.2.5)
47
56
  multi_json (~> 1.0)
48
- rubyzip
57
+ rubyzip (~> 1.0)
49
58
  websocket (~> 1.0.4)
50
59
  sinatra (1.3.5)
51
60
  rack (~> 1.4)
52
61
  rack-protection (~> 1.3)
53
62
  tilt (~> 1.3, >= 1.3.3)
63
+ spoon (0.0.4)
64
+ ffi
54
65
  subexec (0.2.2)
55
66
  tilt (1.3.3)
56
67
  websocket (1.0.7)
@@ -58,12 +69,14 @@ GEM
58
69
  nokogiri (~> 1.3)
59
70
 
60
71
  PLATFORMS
72
+ java
61
73
  ruby
62
74
 
63
75
  DEPENDENCIES
64
76
  appraisal (~> 0.4.0)
65
77
  capybara (~> 2.1.0)
66
78
  capybara-webkit!
79
+ launchy
67
80
  mini_magick
68
81
  rake
69
82
  rspec (~> 2.14.0)
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "capybara", "~> 2.2.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ capybara-webkit (1.2.0)
5
+ capybara (>= 2.0.2, < 2.4.0)
6
+ json
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.3.6)
12
+ appraisal (0.4.1)
13
+ bundler
14
+ rake
15
+ capybara (2.2.1)
16
+ mime-types (>= 1.16)
17
+ nokogiri (>= 1.3.3)
18
+ rack (>= 1.0.0)
19
+ rack-test (>= 0.5.4)
20
+ xpath (~> 2.0)
21
+ childprocess (0.5.3)
22
+ ffi (~> 1.0, >= 1.0.11)
23
+ diff-lcs (1.2.5)
24
+ ffi (1.9.3)
25
+ json (1.8.1)
26
+ launchy (2.4.2)
27
+ addressable (~> 2.3)
28
+ mime-types (2.3)
29
+ mini_magick (3.7.0)
30
+ subexec (~> 0.2.1)
31
+ mini_portile (0.6.0)
32
+ multi_json (1.10.1)
33
+ nokogiri (1.6.2.1)
34
+ mini_portile (= 0.6.0)
35
+ rack (1.5.2)
36
+ rack-protection (1.5.3)
37
+ rack
38
+ rack-test (0.6.2)
39
+ rack (>= 1.0)
40
+ rake (10.3.2)
41
+ rspec (2.14.1)
42
+ rspec-core (~> 2.14.0)
43
+ rspec-expectations (~> 2.14.0)
44
+ rspec-mocks (~> 2.14.0)
45
+ rspec-core (2.14.8)
46
+ rspec-expectations (2.14.5)
47
+ diff-lcs (>= 1.1.3, < 2.0)
48
+ rspec-mocks (2.14.6)
49
+ rubyzip (1.1.4)
50
+ selenium-webdriver (2.42.0)
51
+ childprocess (>= 0.5.0)
52
+ multi_json (~> 1.0)
53
+ rubyzip (~> 1.0)
54
+ websocket (~> 1.0.4)
55
+ sinatra (1.4.5)
56
+ rack (~> 1.4)
57
+ rack-protection (~> 1.4)
58
+ tilt (~> 1.3, >= 1.3.4)
59
+ subexec (0.2.3)
60
+ tilt (1.4.1)
61
+ websocket (1.0.7)
62
+ xpath (2.0.0)
63
+ nokogiri (~> 1.3)
64
+
65
+ PLATFORMS
66
+ ruby
67
+
68
+ DEPENDENCIES
69
+ appraisal (~> 0.4.0)
70
+ capybara (~> 2.2.0)
71
+ capybara-webkit!
72
+ launchy
73
+ mini_magick
74
+ rake
75
+ rspec (~> 2.14.0)
76
+ selenium-webdriver
77
+ sinatra
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "capybara", "~> 2.3.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,77 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ capybara-webkit (1.2.0)
5
+ capybara (>= 2.0.2, < 2.4.0)
6
+ json
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.3.6)
12
+ appraisal (0.4.1)
13
+ bundler
14
+ rake
15
+ capybara (2.3.0)
16
+ mime-types (>= 1.16)
17
+ nokogiri (>= 1.3.3)
18
+ rack (>= 1.0.0)
19
+ rack-test (>= 0.5.4)
20
+ xpath (~> 2.0)
21
+ childprocess (0.5.3)
22
+ ffi (~> 1.0, >= 1.0.11)
23
+ diff-lcs (1.2.5)
24
+ ffi (1.9.3)
25
+ json (1.8.1)
26
+ launchy (2.4.2)
27
+ addressable (~> 2.3)
28
+ mime-types (2.3)
29
+ mini_magick (3.7.0)
30
+ subexec (~> 0.2.1)
31
+ mini_portile (0.6.0)
32
+ multi_json (1.10.1)
33
+ nokogiri (1.6.2.1)
34
+ mini_portile (= 0.6.0)
35
+ rack (1.5.2)
36
+ rack-protection (1.5.3)
37
+ rack
38
+ rack-test (0.6.2)
39
+ rack (>= 1.0)
40
+ rake (10.3.2)
41
+ rspec (2.14.1)
42
+ rspec-core (~> 2.14.0)
43
+ rspec-expectations (~> 2.14.0)
44
+ rspec-mocks (~> 2.14.0)
45
+ rspec-core (2.14.8)
46
+ rspec-expectations (2.14.5)
47
+ diff-lcs (>= 1.1.3, < 2.0)
48
+ rspec-mocks (2.14.6)
49
+ rubyzip (1.1.4)
50
+ selenium-webdriver (2.42.0)
51
+ childprocess (>= 0.5.0)
52
+ multi_json (~> 1.0)
53
+ rubyzip (~> 1.0)
54
+ websocket (~> 1.0.4)
55
+ sinatra (1.4.5)
56
+ rack (~> 1.4)
57
+ rack-protection (~> 1.4)
58
+ tilt (~> 1.3, >= 1.3.4)
59
+ subexec (0.2.3)
60
+ tilt (1.4.1)
61
+ websocket (1.0.7)
62
+ xpath (2.0.0)
63
+ nokogiri (~> 1.3)
64
+
65
+ PLATFORMS
66
+ ruby
67
+
68
+ DEPENDENCIES
69
+ appraisal (~> 0.4.0)
70
+ capybara (~> 2.3.0)
71
+ capybara-webkit!
72
+ launchy
73
+ mini_magick
74
+ rake
75
+ rspec (~> 2.14.0)
76
+ selenium-webdriver
77
+ sinatra