pincers 0.2.0 → 0.2.1

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: feda6bb5061f196c604a1dc79dfd32ec4bec842c
4
- data.tar.gz: 54b99547bdb963def619ef399e39b166de4c6720
3
+ metadata.gz: 630d90affa2488ca53b79f63643a3257618dfb9f
4
+ data.tar.gz: 1b8cf519322c4e69c0f2219a51a1d8e587aecd70
5
5
  SHA512:
6
- metadata.gz: acc759a2464e7ec81ad88d75b44824e1f3d7dddeaa68511ce851a7e5bd4d06b5dc2c3410a1f92a362a4789a2d1e1950bf4a7889b15d063a1d12b51204b832da8
7
- data.tar.gz: 084a161f77fe5e52eec66d84188a98b55dc70d945acdb8b3a5bce34f2ed70e57fba73be3f3768b90abf41fc0fedca87987e76fae05fd8a4177df26fd1cda0b98
6
+ metadata.gz: 29398e9d922ad46cab2754b9b249fd5b13588a80d0f8c3ad94208d57df72bf478b6e782da2ba9b9c18bd0f584db66f3f04ae7a10320adb91ca85eadc8b001a16
7
+ data.tar.gz: 8008abec35682cf438e7bd7a65a9cdaa3fad368167fb0051fd73b045edfa8ffe8c2f586807d684e33c291b950eb52d1ba6730a5decc66e7488d9aa4911e4f944
@@ -42,10 +42,10 @@ module Pincers::Core
42
42
  _urlOrOptions = { url: _urlOrOptions }
43
43
  end
44
44
 
45
- if _urlOrOptions.key? :frame
45
+ if _urlOrOptions.key? :url
46
+ goto_url _urlOrOptions[:url]
47
+ elsif _urlOrOptions.key? :frame
46
48
  goto_frame _urlOrOptions[:frame]
47
- elsif _urlOrOptions.key? :url
48
- backend.navigate_to _urlOrOptions[:url]
49
49
  else
50
50
  raise ArgumentError.new "Must provide a valid target when calling 'goto'"
51
51
  end
@@ -78,6 +78,11 @@ module Pincers::Core
78
78
 
79
79
  private
80
80
 
81
+ def goto_url(_url)
82
+ _url = "http://#{_url}" unless /^(https?|file|ftp):\/\// === _url
83
+ backend.navigate_to _url
84
+ end
85
+
81
86
  def goto_frame(_frame)
82
87
  case _frame
83
88
  when :top
@@ -1,3 +1,3 @@
1
1
  module Pincers
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pincers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver