redirector 1.1.2 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/redirect_rule.rb +7 -3
- data/lib/redirector/middleware.rb +1 -1
- data/lib/redirector/version.rb +1 -1
- data/spec/dummy/log/development.log +233 -0
- data/spec/dummy/log/test.log +9150 -0
- data/spec/models/redirect_rule_spec.rb +9 -0
- metadata +30 -31
@@ -46,6 +46,15 @@ describe RedirectRule do
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
describe 'strip_destination_whitespace before_save callback' do
|
50
|
+
it 'strips leading and trailing whitespace when saved' do
|
51
|
+
subject = build(:redirect_rule, :destination => ' /needs-stripping ')
|
52
|
+
|
53
|
+
subject.save
|
54
|
+
expect(subject.reload.destination).to eq('/needs-stripping')
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
49
58
|
describe '.match_for' do
|
50
59
|
it 'returns nil if there is no matching rule' do
|
51
60
|
expect(RedirectRule.match_for('/someplace', {})).to be_nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redirector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Landau
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -243,7 +243,7 @@ files:
|
|
243
243
|
homepage: https://github.com/vigetlabs/redirector
|
244
244
|
licenses: []
|
245
245
|
metadata: {}
|
246
|
-
post_install_message:
|
246
|
+
post_install_message:
|
247
247
|
rdoc_options: []
|
248
248
|
require_paths:
|
249
249
|
- lib
|
@@ -258,50 +258,49 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
258
|
- !ruby/object:Gem::Version
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
|
-
|
262
|
-
|
263
|
-
signing_key:
|
261
|
+
rubygems_version: 3.1.4
|
262
|
+
signing_key:
|
264
263
|
specification_version: 4
|
265
264
|
summary: A Rails engine that adds a piece of middleware to the top of your middleware
|
266
265
|
stack that looks for redirect rules stored in your database and redirects you accordingly.
|
267
266
|
test_files:
|
268
|
-
- spec/
|
269
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
267
|
+
- spec/spec_helper.rb
|
270
268
|
- spec/dummy/app/controllers/application_controller.rb
|
271
269
|
- spec/dummy/app/controllers/news_controller.rb
|
272
|
-
- spec/dummy/app/helpers/application_helper.rb
|
273
270
|
- spec/dummy/app/views/layouts/application.html.erb
|
274
|
-
- spec/dummy/
|
275
|
-
- spec/dummy/
|
276
|
-
- spec/dummy/
|
277
|
-
- spec/dummy/config/
|
271
|
+
- spec/dummy/app/assets/javascripts/application.js
|
272
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
273
|
+
- spec/dummy/app/helpers/application_helper.rb
|
274
|
+
- spec/dummy/config/routes.rb
|
275
|
+
- spec/dummy/config/locales/en.yml
|
278
276
|
- spec/dummy/config/database.yml.example
|
279
|
-
- spec/dummy/config/environment.rb
|
280
|
-
- spec/dummy/config/environments/development.rb
|
281
277
|
- spec/dummy/config/environments/production.rb
|
278
|
+
- spec/dummy/config/environments/development.rb
|
282
279
|
- spec/dummy/config/environments/test.rb
|
280
|
+
- spec/dummy/config/database.travis.yml
|
281
|
+
- spec/dummy/config/environment.rb
|
282
|
+
- spec/dummy/config/application.rb
|
283
|
+
- spec/dummy/config/database.yml
|
284
|
+
- spec/dummy/config/boot.rb
|
283
285
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
284
|
-
- spec/dummy/config/initializers/inflections.rb
|
285
286
|
- spec/dummy/config/initializers/mime_types.rb
|
286
|
-
- spec/dummy/config/initializers/secret_token.rb
|
287
287
|
- spec/dummy/config/initializers/session_store.rb
|
288
288
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
289
|
-
- spec/dummy/config/
|
290
|
-
- spec/dummy/config/
|
289
|
+
- spec/dummy/config/initializers/secret_token.rb
|
290
|
+
- spec/dummy/config/initializers/inflections.rb
|
291
291
|
- spec/dummy/config.ru
|
292
|
-
- spec/dummy/
|
293
|
-
- spec/dummy/
|
294
|
-
- spec/dummy/
|
295
|
-
- spec/dummy/public/404.html
|
292
|
+
- spec/dummy/script/rails
|
293
|
+
- spec/dummy/Rakefile
|
294
|
+
- spec/dummy/public/favicon.ico
|
296
295
|
- spec/dummy/public/422.html
|
297
296
|
- spec/dummy/public/500.html
|
298
|
-
- spec/dummy/public/
|
299
|
-
- spec/dummy/
|
297
|
+
- spec/dummy/public/404.html
|
298
|
+
- spec/dummy/db/schema.rb
|
299
|
+
- spec/dummy/log/test.log
|
300
|
+
- spec/dummy/log/development.log
|
300
301
|
- spec/dummy/README.rdoc
|
301
|
-
- spec/dummy/script/rails
|
302
|
-
- spec/factories/redirect_rules.rb
|
303
|
-
- spec/factories/request_environment_rules.rb
|
304
302
|
- spec/features/middleware_spec.rb
|
305
|
-
- spec/models/redirect_rule_spec.rb
|
306
303
|
- spec/models/request_environment_rule_spec.rb
|
307
|
-
- spec/
|
304
|
+
- spec/models/redirect_rule_spec.rb
|
305
|
+
- spec/factories/redirect_rules.rb
|
306
|
+
- spec/factories/request_environment_rules.rb
|