format_restricter_rails 2.0.0 → 2.1.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 +4 -4
- data/.github/workflows/check_pull_request.yml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +6 -6
- data/README.md +1 -1
- data/Rakefile +2 -3
- data/bin/console +2 -5
- data/format_restricter_rails.gemspec +1 -1
- data/lib/format_restricter_rails/includes.rb +1 -1
- data/lib/format_restricter_rails/version.rb +1 -1
- data/lib/format_restricter_rails.rb +0 -10
- metadata +55 -56
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4a0bb2e2685bcecea7f75e897d0f5e838982b620fffe4e5b0c28ce5b55b87a9d
|
|
4
|
+
data.tar.gz: c0244214b677ae90166659f29bffa9722154923f605bd58931370ee412a5e60b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b3064bf07d600990564b6a681b2887ead1cb649ec3f5d8063d7fd9c86919f06acf32403aa9f38dc440459caace5ad5df9ab597ac9e14e0aaaf9828ac62ca894
|
|
7
|
+
data.tar.gz: 334176f017b763d277a57dbbdc42857e3dec4984d688e96f896a499009e47cbe373ba73e31604daa2c4ed71f657a4cc5aab2d69eca931977c46cb5956269b936
|
|
@@ -13,9 +13,9 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
ruby-version: ['3.
|
|
16
|
+
ruby-version: ['3.3', '3.4', '4.0']
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
19
|
- name: Set up Ruby
|
|
20
20
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
21
21
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
@@ -30,9 +30,9 @@ jobs:
|
|
|
30
30
|
runs-on: ubuntu-latest
|
|
31
31
|
strategy:
|
|
32
32
|
matrix:
|
|
33
|
-
ruby-version: ['3.
|
|
33
|
+
ruby-version: ['3.3', '3.4', '4.0']
|
|
34
34
|
steps:
|
|
35
|
-
- uses: actions/checkout@
|
|
35
|
+
- uses: actions/checkout@v7
|
|
36
36
|
- name: Set up Ruby
|
|
37
37
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
38
38
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Issues are tracked at https://github.com/roberts1000/format_restricter_rails/issues. Issues marked as **(Internal)** only affect development.
|
|
4
4
|
|
|
5
|
+
## 2.1.0 (Nov 25, 2026)
|
|
6
|
+
|
|
7
|
+
1. [#86](../../issues/86): Require `bundler` `>= 4.0`. **(Internal)**
|
|
8
|
+
1. [#88](../../issues/88): Remove Ruby 3.1 support.
|
|
9
|
+
1. [#91](../../issues/91): Remove Ruby 3.2 support.
|
|
10
|
+
1. [#93](../../issues/93): Update dev/test gems. **(Internal)**
|
|
11
|
+
1. [#95](../../issues/95): Fix RuboCop issues. **(Internal)**
|
|
12
|
+
1. [#98](../../issues/98): Add Ruby 3.4 support.
|
|
13
|
+
1. [#98](../../issues/98): Add Ruby 3.4 support.
|
|
14
|
+
1. [#100](../../issues/100): Add Ruby 4.0 support.
|
|
15
|
+
1. [#100](../../issues/103): Use actions/checkout@v7 in PR workflow. **(Internal)**
|
|
16
|
+
|
|
5
17
|
## 2.0.0 (Jun 03, 2024)
|
|
6
18
|
|
|
7
19
|
1. [#80](../../issues/80): Use `rspec_starter` `~> 3.0`. **(Internal)**
|
data/Gemfile
CHANGED
|
@@ -9,14 +9,14 @@ group :development do
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
group :development, :test do
|
|
12
|
-
gem 'bootsnap', require: false
|
|
13
|
-
gem 'bundler', '
|
|
14
|
-
gem 'importmap-rails', '~> 2.
|
|
15
|
-
gem 'pry', '~> 0.
|
|
16
|
-
gem 'puma', '~>
|
|
12
|
+
gem 'bootsnap', '~> 1.26.2', require: false
|
|
13
|
+
gem 'bundler', '>= 2.0'
|
|
14
|
+
gem 'importmap-rails', '~> 2.2.3'
|
|
15
|
+
gem 'pry', '~> 0.16.1'
|
|
16
|
+
gem 'puma', '~> 8.1.3'
|
|
17
17
|
gem 'rake', '~> 13.0'
|
|
18
18
|
gem 'sass-rails', '~> 6.0'
|
|
19
|
-
gem "sqlite3", '~>
|
|
19
|
+
gem "sqlite3", '~> 2.10.2'
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
group :test do
|
data/README.md
CHANGED
data/Rakefile
CHANGED
|
@@ -15,8 +15,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
15
15
|
|
|
16
16
|
task default: :spec
|
|
17
17
|
|
|
18
|
-
desc "Start a console with
|
|
18
|
+
desc "Start a console with irb."
|
|
19
19
|
task console: :environment do
|
|
20
|
-
exec "
|
|
21
|
-
# exec "irb -r format_restricter_rails -I ./lib"
|
|
20
|
+
exec "irb -r format_restricter_rails -I ./lib"
|
|
22
21
|
end
|
data/bin/console
CHANGED
|
@@ -6,8 +6,5 @@ require "format_restricter_rails"
|
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
|
8
8
|
|
|
9
|
-
require "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# require "irb"
|
|
13
|
-
# IRB.start
|
|
9
|
+
require "irb"
|
|
10
|
+
IRB.start
|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
spec.bindir = "exe"
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
|
-
spec.required_ruby_version = '>= 3.
|
|
20
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
21
21
|
|
|
22
22
|
spec.add_dependency "rails", ">= 7.1"
|
|
23
23
|
end
|
|
@@ -19,7 +19,7 @@ module FormatRestricterRails
|
|
|
19
19
|
# This method is turned into a private method above.
|
|
20
20
|
def register_before_action(options, allowed_formats)
|
|
21
21
|
before_action(options) do |_controller|
|
|
22
|
-
#
|
|
22
|
+
# Don't use 'return'. It will trigger a local jump error.
|
|
23
23
|
if request.format.symbol.present?
|
|
24
24
|
head :not_acceptable unless allowed_formats.include?(request.format.symbol)
|
|
25
25
|
end
|
|
@@ -3,13 +3,3 @@ require "format_restricter_rails/version"
|
|
|
3
3
|
require "format_restricter_rails/engine"
|
|
4
4
|
require "format_restricter_rails/includes"
|
|
5
5
|
require "format_restricter_rails/railtie"
|
|
6
|
-
|
|
7
|
-
# Setup pry for development when running "rake console". Guard against load
|
|
8
|
-
# errors in production (since pry is only loaded as a DEVELOPMENT dependency
|
|
9
|
-
# in the .gemspec)
|
|
10
|
-
# rubocop:disable Lint/SuppressedException
|
|
11
|
-
begin
|
|
12
|
-
require "pry"
|
|
13
|
-
rescue LoadError
|
|
14
|
-
end
|
|
15
|
-
# rubocop:enable Lint/SuppressedException
|
metadata
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: format_restricter_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- roberts1000
|
|
8
|
-
autorequire:
|
|
7
|
+
- roberts1000
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rails
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: "7.1"
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
-
|
|
25
|
+
- ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: "7.1"
|
|
28
|
+
description: A Rails Engine that restricts the formats that your Rails controller actions are allowed to process.
|
|
29
29
|
email:
|
|
30
|
-
- roberts@corlewsolutions.com
|
|
30
|
+
- roberts@corlewsolutions.com
|
|
31
31
|
executables: []
|
|
32
32
|
extensions: []
|
|
33
33
|
extra_rdoc_files: []
|
|
34
34
|
files:
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- CHANGELOG.md
|
|
41
|
-
- Gemfile
|
|
42
|
-
- LICENSE.md
|
|
43
|
-
- README.md
|
|
44
|
-
- Rakefile
|
|
45
|
-
- bin/console
|
|
46
|
-
- bin/dummy
|
|
47
|
-
- bin/rails
|
|
48
|
-
- bin/setup
|
|
49
|
-
- bin/start_rspec
|
|
50
|
-
- format_restricter_rails.gemspec
|
|
51
|
-
- lib/format_restricter_rails.rb
|
|
52
|
-
- lib/format_restricter_rails/engine.rb
|
|
53
|
-
- lib/format_restricter_rails/includes.rb
|
|
54
|
-
- lib/format_restricter_rails/railtie.rb
|
|
55
|
-
- lib/format_restricter_rails/version.rb
|
|
56
|
-
homepage: https://github.com/roberts1000/format_restricter_rails
|
|
35
|
+
- .github/pull_request_template.md
|
|
36
|
+
- .github/workflows/check_pull_request.yml
|
|
37
|
+
- .gitignore
|
|
38
|
+
- .rspec
|
|
39
|
+
- .rubocop.yml
|
|
40
|
+
- CHANGELOG.md
|
|
41
|
+
- Gemfile
|
|
42
|
+
- LICENSE.md
|
|
43
|
+
- README.md
|
|
44
|
+
- Rakefile
|
|
45
|
+
- bin/console
|
|
46
|
+
- bin/dummy
|
|
47
|
+
- bin/rails
|
|
48
|
+
- bin/setup
|
|
49
|
+
- bin/start_rspec
|
|
50
|
+
- format_restricter_rails.gemspec
|
|
51
|
+
- lib/format_restricter_rails.rb
|
|
52
|
+
- lib/format_restricter_rails/engine.rb
|
|
53
|
+
- lib/format_restricter_rails/includes.rb
|
|
54
|
+
- lib/format_restricter_rails/railtie.rb
|
|
55
|
+
- lib/format_restricter_rails/version.rb
|
|
56
|
+
homepage: "https://github.com/roberts1000/format_restricter_rails"
|
|
57
57
|
licenses:
|
|
58
|
-
- MIT
|
|
58
|
+
- MIT
|
|
59
59
|
metadata: {}
|
|
60
|
-
post_install_message:
|
|
61
60
|
rdoc_options: []
|
|
62
61
|
require_paths:
|
|
63
|
-
- lib
|
|
62
|
+
- lib
|
|
64
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
-
|
|
66
|
+
- ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 3.3.0
|
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
-
|
|
72
|
+
- ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: "0"
|
|
74
75
|
requirements: []
|
|
75
|
-
rubygems_version:
|
|
76
|
-
signing_key:
|
|
76
|
+
rubygems_version: 4.1.1
|
|
77
77
|
specification_version: 4
|
|
78
|
-
summary: A Rails Engine that prevents Rails controllers from processing undesired
|
|
79
|
-
formats.
|
|
78
|
+
summary: A Rails Engine that prevents Rails controllers from processing undesired formats.
|
|
80
79
|
test_files: []
|