shrine-cloudimage 0.2.0 → 0.3.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 +12 -0
- data/README.md +10 -0
- data/lib/shrine/plugins/cloudimage.rb +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47631c954bd2286f3cbaf52502141bcf48860c87d07fd1dd162b0c33caa73c48
|
|
4
|
+
data.tar.gz: d51da54f1aea08f9d70f1e7f220dce85d0ca7d54d1239161d53ea61e0c937e32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7be4964fb9700c3fc529b2fff6e38124ff9dc7fdb3d0ca3e73f726269781b6337166abf09030e674426c7cdd9669d35166f0393abe0185974aa0bc7bff6eb146
|
|
7
|
+
data.tar.gz: 8e6825463a1a8b5fde9db550a2cab88442d64fd1160b9c36181cf09648f17903523b10b4e296574bccdf16b3b64068964b0ba9897ae7f314fe262db7aed66d93
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.2.0](https://github.com/janklimo/shrine-cloudimage/tree/v0.2.0) (2020-08-02)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/janklimo/shrine-cloudimage/compare/v0.1.1...v0.2.0)
|
|
6
|
+
|
|
7
|
+
**Implemented enhancements:**
|
|
8
|
+
|
|
9
|
+
- Trigger invalidation API when deleting the file [\#4](https://github.com/janklimo/shrine-cloudimage/pull/4) ([janklimo](https://github.com/janklimo))
|
|
10
|
+
|
|
11
|
+
## [v0.1.1](https://github.com/janklimo/shrine-cloudimage/tree/v0.1.1) (2020-07-19)
|
|
12
|
+
|
|
13
|
+
[Full Changelog](https://github.com/janklimo/shrine-cloudimage/compare/v0.1.0...v0.1.1)
|
|
14
|
+
|
|
3
15
|
## [v0.1.0](https://github.com/janklimo/shrine-cloudimage/tree/v0.1.0) (2020-07-12)
|
|
4
16
|
|
|
5
17
|
[Full Changelog](https://github.com/janklimo/shrine-cloudimage/compare/57c0bb934bb097eeb301166b404d1cc94181e396...v0.1.0)
|
data/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Supports Ruby `2.4` and above, `JRuby`, and `TruffleRuby`.
|
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [Configuration](#configuration)
|
|
12
12
|
- [Usage](#usage)
|
|
13
|
+
- [`srcset` generation](#srcset-generation)
|
|
13
14
|
- [Invalidation API](#invalidation-api)
|
|
14
15
|
- [Development](#development)
|
|
15
16
|
- [Contributing](#contributing)
|
|
@@ -72,6 +73,15 @@ uri.w(200).h(400).to_url
|
|
|
72
73
|
# => "https://token.cloudimg.io/v7/assets/image.png?h=400&w=200"
|
|
73
74
|
```
|
|
74
75
|
|
|
76
|
+
### `srcset` generation
|
|
77
|
+
|
|
78
|
+
Generate `srcset` for a `Shrine::UploadedFile` object by calling `#cloudimage_srcset`:
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
photo.image.cloudimage_srcset(blur: 5)
|
|
82
|
+
# => "https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=100 100w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=170 170w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=280 280w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=470 470w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=780 780w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=1300 1300w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=2170 2170w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=3620 3620w, https://token.cloudimg.io/v7/assets/image.jpg?blur=5&w=5760 5760w"
|
|
83
|
+
```
|
|
84
|
+
|
|
75
85
|
### Invalidation API
|
|
76
86
|
|
|
77
87
|
Set `:invalidate` to `true` if you want images to be automatically
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shrine-cloudimage
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Klimo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cloudimage
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.6'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
26
|
+
version: '0.6'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: shrine
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|