fine_ants 1.8.3 → 1.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fine_ants/adapters/amex.rb +6 -4
- data/lib/fine_ants/version.rb +1 -1
- 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: c696425121559daeacb3e07448c12e2ead130762
|
4
|
+
data.tar.gz: 9f350ed3862b9bf87b004975805222c017509b62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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.
|
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
|
data/lib/fine_ants/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|