open_blog 0.3.0 → 0.3.1

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: 0473f44b17fe66c2fc03de0c142fa17bf8b139047b6b8ba1d5d9aff5bfe41a93
4
- data.tar.gz: 5108c7a099c89c3353499bb2f719bc2e8fa67c9530cf34544e1fc0df11f79deb
3
+ metadata.gz: b459982562034f6c145885f4c39b5ffd0cb63996db547ea08488f5241c375988
4
+ data.tar.gz: 9f0789d850d11c478515e1aeff095d67f38aa9f542a10a75ba665b01b95ffe90
5
5
  SHA512:
6
- metadata.gz: 21a997d93ee9f729af3ec4f14ebb287aca527d59cfa4f425c520156a19da7564f3f3c98c9680875f01afadfccf60fb1efc503a2a305f4274fab1cc75de06b11d
7
- data.tar.gz: 31dbb1ca9b278348d3cc1405980db89649024b69788bc1983827dca9d8a998570389f96725be45edd83e7f92578cd7bdb2c0cdf2f20230737c2ba570d204ad2a
6
+ metadata.gz: d53e1b586546d3bd2d18171a55bb0b54057c9fbefcf032a747d3b03783d203d7b7ef8a451df501782689bb6300c08cf4ff59314a67910ad3a8e5dafccfd3c971
7
+ data.tar.gz: 610fca80876669198f1a1aee537943834572d1f22992f3c50b86267b00d27c1af0a077b4d1fbb033e0be399390cdb49eea78bba037437fd1c3b38dbb06299d63
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.1] - 2026-10-28
11
+
12
+ ### Changed
13
+
14
+ - Allow JSON 3. The JSON requirement is now `>= 2.3, < 4`. Rails 8.1 hosts can use JSON 2 or 3.
15
+ - On Rails 8.0 with JSON 3, Open Blog refuses to load with an `OpenBlog::ConfigurationError` that names the fix. Rails 8.0 passes `quirks_mode`, which JSON 3 rejects, so that pair does not work even without Open Blog.
16
+
17
+ ### Upgrade notes
18
+
19
+ - On Rails 8.0, add `gem "json", "< 3"` to the Gemfile before `bundle update open_blog`, or upgrade to Rails 8.1. A new Rails 8.0 application installs JSON 3, so run `bundle add json --version "< 3"` before `bundle add open_blog`.
20
+
10
21
  ## [0.3.0] - 2026-10-20
11
22
 
12
23
  ### Added
data/README.md CHANGED
@@ -61,6 +61,8 @@ bundle add open_blog
61
61
  bin/rails generate open_blog:install
62
62
  ```
63
63
 
64
+ On Rails 8.0, run `bundle add json --version "< 3"` first. Rails 8.0 does not work with JSON 3, and Open Blog refuses to load on that pair.
65
+
64
66
  To run the latest unreleased source instead, use `bundle add open_blog --github techwright-lab/open-blog`.
65
67
 
66
68
  Start `bin/dev` (or `bin/rails server`) and open `/blog`. The generator installs tables, mounts the engine at `/blog`, copies the reader views and browser controllers, writes `config/initializers/open_blog.rb`, and publishes a sample article. If it prints an API token, save it: the secret is shown once.
@@ -1,3 +1,3 @@
1
1
  module OpenBlog
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/open_blog.rb CHANGED
@@ -87,7 +87,16 @@ module OpenBlog
87
87
  end
88
88
  route ? route.path.spec.to_s : config.mount_path
89
89
  end
90
+
91
+ def require_supported_json!(rails: Rails.gem_version, json: Gem::Version.new(JSON::VERSION))
92
+ return if json < Gem::Version.new("3") || rails.release >= Gem::Version.new("8.1")
93
+
94
+ raise ConfigurationError, "JSON #{json} needs Rails 8.1 or later: Rails #{rails} passes quirks_mode, " \
95
+ 'which JSON 3 rejects. Add gem "json", "< 3" to the Gemfile or upgrade Rails.'
96
+ end
90
97
  end
91
98
  end
92
99
 
100
+ OpenBlog.require_supported_json!
101
+
93
102
  require_relative "open_blog/engine"
@@ -19,7 +19,7 @@ For examples and explanations, read [host integration](https://techwright-lab.gi
19
19
 
20
20
  ## Install and configure
21
21
 
22
- Add a missing gem with `bundle add open_blog`, passing the requested version constraint when specified. For a fresh application, use `bin/rails generate open_blog:install`. For an existing application retaining its CSS pipeline, use `--skip-tailwind`. A staged local pilot can use:
22
+ Add a missing gem with `bundle add open_blog`, passing the requested version constraint when specified. On Rails 8.0, first run `bundle add json --version "< 3"`; Open Blog refuses to load on Rails 8.0 with JSON 3. For a fresh application, use `bin/rails generate open_blog:install`. For an existing application retaining its CSS pipeline, use `--skip-tailwind`. A staged local pilot can use:
23
23
 
24
24
  ```sh
25
25
  bin/rails generate open_blog:install --theme=signal --skip-tailwind --skip-migrate --skip-sample
@@ -47,7 +47,7 @@ The controller stores `open-blog-theme` and sets `data-theme="light"` or `"dark"
47
47
 
48
48
  ## Upgrade copied files deliberately
49
49
 
50
- Read the target changelog, update any version constraint, then `bundle update open_blog --conservative`; review dependency changes too (Open Blog constrains JSON below 3). Bundler does not refresh copied host files.
50
+ Read the target changelog, update any version constraint, then `bundle update open_blog --conservative`; review dependency changes too (on Rails 8.0, keep JSON below 3; Rails 8.1 can use JSON 3). Bundler does not refresh copied host files.
51
51
 
52
52
  `bin/rails generate open_blog:views` refreshes reader templates and `layouts/open_blog.html.erb` only. Compare controllers, locales, and theme sources with the installed package separately. Conflicting files are kept in a noninteractive rerun; a successful generator exit does not mean all copies are current. Merge required changes and use replacement only for reviewed files. A blanket `open_blog:install --force` also replaces the initializer. Review a host-owned layout against new helper/asset contracts manually. When moving from 0.1.0 to presets, replace old full-palette definitions with intentional overrides so they do not mask the new preset. Rebuild affected assets and restart.
53
53
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TechWright Labs
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-10-21 00:00:00.000000000 Z
10
+ date: 2026-10-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: json
@@ -18,7 +18,7 @@ dependencies:
18
18
  version: '2.3'
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '3'
21
+ version: '4'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -28,7 +28,7 @@ dependencies:
28
28
  version: '2.3'
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '3'
31
+ version: '4'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: rails
34
34
  requirement: !ruby/object:Gem::Requirement