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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34edfcfc89c01cd3faf6517b6f42836298260eef
4
- data.tar.gz: e97d6f67820cef5d909f3b9528c0008893e41638
3
+ metadata.gz: 4e0e1c70897b4d9809e6d0eef3aaa96a92f43245
4
+ data.tar.gz: f772787e54c9b5828dcb86cdd0e921850b897620
5
5
  SHA512:
6
- metadata.gz: b04bb996b9ca9598d8c7f1fb6c5d6f00edfae1fb1f9fa0241e681eda33659486e870efd93f4adb52fa2d8265d0904ce143450d6922c571b9368ca508f9f8e6bb
7
- data.tar.gz: 4b7464c608ee5b507b3517d524bb07afac14106c6cdf15fda23b97047842ab436fe2b47da367136d3b37fcc3cb2ff24cb3c575e9bfbd83078b34c2de924d499b
6
+ metadata.gz: 013bbf6e16cc8b3411ca0f674da40728a5491b7b86c171d35a16a5b0db2d6b732c46b78399322c7e28805ba47bdd857a4b1e259e8df3995dea06aa71f6196a81
7
+ data.tar.gz: 411d679cf07462912c47c8a4567522ed7bff284860c4762b3abc86dc3945a13d26cbbeb7d15530b7a48398ca5ee8f4b3d0e8e0d5b8b2023f363d0569a1847970
@@ -1,5 +1,5 @@
1
1
  module Woody
2
2
  module Decorators
3
- VERSION = '11.5.0'.freeze
3
+ VERSION = '11.6.0'.freeze
4
4
  end
5
5
  end
@@ -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.5.0
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: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler