bank_api 0.3.2 → 0.3.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23ae9f576f4948e91b867f2c4e8c21aa59b4a8b6
|
|
4
|
+
data.tar.gz: 75dcf2855c87a9a5684c92e06c83a8719dd6d58c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41de821db8c4737441b7d0f1a47f72ba4d7081f1b601808b43986410d6e7890385e84dae757dc0bdff509fdb452a1b449212e6f51b2ce8a05aa0e50cf09bae8f
|
|
7
|
+
data.tar.gz: d68f5688729e3628a860df85458743f235842b511f6b22630893c3eb6da42e7d5e87b89f5efab44026f7bf5ac55178b8512a75ad5c5faaecbad470f786da3309
|
data/Gemfile.lock
CHANGED
|
@@ -41,8 +41,9 @@ module BankApi::Clients
|
|
|
41
41
|
login
|
|
42
42
|
deposits_first_try = get_deposits_try
|
|
43
43
|
deposits_second_try = get_deposits_try
|
|
44
|
-
browser.close
|
|
45
44
|
deposits_first_try == deposits_second_try ? deposits_first_try : []
|
|
45
|
+
ensure
|
|
46
|
+
browser.close
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
def get_deposits_try
|
|
@@ -35,8 +35,9 @@ module BankApi::Clients::BancoSecurity
|
|
|
35
35
|
select_deposits_range
|
|
36
36
|
deposits = deposits_from_txt
|
|
37
37
|
validate_deposits(deposits) unless deposits.empty?
|
|
38
|
-
browser.close
|
|
39
38
|
deposits
|
|
39
|
+
ensure
|
|
40
|
+
browser.close
|
|
40
41
|
end
|
|
41
42
|
|
|
42
43
|
def execute_transfer(transfer_data)
|
|
@@ -45,6 +46,8 @@ module BankApi::Clients::BancoSecurity
|
|
|
45
46
|
goto_transfer_form
|
|
46
47
|
submit_transfer_form(transfer_data)
|
|
47
48
|
fill_coordinates
|
|
49
|
+
ensure
|
|
50
|
+
browser.close
|
|
48
51
|
end
|
|
49
52
|
|
|
50
53
|
def execute_batch_transfers(transfers_data)
|
|
@@ -55,6 +58,8 @@ module BankApi::Clients::BancoSecurity
|
|
|
55
58
|
submit_transfer_form(transfer_data)
|
|
56
59
|
fill_coordinates
|
|
57
60
|
end
|
|
61
|
+
ensure
|
|
62
|
+
browser.close
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
def goto_frame(query: nil, should_reset: true)
|
|
@@ -33,7 +33,7 @@ module BankApi::Clients::BancoSecurity
|
|
|
33
33
|
transactions.map do |t|
|
|
34
34
|
{
|
|
35
35
|
rut: format_rut(t[RUT_COLUMN]),
|
|
36
|
-
date: Date.parse(t[DATE_COLUMN]),
|
|
36
|
+
date: Date.parse(t[DATE_COLUMN].split[0]),
|
|
37
37
|
amount: t[AMOUNT_COLUMN].to_i
|
|
38
38
|
}
|
|
39
39
|
end
|
|
@@ -57,7 +57,9 @@ module BankApi::Clients::BancoSecurity
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def format_rut(rut)
|
|
60
|
-
rut
|
|
60
|
+
verification_digit = rut[-1]
|
|
61
|
+
without_verification_digit = rut[0..-2].reverse.scan(/.{1,3}/).join(".").reverse
|
|
62
|
+
"#{without_verification_digit}-#{verification_digit}"
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
def total_deposits
|
data/lib/bank_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bank_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- oaestay
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pincers
|