eivid 1.0.9 → 1.0.10

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: 077c29117cf2cded883cfaa9a2fa6357ad7abe30f67c7bc98f2ce53a001bc696
4
- data.tar.gz: 2968dca76bba1938d819fcdd44d982119f8e5811e8db15a91b1700ca1918a063
3
+ metadata.gz: 5d4c04b8322a6feab4b5a6329e564f1687cf6e71d7db09538101a38233aa9263
4
+ data.tar.gz: df5e24bb82fdb4f5e45e9eefc57fdababf0ff623efd29d0f9a32d0c4ab0cf5e1
5
5
  SHA512:
6
- metadata.gz: 3d97c505a4859479a8046bc0dfdd07b4f291e577d359399e23a6a8e37a4277bb5bfb597cd0edc850e200ca9234409e5ebc89f81308301a96025f7b3788249f90
7
- data.tar.gz: 3bac18de6b24adc6643c2615e889e8846d592b168da890bb4b244455ed9902d97467c72103b0b40d4bd0011fada3406e1a41bc4489e24bad3c787c0f5f04efa6
6
+ metadata.gz: 970e33e8efb6f0a3d15c2af957fee892edd48b67fac09fa72d295a82ffeef0da6bfbb9497554688a04344d71720873274ea7c11d6a207951556b79f67ec43fb1
7
+ data.tar.gz: e955eea3a14e70a13135d3a231307259a82bf0f7b22415551adddec3c7994cf3428b3be422dad2adff2806d90e443ddb247020a62397dd57634e667222f92787
@@ -0,0 +1,16 @@
1
+ module Eivid
2
+ class RequestFolderIdJob < ApplicationJob
3
+
4
+ def perform(eivid_owner_id)
5
+
6
+ owner = Owner.find(eivid_owner_id)
7
+ folder_id = RequestService.create_folder(namespace: Eivid.owner_model, id: owner.id)
8
+
9
+ # binding.pry
10
+
11
+ owner.update!(folder_id: folder_id)
12
+
13
+ end
14
+
15
+ end
16
+ end
@@ -5,16 +5,16 @@ module Eivid
5
5
 
6
6
  validates :external_id, presence: true, uniqueness: true
7
7
 
8
- before_create :get_folder_id
8
+ after_create :get_folder_id
9
9
 
10
- belongs_to :"#{Eivid.owner_model}", foreign_key: "external_id"
10
+ belongs_to :"#{Eivid.owner_model}", foreign_key: "external_id", optional: true
11
11
 
12
12
  def external_owner
13
13
  send Eivid.owner_model
14
14
  end
15
15
 
16
16
  def get_folder_id
17
- self.folder_id = RequestService.create_folder(namespace: Eivid.owner_model, id: self.external_id)
17
+ RequestFolderIdJob.perform_later(self.id)
18
18
  end
19
19
 
20
20
  end
data/lib/eivid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eivid
2
- VERSION = '1.0.9'
2
+ VERSION = '1.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eivid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer
@@ -80,6 +80,7 @@ files:
80
80
  - app/jobs/eivid/get_vimeo_hd_url_job.rb
81
81
  - app/jobs/eivid/get_vimeo_urls_job.rb
82
82
  - app/jobs/eivid/get_vimeo_urls_mixin.rb
83
+ - app/jobs/eivid/request_folder_id_job.rb
83
84
  - app/jobs/eivid/upload_vimeo_job.rb
84
85
  - app/mailers/eivid/application_mailer.rb
85
86
  - app/models/eivid/application_record.rb