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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40642e6630e688ddbdfc7cbeaae1e67d8f25b838
4
- data.tar.gz: a5a4e248e58df8152fe972ec345433bf39426e93
3
+ metadata.gz: aa037e9fc6e00d3fb7b095e756aeeea4fc32323d
4
+ data.tar.gz: 9fc276f5e1b46633e5d9ef534c9a962348041df0
5
5
  SHA512:
6
- metadata.gz: b36569a7310c0a7e0e96b64998b887cfbdc2eddcacfdd02c36705742ddb82449f32b8caff8d3370033046ea619aba5a21f1cdd80a7794ca95698c5ffd5bde3c4
7
- data.tar.gz: 3c02a49dbd0aeeabe573de207249be61387e3bc43a4329d50ef575fbe2cf1d1400326e79d0eec295380c62e934a994f31f8f82b5598c9e377f64dad1bbefc1a4
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 `StringIO` or `nil`
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
- attr_reader :connection
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
- response = connection.get(response["contract_file"])
47
- if response.success?
48
- buffer = StringIO.new(response.body)
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
 
@@ -1,5 +1,5 @@
1
1
  module Bigbank
2
2
  module Client
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
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.0
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-04-27 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler