woody-decorators 11.5.0 → 11.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/woody/decorators.rb +1 -1
- data/lib/woody/decorators/video.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e0e1c70897b4d9809e6d0eef3aaa96a92f43245
|
4
|
+
data.tar.gz: f772787e54c9b5828dcb86cdd0e921850b897620
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 013bbf6e16cc8b3411ca0f674da40728a5491b7b86c171d35a16a5b0db2d6b732c46b78399322c7e28805ba47bdd857a4b1e259e8df3995dea06aa71f6196a81
|
7
|
+
data.tar.gz: 411d679cf07462912c47c8a4567522ed7bff284860c4762b3abc86dc3945a13d26cbbeb7d15530b7a48398ca5ee8f4b3d0e8e0d5b8b2023f363d0569a1847970
|
data/lib/woody/decorators.rb
CHANGED
@@ -44,6 +44,16 @@ module Woody
|
|
44
44
|
)
|
45
45
|
end
|
46
46
|
|
47
|
+
def error?
|
48
|
+
@model.attributes.transcoding_states.map do |transcoding_state|
|
49
|
+
if transcoding_state['state'] == "error"
|
50
|
+
return true
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
false
|
55
|
+
end
|
56
|
+
|
47
57
|
def gif
|
48
58
|
return 'https://i.imgur.com/jZCPUYx.gif' if dev?
|
49
59
|
return processing_image unless states?('gif')
|
@@ -53,12 +63,14 @@ module Woody
|
|
53
63
|
end
|
54
64
|
|
55
65
|
def processed?
|
66
|
+
return false if error?
|
56
67
|
return true if dev?
|
57
68
|
return false unless states?('gif') && states?('mp4')
|
58
69
|
type_processed?('gif') && type_processed?('mp4')
|
59
70
|
end
|
60
71
|
|
61
72
|
def thumbnail
|
73
|
+
return 'https://public.live.vidsy.co/shared/upload-failed.jpg' if error?
|
62
74
|
return 'https://i.imgur.com/jZCPUYx.gif' if dev?
|
63
75
|
return processing_image unless states?('gif')
|
64
76
|
video_transcoding_state('gif').path(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: woody-decorators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|