format_restricter_rails 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ca7a5e7621022398ed3af0f98bb6375174575f0b888dc3e75ddd0118dc1eb08
4
- data.tar.gz: dac6c986e76898705343be2f1cdf9e7a49aaf227a768bba4e7a990c4df8c93bf
3
+ metadata.gz: 4a0bb2e2685bcecea7f75e897d0f5e838982b620fffe4e5b0c28ce5b55b87a9d
4
+ data.tar.gz: c0244214b677ae90166659f29bffa9722154923f605bd58931370ee412a5e60b
5
5
  SHA512:
6
- metadata.gz: cba1e18bd0e076c41ac097492ce25984d928d5de01f0acb9a793e6b153cb90249cca623e0dae0f039186ac5b29a608e1389749d3c221c2269b47888ea460e802
7
- data.tar.gz: 129c753977245c149537b3df2b9e0b01bf557da22efecbfc3f9476d8dabb7c41b94f9a3f9cca1b6efc656fcf4a9240405b2309debf0e4b2df56383d787dd06ed
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.1', '3.2', '3.3']
16
+ ruby-version: ['3.3', '3.4', '4.0']
17
17
  steps:
18
- - uses: actions/checkout@v2
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.1']
33
+ ruby-version: ['3.3', '3.4', '4.0']
34
34
  steps:
35
- - uses: actions/checkout@v2
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
@@ -7,6 +7,9 @@
7
7
  inherit_gem:
8
8
  rubocop_plus: config/rubocop.yml
9
9
 
10
+ AllCops:
11
+ TargetRubyVersion: 3.3
12
+
10
13
  Rails:
11
14
  Enabled: true
12
15
 
data/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
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
+
17
+ ## 2.0.0 (Jun 03, 2024)
18
+
19
+ 1. [#80](../../issues/80): Use `rspec_starter` `~> 3.0`. **(Internal)**
20
+ 1. [#82](../../issues/82): Make Rails 7.1 the minimum.
21
+
5
22
  ## 1.4.0 (Jun 03, 2024)
6
23
 
7
24
  1. [#30](../../issues/30): Add links to issues in the `CHANGELOG.md`. **(Internal)**
data/Gemfile CHANGED
@@ -4,21 +4,21 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
- gem 'rspec_starter', "~> 2.0", require: false
7
+ gem 'rspec_starter', "~> 3.0", require: false
8
8
  gem 'rubocop_plus', "~> 2.0", require: false
9
9
  end
10
10
 
11
11
  group :development, :test do
12
- gem 'bootsnap', require: false
13
- gem 'bundler', '~> 2.0'
14
- gem 'pry', '~> 0.14.2'
15
- gem 'puma', '~> 6.4.1'
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'
16
17
  gem 'rake', '~> 13.0'
17
- gem 'sass-rails', '~> 5.0'
18
- gem "sqlite3", '~> 1.7.0'
18
+ gem 'sass-rails', '~> 6.0'
19
+ gem "sqlite3", '~> 2.10.2'
19
20
  end
20
21
 
21
22
  group :test do
22
23
  gem 'rspec-rails', '~> 6.1.0'
23
- gem 'rails', '~> 6.1.0'
24
24
  end
data/README.md CHANGED
@@ -19,11 +19,11 @@ Releases are versioned using [SemVer 2.0.0](https://semver.org/spec/v2.0.0.html)
19
19
 
20
20
  ## Supported Ruby Versions
21
21
 
22
- Ruby 3.1+
22
+ Ruby 3.3+
23
23
 
24
24
  ## Supported Ruby on Rails Versions
25
25
 
26
- Rails 6.1+
26
+ Rails 7.1+
27
27
 
28
28
  ## Installation
29
29
 
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 pry."
18
+ desc "Start a console with irb."
19
19
  task console: :environment do
20
- exec "pry -r format_restricter_rails -I ./lib"
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 "pry"
10
- Pry.start
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.1.0'
20
+ spec.required_ruby_version = '>= 3.3.0'
21
21
 
22
- spec.add_dependency "rails", ">= 6.1"
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
- # Can't use 'return' here or we'll get a local jump error.
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
@@ -1,3 +1,3 @@
1
1
  module FormatRestricterRails
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "2.1.0".freeze
3
3
  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: 1.4.0
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: 2024-06-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '6.1'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '6.1'
27
- description: A Rails Engine that restricts the formats that your Rails controller
28
- actions are allowed to process.
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
- - ".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
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
- - !ruby/object:Gem::Version
68
- version: 3.1.0
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
- - !ruby/object:Gem::Version
73
- version: '0'
71
+ -
72
+ - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: "0"
74
75
  requirements: []
75
- rubygems_version: 3.5.11
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: []