contentful 1.1.1 → 1.2.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: 58f25fa3b3309c03b128ee16d9703f4b462c9921
4
- data.tar.gz: 87ee174d7e0a063e1f93818063b993805b878690
3
+ metadata.gz: b4bfdd216a16dbf4c738ada63a56f404c9dbc143
4
+ data.tar.gz: f6958dc263c9cb3d6d3bbef9a6f0798f01188278
5
5
  SHA512:
6
- metadata.gz: b60a5aea8f56ca5cd84e1739cf044abe6f175ccadbba288d9bf89bf0af4ce256d135533e0b552ed102a975b5e4b836cbe001b013f1e952fddc60f394271e3104
7
- data.tar.gz: db7212eb5ce1eafa4ea0fd32f4ad63b5dbf9a697d6913f63963b822f84685c6f8260ee520fa3214301f98e502a9a9964406c65c835b11caa58586b32e93e3fd5
6
+ metadata.gz: 45b790769efc1e92dfa432ddcf03347e995e420a52020b2f8c6513ff9c83b6acafe60c07f9a22f92d3a88c5152c879e17af6b189fe20b7044c4a4169cc424eaf
7
+ data.tar.gz: c604bfd5c8b82b38c2bb7e18b11d97fafafdb969f71317ef27b706b8e7ae82ff8164b2d3b8b67cccb9263623259ad190ae33b81eca3f7d7c136584fad6bd9c4c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.2.0
6
+ ### Added
7
+ * Add alias for `image_url`
8
+
5
9
  ## 1.1.1
6
10
  ### Fixed
7
11
  * Fix Re-Marshalling of already Un-Marshalled objects
@@ -52,5 +52,7 @@ module Contentful
52
52
  "#{file.url}?#{URI.encode_www_form(query)}"
53
53
  end
54
54
  end
55
+
56
+ alias url image_url
55
57
  end
56
58
  end
@@ -1,5 +1,5 @@
1
1
  # Contentful Namespace
2
2
  module Contentful
3
3
  # Gem Version
4
- VERSION = '1.1.1'
4
+ VERSION = '1.2.0'
5
5
  end
data/spec/asset_spec.rb CHANGED
@@ -60,6 +60,18 @@ describe Contentful::Asset do
60
60
  end
61
61
  end
62
62
 
63
+ describe '#url' do
64
+ it 'returns #url of #file without parameter' do
65
+ expect(asset.url).to eq asset.file.url
66
+ end
67
+
68
+ it 'adds image options if given' do
69
+ url = asset.url(width: 100, format: 'jpg', quality: 50, focus: 'top_right', fit: 'thumb', fl: 'progressive')
70
+ expect(url).to include asset.file.url
71
+ expect(url).to include '?w=100&fm=jpg&q=50&f=top_right&fit=thumb&fl=progressive'
72
+ end
73
+ end
74
+
63
75
  it 'can be marshalled' do
64
76
  marshalled = Marshal.dump(asset)
65
77
  unmarshalled = Marshal.load(marshalled)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentful
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH (Jan Lelis)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-16 00:00:00.000000000 Z
13
+ date: 2016-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http