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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/contentful/asset.rb +2 -0
- data/lib/contentful/version.rb +1 -1
- data/spec/asset_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bfdd216a16dbf4c738ada63a56f404c9dbc143
|
4
|
+
data.tar.gz: f6958dc263c9cb3d6d3bbef9a6f0798f01188278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45b790769efc1e92dfa432ddcf03347e995e420a52020b2f8c6513ff9c83b6acafe60c07f9a22f92d3a88c5152c879e17af6b189fe20b7044c4a4169cc424eaf
|
7
|
+
data.tar.gz: c604bfd5c8b82b38c2bb7e18b11d97fafafdb969f71317ef27b706b8e7ae82ff8164b2d3b8b67cccb9263623259ad190ae33b81eca3f7d7c136584fad6bd9c4c
|
data/CHANGELOG.md
CHANGED
data/lib/contentful/asset.rb
CHANGED
data/lib/contentful/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2016-12-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|