gogo_driver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -8
- data/lib/gogo_driver/entity.rb +2 -1
- data/lib/gogo_driver/version.rb +2 -2
- data/lib/gogo_driver.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8defa8b4eaafff3763c5bf5c787453838f8cf828
|
4
|
+
data.tar.gz: ff100b70b680ba7e3f4478f383166f088459e634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef83cdf892398b03c8df7102225cb2dc51df9731c950aa0c0fb6e2c5672a963809c70d5e3cc25835998ca3ff22610d72811150076a2cd88aba3fe831ddccf685
|
7
|
+
data.tar.gz: 84ca1a708f3950a2ef76ecca799f4b5506c47e788ff7eb998d45e9b4c90663898c8d81bf5d16e0850f44c5ab9ecdf718f13e89022fdc17130b1db32f070cb30f
|
data/README.md
CHANGED
@@ -19,15 +19,11 @@ Let me show how to login Facebook.
|
|
19
19
|
|
20
20
|
```
|
21
21
|
require 'gogo_driver'
|
22
|
-
include GogoDriver
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
find('input#
|
27
|
-
|
28
|
-
find('input#pass').fill('password')
|
29
|
-
|
30
|
-
submit
|
23
|
+
driver = GogoDriver.new('https://www.facebook.com/')
|
24
|
+
driver.find('input#email').fill('mail@gogotanaka.com')
|
25
|
+
driver.find('input#pass').fill('password')
|
26
|
+
driver.submit
|
31
27
|
|
32
28
|
if driver.has_text?('メールアドレスが正しくありません')
|
33
29
|
# ログインエラー後の処理
|
data/lib/gogo_driver/entity.rb
CHANGED
data/lib/gogo_driver/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.0.
|
1
|
+
class GogoDriver
|
2
|
+
VERSION = "0.0.4"
|
3
3
|
end
|
data/lib/gogo_driver.rb
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
require "gogo_driver/version"
|
2
2
|
require "gogo_driver/entity"
|
3
3
|
|
4
|
-
|
5
|
-
def
|
6
|
-
@entity = Entity.new
|
4
|
+
class GogoDriver
|
5
|
+
def initialize(url='https://www.google.com')
|
6
|
+
@entity = Entity.new
|
7
7
|
@entity.go(url)
|
8
8
|
@last_url = url
|
9
9
|
end
|
10
|
-
module_function :go
|
11
10
|
|
12
11
|
def method_missing(method, *args, &block)
|
13
12
|
@entity.respond_to?(method) ? @entity.send(method, *args, &block) : super
|
14
13
|
rescue Errno::ECONNREFUSED
|
15
|
-
|
14
|
+
initialize(@last_url)
|
16
15
|
@entity.send(method, *args, &block)
|
17
16
|
end
|
18
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gogo_driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gogotanaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|