canvas_sync 0.8.4 → 0.9.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
  SHA256:
3
- metadata.gz: fd62cb62c721c5e1262ddbac6bfbecfb2712d8830cd6d738350876e6459895ab
4
- data.tar.gz: 7ac53b25cb60a449c5a678d12c5e902b48c9d96c10199473f630fca728141d99
3
+ metadata.gz: 61fa3f2a6f2ac74170f0eec3866bec23c662fbcce8a83e8a60ada2602818d693
4
+ data.tar.gz: 1a29823275161bf0a6d4c0e100702d75126395a56e20b5b4fe355baeb8c08696
5
5
  SHA512:
6
- metadata.gz: ac382d711a3ce11c8abc6cf1e7747548c0d8cd851f0bcddedaafcf2225861e2747efae3c97b6037d5d81fe7bba969b2d8ee13da1185dc037b3670c004f63027e
7
- data.tar.gz: 4b9483d5bdb4c5b3d10b1dc1216fad6a6480b646d655463b4148318a58aa2ae5c8251a1e44e96af1e7970e239e52220b1c9c945cef3e7de097aa220735bda5c3
6
+ metadata.gz: 4a555023f1f12e4b30717e790b9b1405e4e536d8061e068ba129f4a68dea45c612729561c961cb1fdcf2467366c6ca65700ea441bf138f9b7e92d61b3cc02d07
7
+ data.tar.gz: 431d583c39bdd9d5d04de46a02f1c2a65ad177b2767168d6e8ac1bb577584c0a5ca45ef5ba53ecd505b0f0accea28d437ae6c29dcb2f1f4b640a692e5200d944
@@ -7,9 +7,9 @@ module CanvasSync
7
7
  #
8
8
  # @param report_file_path [String]
9
9
  # @param klass [Object]
10
- def self.import(report_file_path, klass, account_id)
10
+ def self.import(report_file_path, klass, account_id, options)
11
11
  CSV.foreach(report_file_path, headers: true, header_converters: :symbol) do |row|
12
- klass.create_or_update_from_csv(row, account_id)
12
+ klass.create_or_update_from_csv(row, account_id, options)
13
13
  end
14
14
  end
15
15
  end
@@ -15,7 +15,9 @@ module CanvasSync
15
15
  def perform(job_chain, report_name, report_url, processor, options, report_id)
16
16
  @job_log.update_attributes(job_class: processor)
17
17
  download(report_name, report_url) do |file_path|
18
- options = job_chain[:global_options].merge(options)
18
+ options = job_chain[:global_options].merge(options).merge({
19
+ report_processor_job_id: @job_log.job_id
20
+ })
19
21
  processor.constantize.process(file_path, options, report_id)
20
22
  end
21
23
 
@@ -55,6 +55,7 @@ module CanvasSync
55
55
  report_file_path,
56
56
  model_name.singularize.capitalize.constantize,
57
57
  @options[:account_id],
58
+ @options,
58
59
  )
59
60
  else
60
61
  send("bulk_process_#{model_name}", report_file_path)
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.8.4".freeze
2
+ VERSION = "0.9.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2019-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler