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 +4 -4
- data/app/jobs/eivid/request_folder_id_job.rb +16 -0
- data/app/models/eivid/owner.rb +3 -3
- data/lib/eivid/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d4c04b8322a6feab4b5a6329e564f1687cf6e71d7db09538101a38233aa9263
|
4
|
+
data.tar.gz: df5e24bb82fdb4f5e45e9eefc57fdababf0ff623efd29d0f9a32d0c4ab0cf5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/app/models/eivid/owner.rb
CHANGED
@@ -5,16 +5,16 @@ module Eivid
|
|
5
5
|
|
6
6
|
validates :external_id, presence: true, uniqueness: true
|
7
7
|
|
8
|
-
|
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
|
-
|
17
|
+
RequestFolderIdJob.perform_later(self.id)
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
data/lib/eivid/version.rb
CHANGED
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.
|
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
|