railspress-engine 1.4.0 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 016ea04cb686e726ed2d536ac271b8cd081b03fc2d2ef99e20aaa03fec32b0fc
4
- data.tar.gz: 35d0c4436809958a9e90ede3210beced22614d4604b3583d584f31b5087cbcf7
3
+ metadata.gz: 31c5fcfdceafda233cf359ad98c33f48ea0275bff7f2b03231ec8c677da4b386
4
+ data.tar.gz: 82630b73922aec435c33001b58502c7e269dbfe0a1e11d9f48426efea2790bda
5
5
  SHA512:
6
- metadata.gz: 73e7814bf5b41a45e13b47655284d5634dfe647b5101fdec119e8463273e242083a907e2c3d6c231d433a14a05b7d774fb0fcfa7707b31fc47ac464fbab37e2d
7
- data.tar.gz: e06334ea14b4d859c23d305691a77453c2ea24dd0d891cc15c96b836355717c3f907b12d0e6b0eeeeafdad4b0622637e8ac4fa9336712334407cbde652a0a1c0
6
+ metadata.gz: 842759409eb11ee54e5ff0195461c2e652d73769b853e3f083592ab59d67f79a5cf4612fb92be2ab15a4d0cca59105edcda6c06912bafc30b4c63052261a0269
7
+ data.tar.gz: be4b34483192cd1254c4f7bd58495a4de38ef7a40893ef58b664af2cf8ac20c98f23ab4adf50c87237c590ed8dfddfcd73e1ae4e14a9933ff38202c2eb199468
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <p align="center">
7
7
  <a href="https://rubygems.org/gems/railspress-engine"><img src="https://img.shields.io/gem/v/railspress-engine.svg?style=flat&bump=true" alt="Gem Version"></a>
8
- <img src="https://img.shields.io/badge/Rails-8.1%2B-red.svg?style=flat" alt="Rails 8.1+">
8
+ <img src="https://img.shields.io/badge/Rails-8.1.3.1%2B-red.svg?style=flat" alt="Rails 8.1.3.1+">
9
9
  <img src="https://img.shields.io/badge/Ruby-3.3%2B-red.svg?style=flat" alt="Ruby 3.3+">
10
10
  <a href="https://osaasy.dev/"><img src="https://img.shields.io/badge/License-O'Saasy-blue.svg?style=flat" alt="License"></a>
11
11
  </p>
@@ -78,7 +78,7 @@ Most content doesn't fit neatly into "blog posts." A portfolio piece isn't a pos
78
78
 
79
79
  ## Requirements
80
80
 
81
- - Rails 8.1+
81
+ - Rails 8.1.3.1+
82
82
  - Ruby 3.3+
83
83
  - ActionText
84
84
  - Active Storage
@@ -92,6 +92,29 @@ rails action_text:install
92
92
  rails active_storage:install
93
93
  ```
94
94
 
95
+ ### Image variants
96
+
97
+ RailsPress can generate resized image variants for post header images and image helpers. RailsPress includes a secure version of `image_processing`, but Active Storage still needs a processor gem and its native system library.
98
+
99
+ Choose one processor and add its gem to your application's `Gemfile`:
100
+
101
+ ```ruby
102
+ # Recommended for Rails 8.1.3.1+ applications
103
+ gem "ruby-vips", "~> 2.2", ">= 2.2.1"
104
+
105
+ # Or use ImageMagick instead
106
+ # gem "mini_magick", "~> 5.0"
107
+ ```
108
+
109
+ Install the matching system library in every environment where variants are generated: libvips `8.13+` for `ruby-vips`, or [ImageMagick](https://imagemagick.org/) for `mini_magick`. Rails and ruby-vips cannot safely block untrusted libvips operations on older libvips releases. If your app uses ImageMagick, select it explicitly:
110
+
111
+ ```ruby
112
+ # config/application.rb
113
+ config.active_storage.variant_processor = :mini_magick
114
+ ```
115
+
116
+ Use `:vips` instead if you need to select libvips explicitly. RailsPress header images can be displayed without variants; this setup is required when your application requests resizing or format conversion.
117
+
95
118
  Add to your Gemfile:
96
119
 
97
120
  ```ruby
@@ -7,9 +7,15 @@ Railspress.configure do |config|
7
7
  # Uncomment to enable:
8
8
  # config.enable_authors
9
9
  # config.author_class_name = "User"
10
+ # config.author_scope = :admins
10
11
  # config.current_author_method = :current_user
11
12
  # config.current_author_proc = -> { Current.user }
12
13
 
14
+ # Header images for Posts
15
+ # Uncomment to enable:
16
+ # config.enable_post_images
17
+ # config.enable_focal_points
18
+
13
19
  # === CMS Content Elements (opt-in) ===
14
20
  # Adds content groups, content elements, and the cms_element/cms_value
15
21
  # view helpers for managing structured content on your site.
@@ -15,8 +15,6 @@ module Railspress
15
15
 
16
16
  # Make CMS helper available to host application views (or stub when disabled)
17
17
  initializer "railspress.cms_helper" do
18
- ActiveSupport::Dependencies.require_dependency(root.join("app/helpers/railspress/cms_helper").to_s)
19
-
20
18
  ActiveSupport.on_load(:action_view) do
21
19
  if Railspress.cms_enabled?
22
20
  include Railspress::CmsHelper
@@ -1,3 +1,3 @@
1
1
  module Railspress
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.2"
3
3
  end
data/lib/railspress.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "railspress/version"
2
+ require "railspress/cms_helper"
2
3
  require "railspress/engine"
3
4
  require "railspress/entity"
4
5
  require "lexxy"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railspress-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avi Flombaum
@@ -15,28 +15,48 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '8.1'
18
+ version: 8.1.3.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '8.1'
25
+ version: 8.1.3.1
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: lexxy
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: 0.9.29
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: 0.9.29
40
+ - !ruby/object:Gem::Dependency
41
+ name: image_processing
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 2.0.3
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.0'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.0.3
40
60
  - !ruby/object:Gem::Dependency
41
61
  name: rubyzip
42
62
  requirement: !ruby/object:Gem::Requirement
@@ -187,7 +207,6 @@ files:
187
207
  - app/controllers/railspress/application_controller.rb
188
208
  - app/helpers/railspress/admin_helper.rb
189
209
  - app/helpers/railspress/application_helper.rb
190
- - app/helpers/railspress/cms_helper.rb
191
210
  - app/javascript/railspress/controllers/cms_inline_editor_controller.js
192
211
  - app/javascript/railspress/controllers/content_element_form_controller.js
193
212
  - app/javascript/railspress/controllers/crop_controller.js
@@ -308,15 +327,16 @@ files:
308
327
  - lib/railspress-engine.rb
309
328
  - lib/railspress.rb
310
329
  - lib/railspress/cms.rb
330
+ - lib/railspress/cms_helper.rb
311
331
  - lib/railspress/engine.rb
312
332
  - lib/railspress/entity.rb
313
333
  - lib/railspress/version.rb
314
334
  - lib/tasks/railspress_tasks.rake
315
- homepage: https://github.com/aviflombaum/railspress-engine
335
+ homepage: https://railspress.org
316
336
  licenses:
317
337
  - Nonstandard
318
338
  metadata:
319
- homepage_uri: https://github.com/aviflombaum/railspress-engine
339
+ homepage_uri: https://railspress.org
320
340
  source_code_uri: https://github.com/aviflombaum/railspress-engine
321
341
  changelog_uri: https://github.com/aviflombaum/railspress-engine/blob/main/CHANGELOG.md
322
342
  rubygems_mfa_required: 'true'
File without changes