go_to_param 1.1.1 → 1.1.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 +5 -5
- data/CHANGELOG.md +4 -0
- data/go_to_param.gemspec +1 -1
- data/lib/go_to_param.rb +1 -1
- data/lib/go_to_param/version.rb +1 -1
- data/spec/go_to_param_spec.rb +20 -18
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9a103b9617231ac26d4b5e82ca46dea4bcfd961cbda378476113d3dcd5ab7303
|
4
|
+
data.tar.gz: 0d805e34c66359b35775edc1e77ac9246b8f5d3b9838755d748f4c3acd1ae44b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04434b980320f4f2ed8522e9e059973b31b1eb2f5bacb9ad3be482a8e72ddafa859f3974a4385702f973111e25b005377c3865c2696f57f85f0399c1ddf4e1d0
|
7
|
+
data.tar.gz: c7d4929d8f99b889b6680fe3c3383c5bad5d092ddb6d64e0dd704882062360c78f15331a8d4e5764e8731b89f73e3fd32229b5ff90dd9a82bdc5d1e012fe000a
|
data/CHANGELOG.md
CHANGED
data/go_to_param.gemspec
CHANGED
@@ -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", "
|
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
|
data/lib/go_to_param.rb
CHANGED
data/lib/go_to_param/version.rb
CHANGED
data/spec/go_to_param_spec.rb
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
require_relative "../lib/go_to_param"
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
describe GoToParam do
|
4
|
+
let(:controller_klass) do
|
5
|
+
Class.new do
|
6
|
+
attr_accessor :params, :view_context, :request
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
8
|
+
def self.helper_method(*methods)
|
9
|
+
@helper_methods = methods
|
10
|
+
end
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
def self.helper_methods
|
13
|
+
@helper_methods
|
14
|
+
end
|
13
15
|
|
14
|
-
|
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) {
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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.
|
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:
|
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
|
-
|
91
|
-
|
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:
|