go_to_param 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 72eda2624e61954c9946f55d934d4901c1e96650
4
- data.tar.gz: 32e6528195c767d629097d7d322c2e5e556dc2d2
2
+ SHA256:
3
+ metadata.gz: 9a103b9617231ac26d4b5e82ca46dea4bcfd961cbda378476113d3dcd5ab7303
4
+ data.tar.gz: 0d805e34c66359b35775edc1e77ac9246b8f5d3b9838755d748f4c3acd1ae44b
5
5
  SHA512:
6
- metadata.gz: 98a305b56695de24207e93b4790a3f7a468e5a044ce319fc22004d0e72fda53d9e1e471d75414bb9d44259ef6aaf0da24d3fa523006746e1713e270bda0f76f9
7
- data.tar.gz: 2c47057f2b829003393c1c8e0d11c529fbf4f825ef1b70f3799c8341aaeee23c22cf65d9ee15337f523b2c3c9ec6a143702ba60190f425696d1decfab8603c3a
6
+ metadata.gz: 04434b980320f4f2ed8522e9e059973b31b1eb2f5bacb9ad3be482a8e72ddafa859f3974a4385702f973111e25b005377c3865c2696f57f85f0399c1ddf4e1d0
7
+ data.tar.gz: c7d4929d8f99b889b6680fe3c3383c5bad5d092ddb6d64e0dd704882062360c78f15331a8d4e5764e8731b89f73e3fd32229b5ff90dd9a82bdc5d1e012fe000a
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.2
4
+
5
+ - Fix keyword parameter warning. Thanks to @olleolleolle!
6
+
3
7
  ## 1.1.1
4
8
 
5
9
  - Don't raise exceptions if given hash params from hack attempts, such as: `go_to[foo]=bar`.
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_development_dependency "bundler", "~> 1.3"
19
+ spec.add_development_dependency "bundler", ">= 1.3"
20
20
  spec.add_development_dependency "rake"
21
21
  spec.add_development_dependency "rspec"
22
22
  end
@@ -35,7 +35,7 @@ module GoToParam
35
35
  end
36
36
 
37
37
  def go_to_here_params(additional_query_params = {})
38
- path = go_to_here_path(additional_query_params)
38
+ path = go_to_here_path(**additional_query_params)
39
39
 
40
40
  if path
41
41
  { go_to: path }
@@ -1,3 +1,3 @@
1
1
  module GoToParam
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
@@ -1,27 +1,29 @@
1
1
  require_relative "../lib/go_to_param"
2
2
 
3
- class FakeController
4
- attr_accessor :params, :view_context, :request
3
+ describe GoToParam do
4
+ let(:controller_klass) do
5
+ Class.new do
6
+ attr_accessor :params, :view_context, :request
5
7
 
6
- def self.helper_method(*methods)
7
- @helper_methods = methods
8
- end
8
+ def self.helper_method(*methods)
9
+ @helper_methods = methods
10
+ end
9
11
 
10
- def self.helper_methods
11
- @helper_methods
12
- end
12
+ def self.helper_methods
13
+ @helper_methods
14
+ end
13
15
 
14
- include GoToParam
15
- end
16
+ include GoToParam
17
+ end
18
+ end
16
19
 
17
- describe GoToParam do
18
20
  after { GoToParam.reset_allowed_redirect_prefixes }
19
21
 
20
- let(:controller) { FakeController.new }
22
+ let(:controller) { controller_klass.new }
21
23
 
22
24
  describe "#hidden_go_to_tag" do
23
25
  it "becomes a helper method" do
24
- expect(FakeController.helper_methods).to include :hidden_go_to_tag
26
+ expect(controller_klass.helper_methods).to include :hidden_go_to_tag
25
27
  end
26
28
 
27
29
  it "adds a hidden field tag" do
@@ -36,7 +38,7 @@ describe GoToParam do
36
38
 
37
39
  describe "#hidden_go_to_here_tag" do
38
40
  it "becomes a helper method" do
39
- expect(FakeController.helper_methods).to include :hidden_go_to_here_tag
41
+ expect(controller_klass.helper_methods).to include :hidden_go_to_here_tag
40
42
  end
41
43
 
42
44
  it "adds a hidden field tag" do
@@ -61,7 +63,7 @@ describe GoToParam do
61
63
 
62
64
  describe "#go_to_params" do
63
65
  it "becomes a helper method" do
64
- expect(FakeController.helper_methods).to include :go_to_params
66
+ expect(controller_klass.helper_methods).to include :go_to_params
65
67
  end
66
68
 
67
69
  it "includes the go_to parameter" do
@@ -79,7 +81,7 @@ describe GoToParam do
79
81
 
80
82
  describe "#go_to_here_params" do
81
83
  it "becomes a helper method" do
82
- expect(FakeController.helper_methods).to include :go_to_here_params
84
+ expect(controller_klass.helper_methods).to include :go_to_here_params
83
85
  end
84
86
 
85
87
  it "gets the request path as the go_to parameter" do
@@ -121,7 +123,7 @@ describe GoToParam do
121
123
 
122
124
  describe "#go_to_path" do
123
125
  it "becomes a helper method" do
124
- expect(FakeController.helper_methods).to include :go_to_path
126
+ expect(controller_klass.helper_methods).to include :go_to_path
125
127
  end
126
128
 
127
129
  it "is the go_to parameter value" do
@@ -149,7 +151,7 @@ describe GoToParam do
149
151
 
150
152
  describe "#go_to_path_or" do
151
153
  it "becomes a helper method" do
152
- expect(FakeController.helper_methods).to include :go_to_path_or
154
+ expect(controller_klass.helper_methods).to include :go_to_path_or
153
155
  end
154
156
 
155
157
  it "is the go_to parameter value" do
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: go_to_param
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik N
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - henrik@nyh.se
58
58
  executables: []
@@ -72,7 +72,7 @@ homepage: ''
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}
75
- post_install_message:
75
+ post_install_message:
76
76
  rdoc_options: []
77
77
  require_paths:
78
78
  - lib
@@ -87,9 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubyforge_project:
91
- rubygems_version: 2.6.11
92
- signing_key:
90
+ rubygems_version: 3.1.2
91
+ signing_key:
93
92
  specification_version: 4
94
93
  summary: Rails "go_to" redirection param utilities.
95
94
  test_files: