fine_ants 1.8.3 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2310bd2f261872d24734ac3d89c0b9d11fe68d7
4
- data.tar.gz: 42fe3a27ddf47e22b23fdd4f987bc38d810665e8
3
+ metadata.gz: c696425121559daeacb3e07448c12e2ead130762
4
+ data.tar.gz: 9f350ed3862b9bf87b004975805222c017509b62
5
5
  SHA512:
6
- metadata.gz: ba6e339009a2d9e394751dcf0e4a91a09223aaa6c4c1a31effce054834d901cddfe1b8f512419bebc14ee95c001d863ba71647f83cf22b7a521f771590ea28bd
7
- data.tar.gz: cfb04cb2d4aebae98f7e1a3fdad62711ccf5a761fbe1adf172191bb33ca8b717309e33f007a0cd795b93b4c857f058a940463136ebed83e4350ee7af14bcc094
6
+ metadata.gz: f4ca00c6c6ef33c04f4c66ea8aa5f67534c3df54d58a6d19bd13b608471e0423c89f7bb6158e31621141408a4ccef0f94ecc1fdf14e7938d0b8d77ce88624520
7
+ data.tar.gz: 34200cc91f07359a6f730ad7f8fa4ddfbbf79b743848786e5dc164d7a6aa7f665993ea0c0e73473b2cb11386d7d058bbd0f576ac0d2b553350bb324c8120871b
@@ -10,7 +10,8 @@ module FineAnts
10
10
 
11
11
  def login
12
12
  visit "https://www.americanexpress.com"
13
- within "#ssoform" do
13
+ form_css = find("form")[:id] == "ssoform" ? "#ssoform" : ".eliloMain"
14
+ within form_css do
14
15
  fill_in "User ID", :with => @user
15
16
  fill_in "Password", :with => @password
16
17
  click_link "Log In"
@@ -20,21 +21,22 @@ module FineAnts
20
21
 
21
22
  def download
22
23
  visit "https://global.americanexpress.com/accounts"
24
+ find(".card-block")
23
25
  all(".card-block > div").map do |account|
24
26
  name = account.find('.heading-3').text
25
- owed = account.all("table td").size == 3
27
+ owed = account.text.include?("Total Balance")
26
28
  {
27
29
  :adapter => :amex,
28
30
  :user => @user,
29
31
  :id => name,
30
32
  :name => name,
31
33
  :amount => -1 * BigDecimal.new(if owed
32
- account.find("table td:nth-child(2) span").text.gsub(/[\$,]/,'')
34
+ account.all("table td:nth-child(2) span").first.text.gsub(/[\$,]/,'')
33
35
  else
34
36
  "0"
35
37
  end)
36
38
  }
37
- end.tap do
39
+ end.tap do |accounts|
38
40
  page.driver.go_back
39
41
  click_button "Log Out"
40
42
  end
@@ -1,3 +1,3 @@
1
1
  module FineAnts
2
- VERSION = "1.8.3"
2
+ VERSION = "1.8.4"
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.8.3
4
+ version: 1.8.4
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-10-15 00:00:00.000000000 Z
11
+ date: 2017-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara