fine_ants 1.7.1 → 1.8.0

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: 4d72fc55b7c6f868c3372b4034bcf20d05fd079f
4
- data.tar.gz: c275e0fe8a2ee8bc69337bf9456cbd707ad3192c
3
+ metadata.gz: cc68cd5c42dea94139df362c34fa265eafc6cd42
4
+ data.tar.gz: 936e6f510d782f7983e025bdd2e2943cc1c75a6d
5
5
  SHA512:
6
- metadata.gz: d5e178d01270ccfec1f2bba1da5283553b2c49972fde308d4a758dd8054469e68df57d9dfac5780f82eba2823ac948952b00ba02fcab46f65d3ba0b1ac87afd1
7
- data.tar.gz: bc70a793704122fcdfae33cba887bb0dc04493fc63903bca93b522bb56907ece81ec43d4099dc114e149eebfe4f97eacab2d0d844a1a300b107a7638e72492ed
6
+ metadata.gz: 79c4d18d363783ddf6fb6c6635d2efcab8d36e221c81eb511231bd88ac9373603e1698c742e2e1dabb5a9055cadbb115eb00e7bbc60695855f1edb423d0c24d3
7
+ data.tar.gz: 8eb1f280c26c15dee1965ddf6ee3d6cde305cb8b70c81892d6b4f7a0e7b91d57975ba4bdf0b18e626c54713a310b0e633731b7afffde780bbeb9419a4670b55a
@@ -11,20 +11,28 @@ module FineAnts
11
11
  def login
12
12
  visit "https://www.onlinebanking.pnc.com/alservlet/SignonInitServlet"
13
13
  fill_in "userId", :with => @user
14
+ fill_in "password", :with => @password
14
15
  click_button "Sign On"
15
16
 
16
- if all("input[name=answer").any?
17
+ if all("input[value='Generate Code']").any?
18
+ click_button "Generate Code"
19
+ return false
20
+ elsif all("input[name=answer]").any?
17
21
  return false
18
22
  else
19
- try_password!
23
+ verify_login!
20
24
  return true
21
25
  end
22
26
  end
23
27
 
24
- def two_factor_response(answer)
25
- fill_in "answer", :with => answer
28
+ def two_factor_response(text_or_answer)
29
+ if all("input[name=answer]").any? # Security Q
30
+ fill_in "answer", :with => text_or_answer
31
+ else # Text message challenge
32
+ fill_in "otpNumber", :with => text_or_answer
33
+ end
26
34
  click_button "Continue"
27
- try_password!
35
+ verify_login!
28
36
  end
29
37
 
30
38
  def download
@@ -43,9 +51,7 @@ module FineAnts
43
51
 
44
52
  private
45
53
 
46
- def try_password!
47
- fill_in "password", :with => @password
48
- click_button "Sign On"
54
+ def verify_login!
49
55
  find ".lastSignOn"
50
56
  rescue
51
57
  raise FineAnts::LoginFailedError.new
@@ -1,3 +1,3 @@
1
1
  module FineAnts
2
- VERSION = "1.7.1"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fine_ants
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-12 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara