kiba-uncommon 0.2.0 → 0.3.0

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: 000eecabfdcc456422839e9f7ad22d3be546dd52
4
- data.tar.gz: 70fe84a5fca5f598f4b334fef23ef29e17077e5c
3
+ metadata.gz: 005a2039aad38e80a12c65f27630fe4ee0e4e213
4
+ data.tar.gz: 0500bc62102cfa397f371953237b5d337ee2809c
5
5
  SHA512:
6
- metadata.gz: 81e498fc5b84f0e2af9e99db871f4df7a2a471baa40567e8f67fc63f18b22f8c7b4e8f5a883677adcf9c11ec61d2b9c8407b9eff5d3d34665e85bd8c2b282403
7
- data.tar.gz: 6c708a4a7983d09cc36c97c1a7515aedb339f70245784b0e334a05469f77a8f5cdb277032f24d2f6ff1e23c9de0d66384ea105ae1248fd1a8d6e70fed8dd62da
6
+ metadata.gz: 92ea53f2976f5c1b3c47e1fafa7a1f40d21a8fb84715159a46b10d9d6a0fb6b5f32d9cfc2fd9b3acd301f067a305a22a357eb862fbd6b7bbbd25cd19e58a20b3
7
+ data.tar.gz: b4e551af3178b5d8d58c64d2675867747416bf6a1aa5ea763cb2c7dc0eb5373bbf600d8d086d15392487f26fb1267cc2218d400db66ec40999eaac328c64afcf
@@ -1,4 +1,5 @@
1
1
  require 'csv'
2
+
2
3
  module Kiba
3
4
  module Uncommon
4
5
  module Sources
@@ -10,10 +11,8 @@ module Kiba
10
11
  end
11
12
 
12
13
  def each
13
- CSV.open(input_file, headers: true, header_converters: :symbol) do |csv|
14
- csv.each do |row|
15
- yield(row.to_hash)
16
- end
14
+ ::CSV.foreach(input_file, headers: true, header_converters: :symbol) do |row|
15
+ yield(row.to_hash)
17
16
  end
18
17
  end
19
18
  end
@@ -1,5 +1,5 @@
1
1
  module Kiba
2
2
  module Uncommon
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -1,10 +1,11 @@
1
- require 'kiba'
1
+ require 'dotenv'
2
2
  require '../lib/kiba/uncommon/sources/csv'
3
3
  require '../lib/kiba/uncommon/destinations/zuora_updater'
4
+ require 'zuora'
4
5
 
5
6
 
6
7
  # ETL like there's no tomorrow
7
- source Kiba::Uncommon::Sources::CSV, 'test_accounts.csv'
8
+ source Kiba::Uncommon::Sources::CSV, 'zuora_to_csv_output.csv'
8
9
 
9
10
 
10
11
  # Remove " - Test" from names
@@ -18,7 +19,7 @@ transform do |row|
18
19
  row
19
20
  end
20
21
 
21
-
22
22
  # Write results
23
- z_client = Zuora::Client.new(ENV['ZUORA_USERNAME'], ENV['ZUORA_PASSWORD'], ENV['USE_ZUORA_SANDBOX'] == 'true')
23
+ Dotenv.load('.env')
24
+ z_client = Zuora::Client.new(ENV.fetch('ZUORA_USERNAME'), ENV.fetch('ZUORA_PASSWORD'), ENV.fetch('USE_ZUORA_SANDBOX') == 'true')
24
25
  destination Kiba::Uncommon::Destinations::ZuoraUpdater, z_client, :Account
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kiba-uncommon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Carnes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-05 00:00:00.000000000 Z
12
+ date: 2018-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler