params_keeper_rails 1.2.2 → 1.3.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: 0e45dfc5db4050646b12ac16f67cd674add86504f033ea0e53994b70899fe965
4
- data.tar.gz: ed817a1bea1033e7f72a6e606b886af52bdd4c0f7d408caf83dcec2837cfb93d
3
+ metadata.gz: ac157af5b6005b3fc83250e8888875169ab1995c66d5ec22cfbeb52070e48407
4
+ data.tar.gz: 2a174f4c9f56cc9cb6877758b235d64ebc7a30f9409c2c0dc528a859724ed29b
5
5
  SHA512:
6
- metadata.gz: dd080fe7ffe4708d8d79c2cbb0918b485d6f1fe5d437662a0b39935267264a23ce2edbad4f5128ab67526bb6054301ab27d7fcec67b4a15c7c37af8621d5ed80
7
- data.tar.gz: 825ef3b8765a00fc087e6e0c989e86c0fb92953a04542bb3d6f489ec0effd4505bde9de6091eba58420cf99815632e3b5fb3dd29a1c9cc74869d8050917800aa
6
+ metadata.gz: a0e7cd697b588ef697db8853b1d6d98d6730da556b9a7089ecdabc810fb3f9422a26f1dc34f7557641bcb5e194fa7c3fffcf9ad65d0f032b131d7de3f1c230e2
7
+ data.tar.gz: 79bb8658a085882d6c38fc766e0122c6e925f33209b981a4be63752ea80fe11a09023a0ae7ac20850c6242c9f12a45e9bc0cc730cb0fa56a68c9fdee8d2538dd
@@ -4,41 +4,23 @@ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  test:
7
- runs-on: ubuntu-20.04
7
+ runs-on: ubuntu-22.04
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1]
12
- gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70']
11
+ ruby: ['3.0', 3.1, 3.2, 3.3, 3.4, '4.0']
12
+ gemfile: ['rails70', 'rails71', 'rails72', 'rails80', 'rails81']
13
13
  exclude:
14
- - ruby: 2.3
15
- gemfile: rails60
16
- - ruby: 2.3
17
- gemfile: rails61
18
- - ruby: 2.3
19
- gemfile: rails70
20
- - ruby: 2.4
21
- gemfile: rails60
22
- - ruby: 2.4
23
- gemfile: rails61
24
- - ruby: 2.4
25
- gemfile: rails70
26
- - ruby: 2.5
27
- gemfile: rails70
28
- - ruby: 2.6
29
- gemfile: rails70
30
14
  - ruby: 3.0
31
- gemfile: rails50
15
+ gemfile: rails72
32
16
  - ruby: 3.0
33
- gemfile: rails51
17
+ gemfile: rails80
34
18
  - ruby: 3.0
35
- gemfile: rails52
19
+ gemfile: rails81
36
20
  - ruby: 3.1
37
- gemfile: rails50
21
+ gemfile: rails80
38
22
  - ruby: 3.1
39
- gemfile: rails51
40
- - ruby: 3.1
41
- gemfile: rails52
23
+ gemfile: rails81
42
24
 
43
25
  name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}
44
26
 
@@ -46,11 +28,14 @@ jobs:
46
28
  BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
47
29
 
48
30
  steps:
49
- - uses: actions/checkout@v2
31
+ - uses: actions/checkout@v4
50
32
  - uses: ruby/setup-ruby@v1
51
33
  with:
52
34
  ruby-version: ${{ matrix.ruby }}
53
35
  bundler-cache: true
36
+ - name: Bundle list
37
+ run: |
38
+ bundle list
54
39
  - name: Run test
55
40
  run: |
56
41
  bundle exec rspec
data/.gitignore CHANGED
File without changes
data/.rspec CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.3.0
4
+
5
+ * Drop support for ruby <= 2.7, rails <= 6.1.
6
+ * Use `URI.decode_www_form` instead of deprecated `CGI.parse`.
7
+
8
+ ## 1.2.3
9
+
10
+ * Add `frozen_string_literal: true`.
11
+
3
12
  ## 1.2.2
4
13
 
5
14
  * Put hidden fields after beginning tag of form.
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem "rails", ">= 7.0"
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
@@ -4,8 +4,8 @@ A rails controller extension for keeping specific parameters through links.
4
4
 
5
5
  ## Dependencies
6
6
 
