ish_models 0.0.33.91 → 0.0.33.92

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/video.rb +13 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b71b3055f07ba124932d22bb734bc46dd657ec3f184771d681e0edd99d4aa234
4
- data.tar.gz: 692e492b7c58974d2e7567958b29698da66861c1418ddb7449fef5e7ac9ac9ab
3
+ metadata.gz: 2cc51a9eb5416b7dbce8df4c621bf9703270c885bab0a757074fa6be7bc05a78
4
+ data.tar.gz: ece2a4f07db920756f3907111810b45da14e6b282f2ba77b97ab64817d33bd0f
5
5
  SHA512:
6
- metadata.gz: 28a5a9fa009383235d00d97333bd658c0cd3a0aa8483b7f4e916a298ad3bb9c18db94eb2adbccb629446444eb007bef57d7376a4a5be40a8b87a64908877aad3
7
- data.tar.gz: 79bd225334651885df0ca977ee7c35c6cede1aed2734a78ab774134279c94a983550eb108b83aa0ed1b610ca14f498e068d507668c633d9c23eb21a2c718eb4c
6
+ metadata.gz: f86cc68f8d5d2667b1d737ddfc047c6b4494ac8889dc48cd4635347c0acd810e7c4cc834ddd88c0e040a18c53a7ff331a8aa2c4851ce4ad6a1aa4963e909cbe1
7
+ data.tar.gz: a4044d1ed5090628d0bfffd7ff36ac9534d590c022f82c6112b61eda4bd6511381cef6dbd45038b9a1a5e76d196ca0f029340861bc83ab954e3981ce26630662
data/lib/video.rb CHANGED
@@ -57,7 +57,19 @@ class Video
57
57
  :s3_protocol => 'https',
58
58
  :s3_permissions => 'public-read',
59
59
  :validate_media_type => false
60
-
61
60
  validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
62
61
 
62
+ has_mongoid_attached_file :thumb,
63
+ :styles => {
64
+ :mini => '20x20#',
65
+ :thumb => "100x100#",
66
+ :small => "400x400>",
67
+ },
68
+ :storage => :s3,
69
+ :s3_credentials => ::S3_CREDENTIALS,
70
+ :path => "videos/:style/:id/thumb_:filename",
71
+ :s3_protocol => 'https',
72
+ :validate_media_type => false
73
+ validates_attachment_content_type :thumb, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif", 'application/octet-stream' ]
74
+
63
75
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.91
4
+ version: 0.0.33.92
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox