bank_api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/bank_api/clients/base_client.rb +22 -1
- data/lib/bank_api/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: dd52c9bfa1a9cfe98159937215d5bec287aa929b
|
4
|
+
data.tar.gz: 0adfdbbcf9ce11c66c8dc9b4ae2cdd9bcbc86b5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c031b6e21a68fb257147e8a0612c1862c920cffe7a9b3649f7564f960e613814cccb771bfbbc936f416d9850ad3af001dd87f2a01a8f22a2da406e550a71ee9
|
7
|
+
data.tar.gz: dbc68f72da36199e600ef32ad96978395f91b642121a9ef1789c03b203fb363b021dd6ed7417533a935103922b503da94bde1bdc14aedd9a33621ed7f5537110
|
data/README.md
CHANGED
@@ -45,6 +45,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
45
45
|
|
46
46
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
47
47
|
|
48
|
+
## Heroku
|
49
|
+
|
50
|
+
1. Add https://github.com/heroku/heroku-buildpack-chromedriver.git buildpack.
|
51
|
+
2. Add https://github.com/kevinsawicki/heroku-buildpack-xvfb-google-chrome.git buildpack.
|
52
|
+
3. Set `'GOOGLE_CHROME_SHIM'` env var with value `"/app/.apt/usr/bin/google-chrome-stable"`
|
53
|
+
|
48
54
|
## Contributing
|
49
55
|
|
50
56
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bank_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pincers'
|
2
|
+
require 'selenium-webdriver'
|
2
3
|
|
3
4
|
require 'bank_api/exceptions'
|
4
5
|
require 'bank_api/sign_deposits'
|
@@ -34,7 +35,27 @@ module BankApi::Clients
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def browser
|
37
|
-
@browser ||= Pincers.for_webdriver
|
38
|
+
@browser ||= Pincers.for_webdriver(driver)
|
39
|
+
end
|
40
|
+
|
41
|
+
def driver(width = 1024, heigth = 768)
|
42
|
+
chrome_path = ENV.fetch('GOOGLE_CHROME_SHIM', nil)
|
43
|
+
return :chrome unless chrome_path
|
44
|
+
|
45
|
+
chrome_opts = {
|
46
|
+
"chromeOptions" => {
|
47
|
+
"binary" => chrome_path
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
opts = {
|
52
|
+
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(chrome_opts),
|
53
|
+
args: ['--no-sandbox', '--browsertime.xvfb']
|
54
|
+
}
|
55
|
+
|
56
|
+
d = Selenium::WebDriver.for(:chrome, opts)
|
57
|
+
d.manage.window.size = Selenium::WebDriver::Dimension.new(width, heigth)
|
58
|
+
d
|
38
59
|
end
|
39
60
|
|
40
61
|
def parse_entries(entries)
|
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.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oaestay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pincers
|