7
- * ruby 2.3+
8
- * rails 5.0+
7
+ * ruby 3.0+
8
+ * rails 7.0+
9
9
 
10
10
  ## Installation
11
11
 
data/Rakefile CHANGED
File without changes
@@ -2,4 +2,13 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 7.0.1"
4
4
 
5
+ gem "concurrent-ruby", "<= 1.3.4"
6
+
7
+ if RUBY_VERSION >= "3.4"
8
+ gem "bigdecimal"
9
+ gem "base64"
10
+ gem "drb"
11
+ gem "mutex_m"
12
+ end
13
+
5
14
  gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rails", "~> 5.0.0"
3
+ gem "rails", "~> 7.1.0"
4
4
 
5
5
  gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rails", "~> 5.1.0"
3
+ gem "rails", "~> 7.2.0"
4
4
 
5
5
  gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rails", "~> 5.2.0"
3
+ gem "rails", "~> 8.0.0"
4
4
 
5
5
  gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rails", "~> 6.1.0"
3
+ gem "rails", "~> 8.1.0"
4
4
 
5
5
  gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  class Config
3
5
  attr_accessor :keys, :to, :for, :url_options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  module Controller
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  module Helper
3
5
  def url_for(url_options = nil)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  class HiddenFields
3
5
  def initialize(controller, url_options)
@@ -11,8 +13,8 @@ module ParamsKeeper
11
13
  params = ParamsKeeper::Resolver.new(@controller, @url_options).call
12
14
  return if params.blank?
13
15
 
14
- CGI.parse(params.to_query).flat_map do |key, values|
15
- values.map { |value| @controller.view_context.hidden_field_tag(key, value, id: nil) }
16
+ URI.decode_www_form(params.to_query).map do |key, value|
17
+ @controller.view_context.hidden_field_tag(key, value, id: nil)
16
18
  end.join.html_safe
17
19
  end
18
20
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  class Resolver
3
5
  def initialize(controller, url_options)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
4
  class UrlFor
3
5
  def initialize(caller, controller, url_options)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ParamsKeeper
2
- VERSION = "1.2.2"
4
+ VERSION = "1.3.0"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support'
2
4
  require 'params_keeper/version'
3
5
  require 'params_keeper/config'
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.3'
22
+ spec.required_ruby_version = ">= 3.0"
23
23
 
24
- spec.add_runtime_dependency "rails", ">= 5.0"
24
+ spec.add_runtime_dependency "rails", ">= 7.0"
25
25
 
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "rspec"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: params_keeper_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-07-06 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '5.0'
18
+ version: '7.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '5.0'
25
+ version: '7.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -111,12 +110,11 @@ files:
111
110
  - LICENSE.txt
112
111
  - README.md
113
112
  - Rakefile
114
- - gemfiles/rails50.gemfile
115
- - gemfiles/rails51.gemfile
116
- - gemfiles/rails52.gemfile
117
- - gemfiles/rails60.gemfile
118
- - gemfiles/rails61.gemfile
119
113
  - gemfiles/rails70.gemfile
114
+ - gemfiles/rails71.gemfile
115
+ - gemfiles/rails72.gemfile
116
+ - gemfiles/rails80.gemfile
117
+ - gemfiles/rails81.gemfile
120
118
  - lib/params_keeper/config.rb
121
119
  - lib/params_keeper/controller.rb
122
120
  - lib/params_keeper/helper.rb
@@ -130,7 +128,6 @@ homepage: https://github.com/kanety/params_keeper_rails
130
128
  licenses:
131
129
  - MIT
132
130
  metadata: {}
133
- post_install_message:
134
131
  rdoc_options: []
135
132
  require_paths:
136
133
  - lib
@@ -138,15 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
135
  requirements:
139
136
  - - ">="
140
137
  - !ruby/object:Gem::Version
141
- version: '2.3'
138
+ version: '3.0'
142
139
  required_rubygems_version: !ruby/object:Gem::Requirement
143
140
  requirements:
144
141
  - - ">="
145
142
  - !ruby/object:Gem::Version
146
143
  version: '0'
147
144
  requirements: []
148
- rubygems_version: 3.3.3
149
- signing_key:
145
+ rubygems_version: 3.6.9
150
146
  specification_version: 4
151
147
  summary: keep specific parameters through links.
152
148
  test_files: []
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem "rails", "~> 6.0.0"
4
- gem "psych", "~> 3.3.0"
5
-
6
- gemspec path: "../"