nohead 0.7.0 → 0.8.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
  SHA256:
3
- metadata.gz: 9b3361c68d640e8b2774b8e797bbf4108e19be21f0019600788d9f45e04457fe
4
- data.tar.gz: d3c200b25b6afd1db440dced441f142da3d38b1731e34780356c373c2bc4b67c
3
+ metadata.gz: aaf4c7fc6c9f1c9783210f08d5d42cd01aa7ae30e3b30f3398c5bc5eb252c960
4
+ data.tar.gz: afd201145f4734efbb695c717b8073c5f100fac11fdec822467dc4345ea7a1de
5
5
  SHA512:
6
- metadata.gz: 409ee914aaf232ce8f7109b4628f260f47f6b83861dceb48aebeaee661873c03f5ebef3ccbbd6e269504febad9325505a3b97a2f42905bb279e81d76aef70f18
7
- data.tar.gz: 87b158ed9116745555538a9ef4297c584050251e69d0bab6101b823e239b3586262f161901f519973b1b07c4f2f2b76dfcd78ac86c55eedb905b208867d96d60
6
+ metadata.gz: ff59ead7b5f84026e63d42fd7751c272b7eff489fad447f0bd397f00d21ab57cb475fd989c0bca218efdcc5abcfdf44e681a91a2a0c0c61252b508d08a6e09c4
7
+ data.tar.gz: 21afb854940c2fdda4181b0c8a03e9accd46127e16fe2f7455f17f0fb0e6ab1b8f7033ac414cee25917c599d59d832ae6f7e185759f8571b15588ebc5d9a300c
data/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ Changes to the `nohead` gem that you can notice. Versions follow
5
5
  releases; a change that could break your code is a major one. Each release's
6
6
  section is its GitHub release's notes.
7
7
 
8
+ ## 0.8.0
9
+
10
+ - Assets have `file_url`, the file as uploaded, which downloads under its
11
+ filename, and for video and audio `media_url`, which plays it inline (in
12
+ `<video>` and `<audio>`, with range requests). Both are open, never expire
13
+ and are cached on a CDN, like `image_url`.
14
+
15
+ - `assets.download_url` is removed, with the API's
16
+ `GET /v1/assets/{asset_id}/download-url` and its 2-minute links: use the
17
+ asset's `file_url`.
18
+
19
+ - An upload larger than the plan allows (10 MB a file on Free, 100 MB on paid
20
+ plans) is refused with a `Nohead::PlanLimitExceededError` when it starts.
21
+
8
22
  ## 0.7.0
9
23
 
10
24
  - `assets.list(q:, kind:)`: `q` finds assets whose filename or alt text has
data/README.md CHANGED
@@ -299,7 +299,7 @@ The API's resources come back as `Nohead::NoheadObject`s.
299
299
  | `collections.search_index` | `get`, `rebuild` |
300
300
  | `fields` | `list`, `get`, `create`, `update`, `delete`, `restore`, `order`, `reorder`, `remove_alias` |
301
301
  | `migrations` | `create`, `list`, `get`, `cancel` |
302
- | `assets` | `upload`, `create_upload`, `complete`, `list`, `get`, `update`, `delete`, `restore`, `purge`, `usage`, `download_url` |
302
+ | `assets` | `upload`, `create_upload`, `complete`, `list`, `get`, `update`, `delete`, `restore`, `purge`, `usage` |
303
303
  | `webhooks` | `list`, `get`, `create`, `update`, `delete`, `restore`, `rotate_secret`, `test`, `unwrap` |
304
304
  | `webhooks.secrets` | `list`, `retire` |
305
305
  | `webhooks.deliveries` | `list`, `get`, `retry` |
@@ -6,7 +6,6 @@ module Nohead
6
6
  OPERATIONS = {
7
7
  "assets_complete" => ["POST", "/v1/assets/{asset_id}/complete"],
8
8
  "assets_delete" => ["DELETE", "/v1/assets/{asset_id}"],
9
- "assets_download_url" => ["GET", "/v1/assets/{asset_id}/download-url"],
10
9
  "assets_get" => ["GET", "/v1/assets/{asset_id}"],
11
10
  "assets_list" => ["GET", "/v1/projects/{project_id}/assets"],
12
11
  "assets_purge" => ["POST", "/v1/assets/{asset_id}/purge"],
@@ -106,11 +106,6 @@ module Nohead
106
106
  @client.request("assets_usage", path: { asset_id: asset })
107
107
  end
108
108
 
109
- # A link to download the original file (`url`), valid for 2 minutes.
110
- def download_url(asset)
111
- @client.request("assets_download_url", path: { asset_id: asset })
112
- end
113
-
114
109
  private
115
110
 
116
111
  # One value as it is, several as `[in]`; an empty list (like an asset
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nohead
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nohead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nohead