affiliate_window_etl 0.0.1 → 0.0.2

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: 3c47d9293527c807d7c97c7c549ae5b29604a6a9
4
- data.tar.gz: 07b406b3253d7b040b2c925167ac9ef5fd0c387e
3
+ metadata.gz: 427040cb240f63771c270492ff23b8ef7a637555
4
+ data.tar.gz: a74df8ab95bea6ef1d9a9a4d89a9e47619038940
5
5
  SHA512:
6
- metadata.gz: 65c1afd3e2086c82ca1f383e468e5f6522fb8d3372304f441beeee7e66beed14647040301f10681bdb90c3214343098c222bfbe2036504b70adb6f6dfb663be2
7
- data.tar.gz: 83334372aef519037ca82a0920bbbb1253ec0642e583b6ec150759bf8afca3a93b442032aa178a196e9d5d73454ce985e462ded16fa78d1c9b6c4f336b87c694
6
+ metadata.gz: a9823fd008567eda7180925fadc8c879b07ce4890d9a28f4df2669e99badb8292048f09716db45b275e976c27a056043bdced42e0ea6a5eec4c036e5c1544611
7
+ data.tar.gz: 263d5b0442bd721c3907d62138177b03a91d55b19182d44ec863bcd4af233bdf552b198d5c8a5858041e18e52ad1512da53f2ae18854482a5e6ed76d02ab3654
@@ -20,7 +20,7 @@ class AffiliateWindow
20
20
 
21
21
  def migrate
22
22
  database.connect!
23
- ActiveRecord::Migrator.migrate(migrations_path)
23
+ ActiveRecord::Migrator.migrate("db/migrate")
24
24
  end
25
25
 
26
26
  def migration_filenames
@@ -102,6 +102,13 @@ class AffiliateWindow
102
102
  count = 0
103
103
  transaction_ids.each_slice(CHUNK_SIZE) do |ids|
104
104
  response = client.get_transaction_product(transaction_ids: ids)
105
+
106
+ # Occasionally, Affiliate Window fails to record purchases so they
107
+ # artificially create some by extrapolating historical data. The
108
+ # transactions they create don't have any associated product data so
109
+ # skip over empty transaction_product responses.
110
+ next unless response
111
+
105
112
  transaction_products = [response.fetch(:transaction_product)].flatten
106
113
 
107
114
  transaction_products.each do |record|
@@ -1,5 +1,5 @@
1
1
  class AffiliateWindow
2
2
  class ETL
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: affiliate_window_etl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reevoo Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-12 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: affiliate_window