testimonials 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ecda947648ca731c693ff54a53100bd3f2636f6df7895ccaa645d1629af3746
4
- data.tar.gz: eacf73190e337c59bf84a3ae03a52ffe38e3df0f4d442178819404dd0b6b4c9f
3
+ metadata.gz: 775e2f3be386fed634ac1dc381b5557e2ab6de931e0ee70bf31d7dedaa7aa1c5
4
+ data.tar.gz: 59115bcc0fcc2b7a882d94acf3bf1052396ef6cffc72c173fbfbc5928bc6f183
5
5
  SHA512:
6
- metadata.gz: c826326840c92f1f424c77b4214ed45f4a5a061daf5b13f4cb389770c65e61fcfe1d2cf5535cb89b9a463e555b2b74496a36fdb61bb365b29ada98398a5d7aae
7
- data.tar.gz: 6ac3a8b5678fd1b50db8e8a972cdac895b065019af3def391cae0dfa230c98219762b1fed7bb684b7b94aee47202d18af0ac97de440e4c7d2b557bc74f015f9c
6
+ metadata.gz: 45d8c4d2c40d674d44a086be802101ba4ff30dde287da19e5f442b4c2f0bd54362221f98fbe2a5d854198778a587537fb2d4536509e4556d0f6d9d5f7ff14f99
7
+ data.tar.gz: 1ffbac4c4bc0cd7714545d365de849a4c6914c7ccfe5ea558dd33e6d1e480f5c268798c0b2249d6bf464636a0cd767d3622bbb487050c3125da9d97cbcbc01cc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ - Reverted 0.2.0's API path change: the read API collection is back at
6
+ `<mount>/api/testimonials` (plain REST — the collection is a noun). The
7
+ bare `<mount>/api` from 0.2.0 read as the API root rather than a
8
+ collection, and was asymmetric with `<mount>/api/stats`. If the
9
+ same-named echo under a `/testimonials` mount bothers you, mount the
10
+ engine at a shorter path (e.g. `/reviews`).
11
+
3
12
  ## 0.2.0
4
13
 
5
14
  - **Breaking (API paths):** the read API's collection moved from
data/README.md CHANGED
@@ -151,7 +151,7 @@ title/company and photo. Disable with `config.public_collection = false`.
151
151
 
152
152
  ## The read API
153
153
 
154
- - `GET /testimonials/api` — approved + consented records only;
154
+ - `GET /testimonials/api/testimonials` — approved + consented records only;
155
155
  filters: `featured=1`, `min_rating=4`, `kind=video`, `limit=12`.
156
156
  - `GET /testimonials/api/stats` — `count`, `average_rating`, `ratings_count`,
157
157
  `nps_score`.
data/config/routes.rb CHANGED
@@ -10,11 +10,12 @@ Testimonials::Engine.routes.draw do
10
10
  resource :nps, only: :create, controller: 'nps'
11
11
  resources :nps_responses, only: :index
12
12
 
13
- # Read-only JSON for rendering testimonials anywhere. The API root *is* the
14
- # collection, so it reads clean under any mount: GET "<mount>/api" for the
15
- # list, "<mount>/api/stats" for the aggregate no "…/api/testimonials" echo.
13
+ # Read-only JSON for rendering testimonials anywhere. Plain REST: the
14
+ # collection is a noun. Under a same-named mount this reads
15
+ # "/testimonials/api/testimonials"; mount the engine at a shorter path
16
+ # (e.g. "/reviews") for "/reviews/api/testimonials".
16
17
  namespace :api do
17
- root to: 'testimonials#index'
18
+ resources :testimonials, only: :index
18
19
  get 'stats', to: 'stats#show'
19
20
  end
20
21
 
@@ -55,7 +55,7 @@ Testimonials.configure do |config|
55
55
  # outside the app. Set false to disable.
56
56
  # config.public_collection = true
57
57
 
58
- # Unauthenticated read access to GET /testimonials/api and
58
+ # Unauthenticated read access to GET /testimonials/api/testimonials and
59
59
  # /testimonials/api/stats (approved + consented records only). Off = admins only.
60
60
  # config.public_api = false
61
61
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Testimonials
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testimonials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Shmarov