alchemy-json_api 0.25.0 → 0.26.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
  SHA256:
3
- metadata.gz: b099850c244a74a544ab7d649f40faee72d021abee257d55ae9061e55c594dfd
4
- data.tar.gz: '029e828a551ab68cdc8d1e48d26135ddc43bda3c3aca7565012ed55e40b1f1f8'
3
+ metadata.gz: 71119435a938c25b6cf78cbeb274ff09adcf720054bb6ed4feff493dd75046f5
4
+ data.tar.gz: ceca5e80fb346ff9b6a0a72c977bb2bae09183c76ee4892a8aa0ed3953086aec
5
5
  SHA512:
6
- metadata.gz: d9f1c8b7b5e8996ea8edc83d30aecb780d5ff782530f09e8aaf43fc2a38b01e34867e79fc52bac2ecb4be6e5cc5b6ce6cbd2b478fa1d294574d56ebebfe4cd2c
7
- data.tar.gz: 4f7efea149006aad79e341939bfa946fa5e87939315eefdfff8ef22f3e4d83b4f9b9a480b4ba058497b1a8f85c3729a2453fd956dff9570debbe384ccfb846cb
6
+ metadata.gz: 314bf831796cf8261d1bcbce0ad8fdc65e055946ee05e84006f5f3ca3204ca29b87501eaaf790c10bd7e0039ee435f2078c6d1762390c84a41326e8443b64d40
7
+ data.tar.gz: afb5358fb2252f8accf35bc0b36e893d527ec6615b5a57313deaeecf5918d393ed791fc776b4e8632082c052728c072c1c5033213a20d3fea123c7711ed65abe
@@ -39,9 +39,11 @@ module Alchemy
39
39
  when Hash
40
40
  url = essence.picture_url(src)
41
41
  size = src[:size]
42
+ type = Mime::Type.lookup_by_extension(src[:format] || essence.picture.default_render_format)
42
43
  else
43
44
  url = essence.picture_url(size: src)
44
45
  size = src
46
+ type = Mime::Type.lookup_by_extension(essence.picture.default_render_format)
45
47
  end
46
48
  width, height = size.split("x", 2)
47
49
 
@@ -50,6 +52,7 @@ module Alchemy
50
52
  desc: "#{width}w",
51
53
  width: width,
52
54
  height: height,
55
+ type: type.to_s,
53
56
  }
54
57
  end
55
58
  end
@@ -45,9 +45,11 @@ module Alchemy
45
45
  when Hash
46
46
  url = ingredient.picture_url(src)
47
47
  size = src[:size]
48
+ type = Mime::Type.lookup_by_extension(src[:format] || ingredient.picture.default_render_format)
48
49
  else
49
50
  url = ingredient.picture_url(size: src)
50
51
  size = src
52
+ type = Mime::Type.lookup_by_extension(ingredient.picture.default_render_format)
51
53
  end
52
54
  width, height = size.split("x", 2)
53
55
 
@@ -56,6 +58,7 @@ module Alchemy
56
58
  desc: "#{width}w",
57
59
  width: width,
58
60
  height: height,
61
+ type: type.to_s,
59
62
  }
60
63
  end
61
64
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Alchemy
3
3
  module JsonApi
4
- VERSION = "0.25.0"
4
+ VERSION = "0.26.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-15 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms