vehicles 0.9.0 → 0.9.2
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 +57 -7
- data/README.md +353 -69
- data/data/PROVENANCE-vehicles.md +2 -2
- data/data/plates/PROVENANCE.md +2 -2
- data/data/plates/_decode/at-districts.yml +2 -2
- data/data/plates/_decode/cn-issuing-offices.yml +2 -2
- data/data/plates/_decode/cn-provinces.yml +2 -2
- data/data/plates/_decode/cz-kraj.yml +1 -1
- data/data/plates/_decode/dk-serial-blocks.yml +1 -1
- data/data/plates/_decode/es-provinces.yml +1 -1
- data/data/plates/_decode/fr-departements.yml +2 -2
- data/data/plates/_decode/gb-age-identifiers.yml +1 -1
- data/data/plates/_decode/gb-memory-tags.yml +1 -1
- data/data/plates/_decode/gr-prefectures.yml +1 -1
- data/data/plates/_decode/hr-cities.yml +3 -3
- data/data/plates/_decode/ie-counties.yml +3 -3
- data/data/plates/_decode/in-state-codes.yml +2 -2
- data/data/plates/_decode/it-provinces.yml +3 -3
- data/data/plates/_decode/jp-office-marks.yml +2 -2
- data/data/plates/_decode/jp-use-marks.yml +2 -2
- data/data/plates/_decode/kr-authority-marks.yml +1 -1
- data/data/plates/_decode/mx-entity-series.yml +1 -1
- data/data/plates/_decode/my-index-marks.yml +4 -4
- data/data/plates/_decode/pt-trailer-services.yml +1 -1
- data/data/plates/_decode/ro-counties.yml +1 -1
- data/data/plates/_decode/se-diplomatic.yml +1 -1
- data/data/plates/_decode/si-regions.yml +1 -1
- data/data/plates/_decode/ua-regions.yml +1 -1
- data/data/plates/_meta/classes.yml +1 -1
- data/data/plates/_meta/separators.yml +1 -1
- data/data/plates/ad.yml +555 -52
- data/data/plates/ar.yml +8 -8
- data/data/plates/at.yml +91 -10
- data/data/plates/au-act.yml +13 -13
- data/data/plates/au-nsw.yml +9 -9
- data/data/plates/au-nt.yml +13 -14
- data/data/plates/au-qld.yml +7 -7
- data/data/plates/au-sa.yml +7 -7
- data/data/plates/au-tas.yml +10 -10
- data/data/plates/au-vic.yml +6 -6
- data/data/plates/au-wa.yml +8 -8
- data/data/plates/be.yml +11 -11
- data/data/plates/br.yml +14 -14
- data/data/plates/ca-ab.yml +10 -10
- data/data/plates/ca-bc.yml +6 -6
- data/data/plates/ca-mb.yml +4 -4
- data/data/plates/ca-nb.yml +9 -9
- data/data/plates/ca-nl.yml +11 -11
- data/data/plates/ca-ns.yml +12 -12
- data/data/plates/ca-nt.yml +7 -7
- data/data/plates/ca-nu.yml +7 -7
- data/data/plates/ca-on.yml +21 -21
- data/data/plates/ca-pe.yml +13 -13
- data/data/plates/ca-qc.yml +11 -11
- data/data/plates/ca-sk.yml +6 -6
- data/data/plates/ca-yt.yml +6 -6
- data/data/plates/ch.yml +14 -14
- data/data/plates/cn.yml +9 -9
- data/data/plates/cy.yml +6 -6
- data/data/plates/cz.yml +9 -9
- data/data/plates/de.yml +8 -8
- data/data/plates/dk.yml +12 -12
- data/data/plates/ee.yml +13 -13
- data/data/plates/eg.yml +708 -0
- data/data/plates/es.yml +8 -8
- data/data/plates/fi.yml +14 -14
- data/data/plates/fr.yml +12 -12
- data/data/plates/gb.yml +16 -16
- data/data/plates/gr.yml +14 -14
- data/data/plates/hr.yml +15 -15
- data/data/plates/hu.yml +16 -16
- data/data/plates/ie.yml +7 -7
- data/data/plates/in.yml +7 -7
- data/data/plates/is.yml +3 -3
- data/data/plates/it.yml +21 -21
- data/data/plates/jp.yml +121 -121
- data/data/plates/kr.yml +6 -6
- data/data/plates/li.yml +6 -6
- data/data/plates/lt.yml +10 -10
- data/data/plates/lu.yml +4 -4
- data/data/plates/lv.yml +9 -9
- data/data/plates/mc.yml +4 -4
- data/data/plates/mt.yml +5 -5
- data/data/plates/mx.yml +7 -7
- data/data/plates/my.yml +18 -18
- data/data/plates/ng.yml +346 -0
- data/data/plates/nl.yml +5 -5
- data/data/plates/no.yml +7 -7
- data/data/plates/nz.yml +18 -18
- data/data/plates/pl.yml +4 -4
- data/data/plates/pt.yml +13 -5
- data/data/plates/ro.yml +14 -14
- data/data/plates/se.yml +13 -13
- data/data/plates/si.yml +8 -8
- data/data/plates/sk.yml +15 -15
- data/data/plates/sm.yml +7 -7
- data/data/plates/th.yml +10 -10
- data/data/plates/tr.yml +432 -0
- data/data/plates/ua.yml +9 -9
- data/data/plates/us-ak.yml +11 -11
- data/data/plates/us-al.yml +12 -12
- data/data/plates/us-ar.yml +15 -15
- data/data/plates/us-as.yml +10 -10
- data/data/plates/us-az.yml +10 -10
- data/data/plates/us-ca.yml +13 -13
- data/data/plates/us-co.yml +14 -14
- data/data/plates/us-ct.yml +24 -24
- data/data/plates/us-dc.yml +7 -7
- data/data/plates/us-de.yml +10 -10
- data/data/plates/us-fl.yml +17 -17
- data/data/plates/us-ga.yml +10 -10
- data/data/plates/us-gu.yml +11 -11
- data/data/plates/us-hi.yml +11 -11
- data/data/plates/us-ia.yml +9 -9
- data/data/plates/us-id.yml +13 -13
- data/data/plates/us-il.yml +11 -11
- data/data/plates/us-in.yml +9 -9
- data/data/plates/us-ks.yml +8 -8
- data/data/plates/us-ky.yml +11 -11
- data/data/plates/us-la.yml +11 -11
- data/data/plates/us-ma.yml +10 -10
- data/data/plates/us-md.yml +7 -7
- data/data/plates/us-me.yml +16 -16
- data/data/plates/us-mi.yml +8 -8
- data/data/plates/us-mn.yml +13 -13
- data/data/plates/us-mo.yml +13 -13
- data/data/plates/us-mp.yml +12 -12
- data/data/plates/us-ms.yml +8 -8
- data/data/plates/us-mt.yml +12 -12
- data/data/plates/us-nc.yml +12 -12
- data/data/plates/us-nd.yml +10 -10
- data/data/plates/us-ne.yml +10 -10
- data/data/plates/us-nh.yml +8 -8
- data/data/plates/us-nj.yml +8 -8
- data/data/plates/us-nm.yml +14 -14
- data/data/plates/us-nv.yml +18 -18
- data/data/plates/us-ny.yml +17 -17
- data/data/plates/us-oh.yml +13 -13
- data/data/plates/us-ok.yml +12 -12
- data/data/plates/us-or.yml +15 -15
- data/data/plates/us-pa.yml +14 -14
- data/data/plates/us-pr.yml +15 -15
- data/data/plates/us-ri.yml +10 -10
- data/data/plates/us-sc.yml +7 -7
- data/data/plates/us-sd.yml +12 -12
- data/data/plates/us-tn.yml +8 -8
- data/data/plates/us-tx.yml +17 -17
- data/data/plates/us-ut.yml +12 -12
- data/data/plates/us-va.yml +14 -14
- data/data/plates/us-vi.yml +16 -16
- data/data/plates/us-vt.yml +9 -9
- data/data/plates/us-wa.yml +18 -18
- data/data/plates/us-wi.yml +8 -8
- data/data/plates/us-wv.yml +9 -9
- data/data/plates/us-wy.yml +10 -10
- data/data/plates/va.yml +7 -7
- data/data/plates/za.yml +11 -11
- data/data/vehicles.json +121081 -62015
- data/lib/generators/vehicles/templates/initializer.rb +21 -12
- data/lib/generators/vehicles/templates/vehicles_refresh_job.rb +8 -4
- data/lib/vehicles/color.rb +8 -1
- data/lib/vehicles/colors.rb +14 -10
- data/lib/vehicles/configuration.rb +82 -3
- data/lib/vehicles/data_source.rb +220 -0
- data/lib/vehicles/dataset.rb +38 -6
- data/lib/vehicles/dataset_resolution.rb +39 -3
- data/lib/vehicles/dataset_slice.rb +90 -0
- data/lib/vehicles/hosted_result.rb +94 -0
- data/lib/vehicles/http.rb +75 -7
- data/lib/vehicles/id_lookup.rb +37 -0
- data/lib/vehicles/kind_rule.rb +63 -0
- data/lib/vehicles/labels.rb +131 -0
- data/lib/vehicles/make.rb +45 -19
- data/lib/vehicles/model.rb +66 -19
- data/lib/vehicles/model_match.rb +16 -2
- data/lib/vehicles/model_matcher.rb +6 -7
- data/lib/vehicles/plates/series.rb +87 -8
- data/lib/vehicles/plates/template_fill.rb +2 -2
- data/lib/vehicles/plates/templates.rb +9 -5
- data/lib/vehicles/plates.rb +54 -8
- data/lib/vehicles/providers/hosted_provider.rb +145 -32
- data/lib/vehicles/providers/local_provider.rb +2 -2
- data/lib/vehicles/refresh_result.rb +74 -0
- data/lib/vehicles/refresher.rb +190 -54
- data/lib/vehicles/release_checks.rb +72 -0
- data/lib/vehicles/text_matcher.rb +19 -10
- data/lib/vehicles/validators/vehicle_make_validator.rb +18 -1
- data/lib/vehicles/validators/vehicle_model_validator.rb +17 -1
- data/lib/vehicles/version.rb +1 -1
- data/lib/vehicles.rb +119 -67
- data/rakelib/data_refresh.rake +1 -1
- data/rakelib/plates_refresh.rake +1 -1
- data/sig/vehicles.rbs +67 -13
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa213b02a603746bbd7c6bfca44ca4dd68b4d22a24d82fdf2a4e4742447f0d70
|
|
4
|
+
data.tar.gz: b1cf8cddd58344ec2bc8bc780619103f4b4f0374f34472595a48531247022d8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c02046f4ca89a6abbcdb7666db048bd28650960e28d4f41c277d0dba9efd4ef1489abf2534e80fb7d7be21b3451d824cc5150cc1c77145b47b26b9b4b36aecab
|
|
7
|
+
data.tar.gz: 0c9bebfcb0fe391fdb1119a071aa019495283ca056be8a4ad94632d88a407b5318cb5289de6d2126b672ca3bf2c461f47fe466e6a81b9a5ecef97aa67a07d0e2
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.2] - 2026-11-10
|
|
11
|
+
|
|
12
|
+
Everything below the plates fixes comes from dogfooding the gem in a production Rails app (CarHey) and making each workaround it had to write a general feature.
|
|
13
|
+
|
|
14
|
+
### Upgrade notes
|
|
15
|
+
- **Car-only apps: pass `kind: :car` (or `kinds: [:car]`) when you canonicalize.** Without a kind the collision rule now answers the most-registered kind, so `match_model("Volkswagen", "Caddy")` is `van/volkswagen/caddy` (Berlingo, Transit, Hilux… likewise). Stored ids are unaffected; only what an unhinted string means changes. CarHey: `Vehicle.canonical_identity` must call `Vehicles.match_model(make, model, kind: :car)`.
|
|
16
|
+
- `refresh!` now refuses releases it used to accept; check `Vehicles.refresh.reason` if your data stops moving.
|
|
17
|
+
- `Model#==` compares ids: code that relied on a car and a van "being equal" (Set/uniq/hash keys) now keeps both.
|
|
18
|
+
|
|
19
|
+
### Changed (behaviour)
|
|
20
|
+
- **One kind-collision rule, shared by every VehiclesDB surface** (`Vehicles::KindRule`; vehiclesdb RESOLUTION.md §3). When one nameplate is several records (Iveco "Daily" is a van, a truck and a bus) and no kind is given, `Vehicles.model`, `Make#model`, `match_model` and `identify` pick the lowest `mass_decile`, then van → car → bus → truck → moped → motorcycle, then the id. Until 0.9.1 the gem preferred the car (else file order) while the SDKs used another tie-break, so the stored id depended on the door a user came through. Backtested on register counts, the rule picks the most-registered kind in 87% of collision groups (car-first: 43%). Pass `kind:` to keep a kind.
|
|
21
|
+
- **`Model#==`, `eql?` and `hash` compare the canonical id**, not the composite slug: the car and the van of one nameplate are no longer equal (they used to collapse in sets, `uniq` and hash keys).
|
|
22
|
+
- `Vehicles.refresh!` keeps returning true/false, but now true means "the app has the latest release" (written, or already current), and it refuses releases it used to accept (see Safe refresh).
|
|
23
|
+
- `Model#image(year:)` sends `year` to the API instead of silently dropping it; the API answers `422 unsupported_filter` until year-accurate images ship, so `image(year:)` is nil and `images_result` says why.
|
|
24
|
+
- A refreshed cache older than the gem's bundled data, or in a schema the gem does not read, is no longer served.
|
|
25
|
+
- `Model#to_h` gains `id`, `model_slug`, `forms`, `registration_years`; `ModelMatch#to_h` gains `id` and `confident`.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- **Safe refresh.** `Vehicles.refresh` returns a `Vehicles::RefreshResult` (`status` :updated/:current/:rejected/:failed, `reason`, `version`, `previous_version`, `message`; never raises). It reads the release manifest first (`config.manifest_url`, derived from `data_url`): an unsupported schema or an older version is refused and the same version downloads nothing. The payload is fetched from the announced release (jsDelivr `@latest` pinned to it), must carry that version and schema, match the manifest's per-kind model counts and its sha256 when published, keep every kind and (kind, country) slice at or above `config.refresh_min_ratio` (0.9) of the data in use, and pass the optional `config.refresh_guard`. Written atomically.
|
|
29
|
+
- **Every process adopts a new dataset on its own**: at most every `config.reload_check_interval` seconds (default 5) a call stats the file and reloads when it changed — no restart, no executor hook. A corrupt file never replaces the dataset in memory. `config.cache_dir` (or `VEHICLES_CACHE_DIR`) puts the cache on a shared volume, so one refresh reaches every container. README: "Staying current" has the multi-container recipe.
|
|
30
|
+
- **Canonical ids**: `Model#id` (`"car/volkswagen/golf"`), `Vehicles.by_id(id, follow: true)` (follows `former_ids`; a split id answers nil), `Vehicles.successor(id)` (the id to store now), `Vehicles.live?(id)`. Make `former_slugs` are read when the dataset publishes them (`Make#former_slugs`, `Vehicles.make("old-slug")`, `by_id` across a make rename); a no-op until then.
|
|
31
|
+
- **`kinds:`** on `Vehicles.model`, `match_model`, `identify`, `by_id`, `catalog` and `Make#model`: a hard filter on every rung, ids included (`identify("bus/iveco/daily", kinds: [:car])` → nil). `kind:` keeps scoping the name rungs and never overrides an explicit id.
|
|
32
|
+
- **`ModelMatch#confident?`**: an answer from a curated rung (exact, former_id, fold, alias, form, cleaned), never fuzzy or ambiguous — the recommended threshold for writing a match back without asking.
|
|
33
|
+
- **Per-country catalog**: `country:` on `Vehicles.catalog`, `makes`, `models`, `make_options` and `model_options` (models with official evidence there, in that country's own order). `top_models(limit: nil)` returns every match.
|
|
34
|
+
- **Labels in English and Spanish** (the same strings as the JS/Python SDKs): `Vehicles.colors(locale: :es)`, `Vehicles.color_options(locale: :es)`, `Color#label(:es)`, `Vehicles.kind_label` / `kind_options`, `Vehicles.body_type_label` / `body_type_options`. `Vehicles.color` resolves Spanish input ("Rojo", "marrón", "plateada", "granate"). English labels for `wagon`/`coupe` read "Wagon"/"Coupe".
|
|
35
|
+
- **Hosted errors are no longer silent**: `Model#images_result` returns a `Vehicles::HostedResult` (`reason`, `status`, the API's own `error` code, `url(size)`); `config.on_hosted_error` and a warn log line fire for 401/402/403/429/5xx/timeouts (never for a missing image). Image payloads are cached (`config.image_cache`, in-process by default; `image_cache_ttl` 1 day capped by the payload's `expires_at`, `image_miss_ttl` 10 min for 404s; errors never cached). `exact_color: true` answers nil instead of another color's image and remembers the palette so an unavailable color costs no request. ActiveSupport notifications `request.vehicles` / `refresh.vehicles` when present.
|
|
36
|
+
- **`Vehicles.dataset_slice(kind:, kinds:, country:, region:)`**: the `catalog` scope as records in the shape of the published `dist/vehicles.json` (a Hash, ready for `to_json`): make and model slugs, kinds, aliases, forms, former ids, availability, deciles, country ranks and registration years, plus the release's version and CC-BY attribution. It is what the make-model-dropdown widget's `data` option (0.4.1) and the JS/Python SDKs' dataset mode read, so a page can embed its scope and resolve stored values and canonical ids with no CDN or API request. Lean: no `regions` or `body_type`, and with `country:` the per-country fields keep only that country (Spain's cars on data 2026.11.3: ~360 KB of JSON, ~57 KB gzipped). README: a Rails recipe that embeds it.
|
|
37
|
+
- `Model#registration_years`: `{ first:, last: }` — the first and last year in official registrations, when the dataset publishes it (dataset 2026.11.3 publishes it for ~9,900 of 16,032 records). A hint, never a validation bound; `Model#years` docs now say plainly that production years are not published yet.
|
|
38
|
+
- Plates: `Match#reason` (`:ok`, `:unverifiable`, `:excluded_letters`, `:bad_shape`, `:empty`, `:unknown_jurisdiction` — the API's codes), `Match#excluded_letters`, `Match#passenger?` and `Series#passenger?` (issued to passenger-carrying vehicles; trailer and tractor series are not).
|
|
39
|
+
- Validators take `kind:`, `kinds:` and `country:` (`vehicle_make: { kind: :car, country: :es }`).
|
|
40
|
+
- `Plates::Match#near_misses`: the series whose shape a plate has but whose issuing alphabet it breaks ("1234 ABC" → `es-national-2000`: Spain issues no vowels, Ñ or Q). Empty whenever the plate hits a strict series. Lets a form explain the rejection. `Series#matching` and `Series#recall_lenient_regexp` back it, and `Series#letters` (the issued letter set, when the dataset enumerates one) tells a form whether the alphabet is what failed.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
- The hosted client follows a former id's `301` (same origin only, so the key never leaves the host): images no longer vanish around a rename or a gem/API version skew.
|
|
44
|
+
- `Vehicles.regions` follows the dataset in effect (it was memoized once per process).
|
|
45
|
+
- Docs: the "car catalog is tens of KB" claim (it is ~63 KB worldwide, ~14 KB for one country), `Model::KINDS` ("all :car"), and the initializer's "EU market" text.
|
|
46
|
+
- **`Plates::Series#strict?` now reads the dataset's `matching:` key** (the plates spec §2.7, normative) instead of inferring strictness from a `regex_strict` twin being present. The spec forbids that inference: most strict series need no twin because their `regex` already is the issuing grammar. 668 strict series were answering `strict? == false` before, among them Portugal's whole national range (AA-00-AA) and the Spanish CD/CC/OI/TA, military and police series. `Match#strict?` follows. Found by dogfooding: 2 of CarHey's 3 Portuguese cars validated as "recall-only".
|
|
47
|
+
- `Match#formatted` / `Series#format_serial` no longer invent a split when the series' regex can split a serial more than one way (`Series#ambiguous_split?`): "CD12345" and "CD123456" come back as stored instead of "CD-1234-5" / the representative "CD-123-456". This runs before the display-pattern walk; 22 series with variable-width groups (ES diplomatic, personalised and special-index plates) are affected.
|
|
48
|
+
- `Plates.template_series` (what `Plates.render` draws) prefers strict hits over recall-only ones: a Spanish "CD-123-456" is drawn as the diplomatic series, not as the 1900–1971 numeric catch-all it also fits.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
- Bundled data refreshed to VehiclesDB v2026.11.6 (16,327 models) and its conformance file from vehiclesdb main (with the vehiclesdb#397 kind-collision cases and the corrected E-Klasse case). Since 2026.11.3 the dataset is the first release to publish make `former_slugs` (`Vehicles.make("renault-alpine")` is Alpine, `by_id("car/renault-alpine/a110")` follows it), model `registration_years` and per-file `sha256`/`bytes` in the manifest's `dist_files`, which `Vehicles.refresh` now verifies on real releases. The gem's readers already used the shipped names.
|
|
52
|
+
- v2026.11.2, bundled earlier in this cycle, restyled names such as "León", "XCeed", "ProCeed".
|
|
53
|
+
- Bundled plates corpus refreshed to vehiclesdb `db0ec0a`: adds Egypt, Nigeria and Türkiye (127 jurisdictions, 1,409 series) and the Andorra and Austria verification corrections.
|
|
54
|
+
|
|
55
|
+
## [0.9.1] - 2026-11-09
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- Bundled data refreshed to VehiclesDB v2026.11.1: 15,635 models. Passenger versions of van-based MPVs now also publish in kind `car` (Caddy, Berlingo, Kangoo, Rifter, Tourneo Custom/Courier/Connect, Transit Custom, Doblò and more), plus the VW Multivan, GWM Ora 5, Ebro S800/S900, the Alfa Romeo 6C/8C classics and 24 typo-twin folds. Every retired id resolves through `former_ids`. Spanish new-car registrations landing on a published record go from 90.2% to 96.5%.
|
|
59
|
+
|
|
10
60
|
## [0.9.0] - 2026-11-09
|
|
11
61
|
|
|
12
62
|
### Changed
|
|
@@ -118,7 +168,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
118
168
|
template per window, not one per call. Keys carry the template schema and
|
|
119
169
|
gem version.
|
|
120
170
|
- `Vehicles::Plates::TemplateFill`: the reference filler, moved verbatim from
|
|
121
|
-
|
|
171
|
+
the VehiclesDB web app (`fill`, `metadata`, `groups`, and the shared fit formulas
|
|
122
172
|
`fit_size` / `recentered_baseline` the VehiclesDB renderer will call from
|
|
123
173
|
here), plus `shape_of` and a `label:` option for a localized accessible
|
|
124
174
|
name. Standard library only; the file loads on its own in a gem-less Ruby.
|
|
@@ -264,7 +314,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
264
314
|
|
|
265
315
|
### Changed
|
|
266
316
|
|
|
267
|
-
- Plates dataset refreshed — the overnight
|
|
317
|
+
- Plates dataset refreshed — the overnight verification passes' settlements
|
|
268
318
|
land: the Cypriot centre date mark, Brazil's square-dot printed form
|
|
269
319
|
and photographed moto split, San Marino's structured legend/sigla
|
|
270
320
|
fields, Ukraine's statutory line counts, California's pixel-sampled
|
|
@@ -381,7 +431,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
381
431
|
|
|
382
432
|
## [0.6.0] - 2026-07-27
|
|
383
433
|
|
|
384
|
-
License plates become a first-class citizen: the
|
|
434
|
+
License plates become a first-class citizen: the VehiclesDB registration-mark
|
|
385
435
|
dataset ships in the gem, bundled and offline like everything else.
|
|
386
436
|
|
|
387
437
|
### Added
|
|
@@ -401,20 +451,20 @@ The hosted images API is **live** — this release points the wired-up provider
|
|
|
401
451
|
seam at the real thing.
|
|
402
452
|
|
|
403
453
|
### Added
|
|
404
|
-
- `Model#image(color:, size:)` returns
|
|
454
|
+
- `Model#image(color:, size:)` returns an image variant URL from the live
|
|
405
455
|
VehiclesDB images API (`:sm` 320×180, `:md` 640×360, `:lg` 1280×720, webp).
|
|
406
456
|
Mint a key at <https://vehiclesdb.com/settings/api-keys> and set
|
|
407
457
|
`config.api_key`; without a key it stays nil, as always.
|
|
408
458
|
- `Model#images(color:)` returns the full payload: every variant with
|
|
409
|
-
dimensions, the
|
|
410
|
-
(
|
|
459
|
+
dimensions, the available palette for the model, served-vs-requested color
|
|
460
|
+
(unavailable colors fall back honestly instead of 404ing), provenance.
|
|
411
461
|
|
|
412
462
|
### Changed
|
|
413
463
|
- `config.api_base_url` default is now `https://vehiclesdb.com` (the live API
|
|
414
464
|
origin; endpoint paths carry `/v1`). It must be an ORIGIN — no path suffix.
|
|
415
465
|
- `Model#image` accepts `year:` but does not send it: `year`/`trim` are
|
|
416
466
|
reserved filters server-side (the API 422s on them by contract) until
|
|
417
|
-
year-accurate
|
|
467
|
+
year-accurate images ship.
|
|
418
468
|
|
|
419
469
|
## [0.4.1] - 2026-07-26
|
|
420
470
|
|