miniatura 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10ee09383445b096f1f0ab43ec14f6153fb50719
4
- data.tar.gz: e20783de78db4aa5f0126d21ed6db34230bb96b2
3
+ metadata.gz: e838a42b87bde0a46597ab4952c4eb2146f1d512
4
+ data.tar.gz: 1890d14749ccf087d9de942568c7b009483274d3
5
5
  SHA512:
6
- metadata.gz: 647c5196790ecbb77b117a3df0edcb59e83e5017fd8a9453014be5d209b0eb832f7dbe2add0892eefb4399fbb52ca0db913aa04ab3382904044ae1e2e731563b
7
- data.tar.gz: 62506f02fc5236aa98e554c6657a59d2c18ed3a6a417bf2260a5110a7bc8459c997ba6e2e7029ec30dd08a80801e96e916a8edcd5c6cdc96a7da2ef9be92783c
6
+ metadata.gz: c801a6da3abb157d7a0b901e458e1012a404c07fdfad748a6291615bd9ff0459b01cb427e6a464fadcb093a64e0e3af83def00854e0f901f1db307052ee92dbc
7
+ data.tar.gz: a5f65e3f252ff4cb01cd9eac592aedefe753e7a1b6d8b4f6275f54ee0c18df1f23aef82c60df72591df1c6c33ebe9da998669e73b59fb8cdc391482a4eb340b6
data/README.md CHANGED
@@ -10,11 +10,15 @@ gem 'miniatura'
10
10
 
11
11
  And then execute:
12
12
 
13
+ ```ruby
13
14
  $ bundle
15
+ ```
14
16
 
15
17
  Or install it yourself as:
16
18
 
19
+ ```ruby
17
20
  $ gem install miniatura
21
+ ```
18
22
 
19
23
  # Usage
20
24
 
@@ -1,3 +1,3 @@
1
1
  module Miniatura
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/miniatura.rb CHANGED
@@ -8,10 +8,19 @@ module Miniatura
8
8
  def generate_thumb options = {}
9
9
  options[:file_extension] ||= 'jpeg'
10
10
  options[:logger] = Rails.logger
11
- options[:rotate] = 0
12
11
  size = options[:size]
13
12
  video = MiniExiftool.new(current_path)
14
13
  orientation = video.rotation
14
+ case orientation
15
+ when 0
16
+ options[:rotate] = 0
17
+ when 90
18
+ options[:rotate] = 90
19
+ when 180
20
+ options[:rotate] = 180
21
+ when 270
22
+ options[:rotate] = 270
23
+ end
15
24
  video_width, video_height = video.imagewidth, video.imageheight
16
25
  case orientation
17
26
  when 0,180
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miniatura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssooraj