eivid 1.0.10 → 1.1.2

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: 5d4c04b8322a6feab4b5a6329e564f1687cf6e71d7db09538101a38233aa9263
4
- data.tar.gz: df5e24bb82fdb4f5e45e9eefc57fdababf0ff623efd29d0f9a32d0c4ab0cf5e1
3
+ metadata.gz: ae4d464f1263ccf29c39f58a8e4f4a370aaed588fbb830d90d8548b472f84d64
4
+ data.tar.gz: ee70e8757bb94225a72e0760a5235a5d9e91b5dc70401e98d8326df8fc0973f5
5
5
  SHA512:
6
- metadata.gz: 970e33e8efb6f0a3d15c2af957fee892edd48b67fac09fa72d295a82ffeef0da6bfbb9497554688a04344d71720873274ea7c11d6a207951556b79f67ec43fb1
7
- data.tar.gz: e955eea3a14e70a13135d3a231307259a82bf0f7b22415551adddec3c7994cf3428b3be422dad2adff2806d90e443ddb247020a62397dd57634e667222f92787
6
+ metadata.gz: 60d76f2ad070118d374c6c223ffa6beb259c7fbb7120836ff6db75558559e4826090a6e15dd1b63406f7f0a50642f2fb44878b52d1860c9d4d7b3c0a35e6c8e5
7
+ data.tar.gz: 4cf1c5431039260a574e66c6b68dfc521742740ab6252c8f6025befd48bfd784d2a69e2eb3fcd0e621da2c551fa82c4f385c814836631142572904750862e5db
@@ -6,8 +6,6 @@ module Eivid
6
6
  owner = Owner.find(eivid_owner_id)
7
7
  folder_id = RequestService.create_folder(namespace: Eivid.owner_model, id: owner.id)
8
8
 
9
- # binding.pry
10
-
11
9
  owner.update!(folder_id: folder_id)
12
10
 
13
11
  end
@@ -3,11 +3,11 @@ module Eivid::Concerns::MainApp::Owner
3
3
  included do
4
4
 
5
5
  has_one :video_owner, class_name: 'Eivid::Owner', foreign_key: 'external_id'
6
- has_many :videos, class_name: 'Eivid::Video', source: :video_owner, foreign_key: 'owner_id'
6
+ has_many :videos, class_name: 'Eivid::Video', foreign_key: 'owner_id'
7
7
 
8
8
  include Eivid::Concerns::MainApp::VideoConcerns
9
9
 
10
- after_create :create_eivid_owner
10
+ after_commit :create_eivid_owner, on: :create
11
11
 
12
12
  def create_eivid_owner
13
13
  Eivid::Owner.create(external_id: self.id)
@@ -5,7 +5,7 @@ module Eivid
5
5
 
6
6
  validates :external_id, presence: true, uniqueness: true
7
7
 
8
- after_create :get_folder_id
8
+ after_commit :get_folder_id, unless: :folder_id
9
9
 
10
10
  belongs_to :"#{Eivid.owner_model}", foreign_key: "external_id", optional: true
11
11
 
data/lib/eivid/engine.rb CHANGED
@@ -7,27 +7,23 @@ module Eivid
7
7
 
8
8
  end
9
9
 
10
- class << self
10
+ mattr_accessor :owner_model, :infer_external_owner_id, :notify_front_enabled, :notify_method_on_upload,
11
+ :notify_method_on_video_available, :notify_method_on_versions_available
11
12
 
12
- mattr_accessor :owner_model, :infer_external_owner_id, :notify_front_enabled, :notify_method_on_upload,
13
- :notify_method_on_video_available, :notify_method_on_versions_available
14
-
15
- #sets video owner in the main app
16
- self.owner_model = nil
17
-
18
- # sets how to extract the owner_id in controller actions
19
- self.infer_external_owner_id = "params['external_owner_id'].to_i"
20
-
21
- # sets front end notifiers
22
- self.notify_front_enabled = false
23
- self.notify_method_on_upload = nil
24
- self.notify_method_on_video_available = nil
25
- self.notify_method_on_versions_available = nil
13
+ #sets video owner in the main app
14
+ self.owner_model = nil
15
+
16
+ # sets how to extract the owner_id in controller actions
17
+ self.infer_external_owner_id = "params['external_owner_id'].to_i"
26
18
 
27
- def set_mattr_accessors(&block)
28
- yield self
29
- end
19
+ # sets front end notifiers
20
+ self.notify_front_enabled = false
21
+ self.notify_method_on_upload = nil
22
+ self.notify_method_on_video_available = nil
23
+ self.notify_method_on_versions_available = nil
30
24
 
25
+ def self.set_mattr_accessors(&block)
26
+ yield self
31
27
  end
32
28
 
33
29
  end
data/lib/eivid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eivid
2
- VERSION = '1.0.10'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eivid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.3
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.3
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement