harmony-service 0.8.1 → 0.8.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
  SHA1:
3
- metadata.gz: 8dd914b5f56ece32ed924258234b7658b2e234f7
4
- data.tar.gz: d9918fab7ecceb3911f392b900fa8f5ab0b31efa
3
+ metadata.gz: aba5c53c4673f9638edc1eb0fa68bfd046c1f021
4
+ data.tar.gz: d3b3fbb0e25cfa08396d65932c5bbd531e515d0f
5
5
  SHA512:
6
- metadata.gz: 478d87848d404c4ed15053f9e5c8fed47850aa58f597938a995ceb31f6a27c9529614bfff4270dcd73fb51dfa5f280d4b47c489182ecea263119b2199f7560e1
7
- data.tar.gz: 39ee287ebd016abeab90f601ea8dd8f0ea31ed075f009059d012b9b2fea9b3b1d96f1eba086740ade04de87566207303e6d5a3ed503762d3616ca11dfe7c7263
6
+ metadata.gz: 76afd9f194a4dc0a6b2cf48d3ff79fe0588f84682f26da535224dfccee51bf6ed13aae97fd3ff4d4f275a827f06488db094ab65b13b77c1ec7eb3df7f1cdd31f
7
+ data.tar.gz: b5a5cbdc9683aa1a120b5502c88b734c28e35545f33eea55568807774c72247af42cd7094c4fa6bcac102640d4c2143d74a1d20b7149858a5c52d91c3ad4fd39
@@ -1,10 +1,10 @@
1
1
  require 'mini_magick'
2
2
 
3
3
  class Harmony::Service::Utils::Image
4
- def resize(uri, max_file_size, format: 'jpeg')
5
- output_filepath = "/tmp/output.#{DateTime.now.strftime('%Q')}.png"
4
+ def resize(uri, max_width, format: 'jpeg')
5
+ output_filepath = "/tmp/output.#{DateTime.now.strftime('%Q')}.#{format}"
6
6
  image = MiniMagick::Image.open(uri)
7
- image.define "extent=#{max_file_size}"
7
+ image.resize max_width
8
8
  image.format format
9
9
  image.write output_filepath
10
10
  File.new(output_filepath)
@@ -1,6 +1,6 @@
1
1
  module Harmony
2
2
  module Service
3
- VERSION = "0.8.1"
3
+ VERSION = "0.8.2"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harmony-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith