bigbank-client 0.2.0 → 0.2.1
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 +4 -4
- data/README.md +1 -1
- data/lib/bigbank/client/endpoints/application.rb +6 -4
- data/lib/bigbank/client/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: aa037e9fc6e00d3fb7b095e756aeeea4fc32323d
|
4
|
+
data.tar.gz: 9fc276f5e1b46633e5d9ef534c9a962348041df0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e69bf2e21a5ecec328c17ad39e81b8f8224c27189f16716b8b491eedc86c9f0e441bb7c16b37b2c50ee43d5861f57406fc912dedf2b58009a4c181bb848c6338
|
7
|
+
data.tar.gz: f99014bb6522b61e76dc321b9e2e048244001a7d70c28f616c048bee166450bcad27eaac70ef6b177f96629fbd05da18a49defab5bb7495f48987b5ddc8a7d24
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ response = Bigbank::Client::Application.create({
|
|
76
76
|
```
|
77
77
|
|
78
78
|
#### Extra methods the result of this endpoint:
|
79
|
-
- `#contract` downloads the contract and returns a `
|
79
|
+
- `#contract` downloads the contract and returns a `Tempfile` or `nil`
|
80
80
|
|
81
81
|
## Using a proxy
|
82
82
|
If you are running into SSL issue while making `https://` requests you are
|
@@ -22,7 +22,7 @@ module Bigbank
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class ApplicationResult < Result
|
25
|
-
|
25
|
+
attr_accessor :connection
|
26
26
|
|
27
27
|
def initialize(result, connection)
|
28
28
|
# TODO: Better make the connection statically available?
|
@@ -43,9 +43,11 @@ module Bigbank
|
|
43
43
|
#
|
44
44
|
# Returns a @StringIO with the contract buffer or nil
|
45
45
|
def download_contract
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
return nil unless response.success?
|
47
|
+
|
48
|
+
contract_response = connection.get(response.body["contract_file"])
|
49
|
+
if contract_response.success?
|
50
|
+
buffer = StringIO.new(contract_response.body)
|
49
51
|
buffer.set_encoding("ASCII-8BIT")
|
50
52
|
end
|
51
53
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigbank-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Samami
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|