redirector 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/redirector/middleware.rb +5 -1
- data/lib/redirector/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/log/development.log +31 -0
- data/spec/dummy/log/test.log +161 -0
- data/spec/features/middleware_spec.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 48575a6f084332c0f16720d2398e8674fced3f96add66675947fc820c47070bc
|
4
|
+
data.tar.gz: 1a4e1e61f2abdcc1d39c655e0d155e707769738b380408a942447bc79bc60feb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4b89eaeb9e03e7ff035ce0233285f44107545f301c5807765cf9076e6af17de6c8fd1eeadae130584c9c965a2853e152eeae307cebb337250f56d6a9d94a374
|
7
|
+
data.tar.gz: 3d693e87e63e0b554fba58be2eeb5d5bc7990eaa4a6dd3f3451b6a3d30787c73a633286008143825b27c03e5490e2d8b911a808ee0c28c3edef6151ea517855b
|
@@ -64,6 +64,10 @@ module Redirector
|
|
64
64
|
env['HTTP_HOST'].split(':').first
|
65
65
|
end
|
66
66
|
|
67
|
+
def request_scheme
|
68
|
+
env['rack.url_scheme']
|
69
|
+
end
|
70
|
+
|
67
71
|
def request_port
|
68
72
|
@request_port ||= begin
|
69
73
|
if env['HTTP_HOST'].include?(':')
|
@@ -86,7 +90,7 @@ module Redirector
|
|
86
90
|
|
87
91
|
def redirect_uri
|
88
92
|
destination_uri.tap do |uri|
|
89
|
-
uri.scheme ||=
|
93
|
+
uri.scheme ||= request_scheme
|
90
94
|
uri.host ||= request_host
|
91
95
|
uri.port ||= request_port if request_port.present?
|
92
96
|
uri.query ||= env['QUERY_STRING'] if Redirector.preserve_query
|
data/lib/redirector/version.rb
CHANGED
@@ -5,7 +5,7 @@ development:
|
|
5
5
|
database: redirector_dummy_development
|
6
6
|
pool: 5
|
7
7
|
username: root
|
8
|
-
password:
|
8
|
+
password:
|
9
9
|
|
10
10
|
test:
|
11
11
|
adapter: mysql2
|
@@ -14,4 +14,4 @@ test:
|
|
14
14
|
database: redirector_dummy_test
|
15
15
|
pool: 5
|
16
16
|
username: root
|
17
|
-
password:
|
17
|
+
password:
|
@@ -3,3 +3,34 @@ Connecting to database specified by database.yml
|
|
3
3
|
Migrating to CreateRedirectRules (20120815212612)
|
4
4
|
Migrating to CreateRequestEnvironmentRules (20120823163756)
|
5
5
|
[1m[35m (0.2ms)[0m SELECT `schema_migrations`.`version` FROM `schema_migrations`
|
6
|
+
[1m[35m (0.4ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
7
|
+
[1m[35m (71.1ms)[0m [1m[35mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL PRIMARY KEY) ENGINE=InnoDB[0m
|
8
|
+
[1m[35m (36.0ms)[0m [1m[35mCREATE TABLE `ar_internal_metadata` (`key` varchar(255) NOT NULL PRIMARY KEY, `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB[0m
|
9
|
+
[1m[35m (0.5ms)[0m [1m[34mSELECT GET_LOCK('3013211720225074515', 0)[0m
|
10
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC[0m
|
11
|
+
Migrating to CreateRedirectRules (20120815212612)
|
12
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT RELEASE_LOCK('3013211720225074515')[0m
|
13
|
+
[1m[35m (0.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
14
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT GET_LOCK('3013211720225074515', 0)[0m
|
15
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC[0m
|
16
|
+
Migrating to CreateRedirectRules (20120815212612)
|
17
|
+
[1m[35m (25.4ms)[0m [1m[35mCREATE TABLE `redirect_rules` (`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `source` varchar(255) NOT NULL, `source_is_regex` tinyint(1) DEFAULT 0 NOT NULL, `source_is_case_sensitive` tinyint(1) DEFAULT 0 NOT NULL, `destination` varchar(255) NOT NULL, `active` tinyint(1) DEFAULT 0, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
18
|
+
[1m[35m (19.9ms)[0m [1m[35mCREATE INDEX `index_redirect_rules_on_source` ON `redirect_rules` (`source`) [0m
|
19
|
+
[1m[35m (17.8ms)[0m [1m[35mCREATE INDEX `index_redirect_rules_on_active` ON `redirect_rules` (`active`) [0m
|
20
|
+
[1m[35m (17.0ms)[0m [1m[35mCREATE INDEX `index_redirect_rules_on_source_is_regex` ON `redirect_rules` (`source_is_regex`) [0m
|
21
|
+
[1m[35m (14.0ms)[0m [1m[35mCREATE INDEX `index_redirect_rules_on_source_is_case_sensitive` ON `redirect_rules` (`source_is_case_sensitive`) [0m
|
22
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
23
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO `schema_migrations` (`version`) VALUES ('20120815212612')[0m
|
24
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
25
|
+
Migrating to CreateRequestEnvironmentRules (20120823163756)
|
26
|
+
[1m[35m (23.4ms)[0m [1m[35mCREATE TABLE `request_environment_rules` (`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `redirect_rule_id` int NOT NULL, `environment_key_name` varchar(255) NOT NULL, `environment_value` varchar(255) NOT NULL, `environment_value_is_regex` tinyint(1) DEFAULT 0 NOT NULL, `environment_value_is_case_sensitive` tinyint(1) DEFAULT 1 NOT NULL, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB[0m
|
27
|
+
[1m[35m (17.4ms)[0m [1m[35mCREATE INDEX `index_request_environment_rules_on_redirect_rule_id` ON `request_environment_rules` (`redirect_rule_id`) [0m
|
28
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
29
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO `schema_migrations` (`version`) VALUES ('20120823163756')[0m
|
30
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
31
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT `ar_internal_metadata`.* FROM `ar_internal_metadata` WHERE `ar_internal_metadata`.`key` = 'environment' LIMIT 1[0m
|
32
|
+
[1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
|
33
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO `ar_internal_metadata` (`key`, `value`, `created_at`, `updated_at`) VALUES ('environment', 'development', '2018-06-05 15:16:51', '2018-06-05 15:16:51')[0m
|
34
|
+
[1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
|
35
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT RELEASE_LOCK('3013211720225074515')[0m
|
36
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC[0m
|
data/spec/dummy/log/test.log
CHANGED
@@ -11554,3 +11554,164 @@ ActionController::RoutingError (No route matches [GET] "/my_custom_url/20"):
|
|
11554
11554
|
[1m[36m (2.7ms)[0m [1mTRUNCATE TABLE `request_environment_rules`;[0m
|
11555
11555
|
[1m[35m (0.1ms)[0m SET FOREIGN_KEY_CHECKS = 1
|
11556
11556
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11557
|
+
[1m[35m (1.3ms)[0m [1m[35mSET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483[0m
|
11558
|
+
[1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
|
11559
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11560
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11561
|
+
[1m[35m (0.9ms)[0m [1m[34mselect table_name from information_schema.views where table_schema = 'redirector_dummy_test'[0m
|
11562
|
+
[1m[35m (0.4ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11563
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11564
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
11565
|
+
[1m[35m (0.5ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11566
|
+
[1m[35m (0.3ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11567
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11568
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
11569
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11570
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11571
|
+
[1m[35m (0.9ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11572
|
+
[1m[35m (0.4ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11573
|
+
[1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
|
11574
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11575
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11576
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11577
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11578
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11579
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11580
|
+
[1m[35m (0.3ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11581
|
+
[1m[35m (0.4ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11582
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11583
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11584
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11585
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11586
|
+
[1m[35m (0.3ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11587
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11588
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11589
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11590
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11591
|
+
[1m[35m (0.3ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11592
|
+
[1m[35m (0.2ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11593
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11594
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11595
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11596
|
+
[1m[35m (0.3ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11597
|
+
[1m[35m (0.4ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11598
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11599
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11600
|
+
[1m[35m (0.5ms)[0m [1m[34mSELECT @@FOREIGN_KEY_CHECKS[0m
|
11601
|
+
[1m[35m (0.4ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 0[0m
|
11602
|
+
[1m[35m (0.3ms)[0m [1m[35mSET FOREIGN_KEY_CHECKS = 1[0m
|
11603
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11604
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11605
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11606
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11607
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11608
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11609
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11610
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11611
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11612
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11613
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
11614
|
+
[1m[35m (1.0ms)[0m [1m[35mBEGIN[0m
|
11615
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11616
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11617
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11618
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11619
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11620
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11621
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11622
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
11623
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11624
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11625
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11626
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11627
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11628
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11629
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
11630
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11631
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11632
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11633
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11634
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11635
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11636
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
11637
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11638
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11639
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11640
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11641
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11642
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
11643
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11644
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11645
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
11646
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11647
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
11648
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
11649
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11650
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11651
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11652
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11653
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
11654
|
+
[1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
|
11655
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11656
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11657
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11658
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
11659
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11660
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11661
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11662
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11663
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11664
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11665
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11666
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
11667
|
+
[1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
|
11668
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11669
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11670
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
11671
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11672
|
+
[1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
|
11673
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11674
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11675
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11676
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
11677
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11678
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11679
|
+
[1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
|
11680
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11681
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11682
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11683
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11684
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11685
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11686
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11687
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11688
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11689
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11690
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11691
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11692
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11693
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11694
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11695
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11696
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11697
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11698
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11699
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11700
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11701
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11702
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11703
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
11704
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11705
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11706
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11707
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11708
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11709
|
+
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
|
11710
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
11711
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11712
|
+
[1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
|
11713
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
11714
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11715
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
11716
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
11717
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
@@ -60,6 +60,13 @@ describe 'Redirector middleware', :type => :feature do
|
|
60
60
|
expect(current_url).to eq('http://example.com:3000/news/5')
|
61
61
|
end
|
62
62
|
|
63
|
+
it 'handles https requests' do
|
64
|
+
Capybara.app_host = 'https://example.com'
|
65
|
+
|
66
|
+
visit '/my_custom_url'
|
67
|
+
expect(current_url).to eq('https://example.com/news/5')
|
68
|
+
end
|
69
|
+
|
63
70
|
it 'foregoes search if ignored path pattern is detected' do
|
64
71
|
original_option = Redirector.ignored_patterns
|
65
72
|
Redirector.ignored_patterns = [/^\/my_custom_url\/.+/]
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Landau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
version: '0'
|
246
246
|
requirements: []
|
247
247
|
rubyforge_project:
|
248
|
-
rubygems_version: 2.
|
248
|
+
rubygems_version: 2.7.6
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: A Rails engine that adds a piece of middleware to the top of your middleware
|