harmony-service 0.8.0 → 0.8.1

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: 6a5d18cbba5a6c46443f0c5691b03a16046be653
4
- data.tar.gz: bb9934e720275bcfe9112ff625b8639b58a20cf5
3
+ metadata.gz: 8dd914b5f56ece32ed924258234b7658b2e234f7
4
+ data.tar.gz: d9918fab7ecceb3911f392b900fa8f5ab0b31efa
5
5
  SHA512:
6
- metadata.gz: 04e84c885b5deabc6e47512f39a345f0c78f6a4539d304e05017c7b23596fbd95304b40454fe0427822cb470cdf17e4c2ff58d3b19d9773225554c5b75f66904
7
- data.tar.gz: 004e0d1c88a360f74a399e6cb64366d66505efb95d9046d695ac0dea9f7965badd4b53db0f8ae8a8c0258f4fcf4b0b97feb29cfff1a2064a8b13d4595bfc26f5
6
+ metadata.gz: 478d87848d404c4ed15053f9e5c8fed47850aa58f597938a995ceb31f6a27c9529614bfff4270dcd73fb51dfa5f280d4b47c489182ecea263119b2199f7560e1
7
+ data.tar.gz: 39ee287ebd016abeab90f601ea8dd8f0ea31ed075f009059d012b9b2fea9b3b1d96f1eba086740ade04de87566207303e6d5a3ed503762d3616ca11dfe7c7263
@@ -1,11 +1,11 @@
1
1
  require 'mini_magick'
2
2
 
3
3
  class Harmony::Service::Utils::Image
4
- def resize(uri, max_file_size)
4
+ def resize(uri, max_file_size, format: 'jpeg')
5
5
  output_filepath = "/tmp/output.#{DateTime.now.strftime('%Q')}.png"
6
6
  image = MiniMagick::Image.open(uri)
7
7
  image.define "extent=#{max_file_size}"
8
- image.format 'jpeg'
8
+ image.format format
9
9
  image.write output_filepath
10
10
  File.new(output_filepath)
11
11
  end
@@ -1,6 +1,6 @@
1
1
  module Harmony
2
2
  module Service
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
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.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith