iron_bank 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd0a8bbdf58674ed00c1fae75779154686d68169
4
- data.tar.gz: 3e717805b232af39c08d5a25fced3a37695575e1
3
+ metadata.gz: f5b0af1ab077031cbb8470d207d521419f623de7
4
+ data.tar.gz: b935b53fa4d91c3d83c9a233d16c4f39d39200bc
5
5
  SHA512:
6
- metadata.gz: 0f3095ab197020b4c66cdc90cfdf92778468d94d091f757cd1aa2fc08ca8bfbd1aad0b6c67a5ed9b254d0f4628ba3ad37c27f92368f9452d342dd06631284636
7
- data.tar.gz: d64a053dbb6d9d1de5fdad2eddfab54a5e37b90ebee73ee06c168465a5396b9f73fd0726be315a5a731cf950f506d82b00d4f8849d40a0d229ad4b36cf59336f
6
+ metadata.gz: e9f1e93c42390c4f8b8906f08b645521d43713c4947ad671c4e55b62667ab4b8978b8e2c1f1cbfe9154bea06cbb407458bbe812f95572ca1dfdd1c1dae56c245
7
+ data.tar.gz: 4a427bb3e77dc8e361dd12693d08a4dcdf0ffdb31ebfd3d42fb20b111529270261be835a5b6dc7cc1626615ee91234d7c587d1d94bc10b0eace0da1da5cbcbfc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (3.0.0)
4
+ iron_bank (3.0.1)
5
5
  faraday (~> 0)
6
6
  faraday_middleware (~> 0)
7
7
  nokogiri (~> 1)
data/README.md CHANGED
@@ -57,7 +57,7 @@ IronBank.configure do |config|
57
57
  config.schema_directory = 'directory-path' # schema drirectory path
58
58
 
59
59
  # Ironbank uses Faraday to send request to Zuora. Middlewares can be specified
60
- # by adding the class name and class options to the `middlewares`
60
+ # by adding the class name and class options to the `middlewares`
61
61
  # configuration.
62
62
  # Faraday middlewares, we can send in an array with cutomer middleware class
63
63
  # and options
@@ -133,6 +133,11 @@ https://github.com/zendesk/iron_bank.
133
133
  - `AutoPay` field on the `Invoice` object is not queryable using ZOQL despite
134
134
  the metadata showing `<selectable>true</selectable>`, hence it has been added
135
135
  to the `exclude_fields` method.
136
+ - Exporting the local records through `IronBank::LocalRecords.export` can take a
137
+ long time (especially the `ProductRatePlanChargeTier` records). In case the
138
+ task fails because the export is still processing, you can manually download
139
+ the export from Zuora by going to **Reporting** -> **Data Sources** and
140
+ looking for the `ProductRatePlanChargeTier.csv` export.
136
141
 
137
142
  ## Copyright and license
138
143
 
@@ -16,6 +16,7 @@ module IronBank
16
16
  end
17
17
 
18
18
  def self.from_connection(connection, name)
19
+ IronBank.logger.info "Describe (#{name})"
19
20
  xml = connection.get("v1/describe/#{name}").body
20
21
  new(Nokogiri::XML(xml))
21
22
  rescue TypeError
@@ -34,10 +34,9 @@ module IronBank
34
34
  private
35
35
 
36
36
  BACKOFF = {
37
- max: 3,
38
- interval: 0.5,
39
- randomness: 0.5,
40
- factor: 4
37
+ max: 10,
38
+ interval: 1,
39
+ factor: 2
41
40
  }.freeze
42
41
  private_constant :BACKOFF
43
42
 
@@ -59,8 +58,9 @@ module IronBank
59
58
  end
60
59
 
61
60
  def export_query_info
62
- "Waiting for export #{export.id} to complete " \
63
- "(attempt #{query_attempts} of #{BACKOFF[:max]})"
61
+ "Waiting for export #{export.id} (#{resource}) to complete " \
62
+ "(attempt #{query_attempts} of #{BACKOFF[:max]}; #{backoff_time}s " \
63
+ "sleeping time)"
64
64
  end
65
65
 
66
66
  def completed?
@@ -85,11 +85,7 @@ module IronBank
85
85
  end
86
86
 
87
87
  def backoff_time
88
- interval = BACKOFF[:interval]
89
- current_interval = interval * (BACKOFF[:factor]**query_attempts)
90
- random_interval = rand * BACKOFF[:randomness].to_f * interval
91
-
92
- current_interval + random_interval
88
+ BACKOFF[:interval] * (BACKOFF[:factor]**query_attempts)
93
89
  end
94
90
  end
95
91
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2019-04-10 00:00:00.000000000 Z
14
+ date: 2019-04-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bump