path_rewrite 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25d0011b70654e6cd76012e1245d3489adf5cfe6
4
- data.tar.gz: 258f9d1c33e3c4fbc9ba729f0208fbe1ed04a87b
3
+ metadata.gz: 611389922508364ac291b846224bae90a8ce931a
4
+ data.tar.gz: 04895ef52d0db6bfcf625bb2b42d968ca70d6b1a
5
5
  SHA512:
6
- metadata.gz: 201b09505e619678aebb089a705d4b245f768eb77f9b1416be7995bf8d003d5bb45c30ec4f7ee2b1d0975a08c2bcaa87095b2f7365eb7a2ac02c8f68a4ad54f1
7
- data.tar.gz: d7c3abb0f7858687395115cc45bf38b7aec16eaefe26b1faf2d0607fe768bef2e0ec403b20ef61c6b3cdd421fc12b0d156a7837373af06eaea4596a103a18b01
6
+ metadata.gz: 65dcfe9f3ff4821d5d26d862036a3c7cf95aa713a4e3b7c3b2de78c2467e210daf24b3472839e2e4b4e7362eb87359b02bba7d0abd370d241c64686c5c1faccc
7
+ data.tar.gz: 8cb2450da3af1aaf4a9e3877bcdf7e262d9954dfba3445a1f4f66e6ea079d2cbfe907ca6d0b6e045c486aa68e0f1ce91a34c57af297b236eb6a6f813a484dc55
@@ -11,5 +11,3 @@ module PathRewrite
11
11
 
12
12
  end
13
13
  end
14
- # FEATURE FLAG (in nemo)
15
- # TEST/REGRESSION
@@ -1,4 +1,7 @@
1
1
  module PathRewrite
2
2
  class PathTranslation < ActiveRecord::Base
3
+
4
+ validates_uniqueness_of :old_path
5
+
3
6
  end
4
7
  end
@@ -1,6 +1,6 @@
1
1
  PathRewrite::Engine.routes.draw do
2
2
  get "*path", to: "path#rewrite", constraints: -> (req) do
3
- PathRewrite.configuration.check_redirect? &&
3
+ PathRewrite.configuration.check_redirect?(req) &&
4
4
  PathRewrite::PathTranslation.find_by(old_path: "/#{req.params["path"]}").present?
5
5
  end
6
6
 
@@ -6,5 +6,7 @@ class CreatePathRewritePathTranslations < ActiveRecord::Migration
6
6
 
7
7
  t.timestamps null: false
8
8
  end
9
+
10
+ add_index :path_rewrite_path_translations, :old_path
9
11
  end
10
12
  end
@@ -5,10 +5,14 @@ module PathRewrite
5
5
  @check_redirect = value
6
6
  end
7
7
 
8
- def check_redirect?
8
+ def check_redirect?(request=nil)
9
9
  return @check_redirect unless @check_redirect.respond_to?(:call)
10
10
 
11
- @check_redirect.call
11
+ if @check_redirect.arity == 0
12
+ @check_redirect.call
13
+ else
14
+ @check_redirect.call request
15
+ end
12
16
  end
13
17
 
14
18
  end
@@ -1,3 +1,3 @@
1
1
  module PathRewrite
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,15 @@
1
+ module PathRewrite
2
+ describe PathTranslation do
3
+
4
+ context "validation" do
5
+
6
+ before { PathTranslation.create!(old_path: "from", new_path: "to") }
7
+
8
+ it "enforces unique FROM path" do
9
+ expect{PathTranslation.create!(old_path: "from", new_path: "to")}.to raise_error(ActiveRecord::RecordInvalid)
10
+ end
11
+
12
+ end
13
+
14
+ end
15
+ end
@@ -4,6 +4,23 @@ describe "routes", :type => :routing do
4
4
 
5
5
  before { PathRewrite.configuration.check_redirect = true }
6
6
 
7
+ context "check_redirect? is a lambda that accepts a parameter" do
8
+
9
+ before do
10
+ PathRewrite.configuration.check_redirect = -> (request) do
11
+ expect(request).to be_a ActionDispatch::Request
12
+ return false # will make the request non-routable by this engine
13
+ end
14
+ end
15
+
16
+ after { PathRewrite.configuration.check_redirect = true }
17
+
18
+ it "passes request object to the check_redirect? lambda" do
19
+ expect(get: "/test").not_to be_routable
20
+ end
21
+
22
+ end
23
+
7
24
  context "when check_redirect is configured to allow rewrites" do
8
25
 
9
26
  context "and a matching route exists" do
@@ -20,4 +20,6 @@ ActiveRecord::Schema.define(version: 20150618003028) do
20
20
  t.datetime "updated_at", null: false
21
21
  end
22
22
 
23
+ add_index "path_rewrite_path_translations", ["old_path"], name: "index_path_rewrite_path_translations_on_old_path"
24
+
23
25
  end
@@ -119,3 +119,25 @@ ActionController::RoutingError (No route matches [GET] "/some_path"):
119
119
  Rendered /Users/mtucker/.rvm/gems/ruby-2.2.2/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.1ms)
120
120
  Rendered /Users/mtucker/.rvm/gems/ruby-2.2.2/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms)
121
121
  Rendered /Users/mtucker/.rvm/gems/ruby-2.2.2/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (67.6ms)
122
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
123
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
124
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
125
+  (7.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
126
+  (0.1ms) select sqlite_version(*)
127
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
128
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
129
+ Migrating to CreatePathRewritePathTranslations (20150618003028)
130
+  (0.1ms) begin transaction
131
+  (0.6ms) CREATE TABLE "path_rewrite_path_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "old_path" varchar, "new_path" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
132
+  (0.1ms) CREATE INDEX "index_path_rewrite_path_translations_on_old_path" ON "path_rewrite_path_translations" ("old_path")
133
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150618003028"]]
134
+  (1.0ms) commit transaction
135
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
136
+  (0.1ms)  SELECT sql
137
+ FROM sqlite_master
138
+ WHERE name='index_path_rewrite_path_translations_on_old_path' AND type='index'
139
+ UNION ALL
140
+ SELECT sql
141
+ FROM sqlite_temp_master
142
+ WHERE name='index_path_rewrite_path_translations_on_old_path' AND type='index'
143
+ 
@@ -758,3 +758,440 @@ Redirecting /test to /captured from request http://test.host/test
758
758
  Redirected to http://test.host/captured
759
759
  Completed 301 Moved Permanently in 1ms (ActiveRecord: 0.1ms)
760
760
   (0.4ms) rollback transaction
761
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
762
+  (0.2ms) begin transaction
763
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
764
+  (0.1ms) rollback transaction
765
+  (0.1ms) begin transaction
766
+  (0.1ms) SAVEPOINT active_record_1
767
+ SQL (0.5ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 16:34:23.629564"], ["updated_at", "2015-06-25 16:34:23.629564"]]
768
+  (0.1ms) RELEASE SAVEPOINT active_record_1
769
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
770
+  (6.7ms) rollback transaction
771
+  (0.2ms) begin transaction
772
+  (0.1ms) rollback transaction
773
+  (0.1ms) begin transaction
774
+  (0.1ms) rollback transaction
775
+  (0.1ms) begin transaction
776
+ Processing by PathRewrite::PathController#rewrite as HTML
777
+ Parameters: {"path"=>"non_translated_path"}
778
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
779
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)
780
+  (0.1ms) rollback transaction
781
+  (0.1ms) begin transaction
782
+  (0.1ms) SAVEPOINT active_record_1
783
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 16:34:27.989343"], ["updated_at", "2015-06-25 16:34:27.989343"]]
784
+  (0.1ms) RELEASE SAVEPOINT active_record_1
785
+ Processing by PathRewrite::PathController#rewrite as HTML
786
+ Parameters: {"path"=>"test"}
787
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
788
+ Redirecting /test to /captured from request http://test.host/test
789
+ Redirected to http://test.host/captured
790
+ Completed 301 Moved Permanently in 2ms (ActiveRecord: 0.2ms)
791
+  (0.6ms) rollback transaction
792
+  (0.1ms) begin transaction
793
+  (0.1ms) rollback transaction
794
+  (0.1ms) begin transaction
795
+  (0.1ms) rollback transaction
796
+  (0.1ms) begin transaction
797
+  (0.1ms) rollback transaction
798
+  (0.1ms) begin transaction
799
+  (0.1ms) rollback transaction
800
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
801
+  (0.2ms) begin transaction
802
+  (0.1ms) rollback transaction
803
+  (0.1ms) begin transaction
804
+  (0.1ms) rollback transaction
805
+  (0.1ms) begin transaction
806
+  (0.2ms) rollback transaction
807
+  (0.2ms) begin transaction
808
+  (0.1ms) rollback transaction
809
+  (0.1ms) begin transaction
810
+ PathRewrite::PathTranslation Load (0.3ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
811
+  (0.1ms) rollback transaction
812
+  (0.2ms) begin transaction
813
+  (0.1ms) SAVEPOINT active_record_1
814
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 16:35:45.289267"], ["updated_at", "2015-06-25 16:35:45.289267"]]
815
+  (0.1ms) RELEASE SAVEPOINT active_record_1
816
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
817
+  (6.5ms) rollback transaction
818
+  (0.1ms) begin transaction
819
+  (0.1ms) rollback transaction
820
+  (0.1ms) begin transaction
821
+  (0.1ms) rollback transaction
822
+  (0.1ms) begin transaction
823
+ Processing by PathRewrite::PathController#rewrite as HTML
824
+ Parameters: {"path"=>"non_translated_path"}
825
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
826
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)
827
+  (0.1ms) rollback transaction
828
+  (0.1ms) begin transaction
829
+  (0.1ms) SAVEPOINT active_record_1
830
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 16:35:45.334884"], ["updated_at", "2015-06-25 16:35:45.334884"]]
831
+  (0.1ms) RELEASE SAVEPOINT active_record_1
832
+ Processing by PathRewrite::PathController#rewrite as HTML
833
+ Parameters: {"path"=>"test"}
834
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
835
+ Redirecting /test to /captured from request http://test.host/test
836
+ Redirected to http://test.host/captured
837
+ Completed 301 Moved Permanently in 2ms (ActiveRecord: 0.1ms)
838
+  (0.7ms) rollback transaction
839
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
840
+  (0.1ms) begin transaction
841
+  (0.1ms) rollback transaction
842
+  (0.0ms) begin transaction
843
+  (0.0ms) rollback transaction
844
+  (0.0ms) begin transaction
845
+  (0.0ms) rollback transaction
846
+  (0.0ms) begin transaction
847
+  (0.0ms) rollback transaction
848
+  (0.0ms) begin transaction
849
+  (0.1ms) SAVEPOINT active_record_1
850
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 16:35:55.901344"], ["updated_at", "2015-06-25 16:35:55.901344"]]
851
+  (0.0ms) RELEASE SAVEPOINT active_record_1
852
+ Processing by PathRewrite::PathController#rewrite as HTML
853
+ Parameters: {"path"=>"test"}
854
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
855
+ Redirecting /test to /captured from request http://test.host/test
856
+ Redirected to http://test.host/captured
857
+ Completed 301 Moved Permanently in 4ms (ActiveRecord: 0.1ms)
858
+  (6.5ms) rollback transaction
859
+  (0.0ms) begin transaction
860
+ Processing by PathRewrite::PathController#rewrite as HTML
861
+ Parameters: {"path"=>"non_translated_path"}
862
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
863
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
864
+  (0.1ms) rollback transaction
865
+  (0.0ms) begin transaction
866
+  (0.0ms) SAVEPOINT active_record_1
867
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 16:35:55.922878"], ["updated_at", "2015-06-25 16:35:55.922878"]]
868
+  (0.0ms) RELEASE SAVEPOINT active_record_1
869
+ PathRewrite::PathTranslation Load (0.0ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
870
+  (0.4ms) rollback transaction
871
+  (0.0ms) begin transaction
872
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
873
+  (0.0ms) rollback transaction
874
+  (0.0ms) begin transaction
875
+  (0.0ms) rollback transaction
876
+  (0.0ms) begin transaction
877
+  (0.0ms) rollback transaction
878
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
879
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
880
+  (0.1ms) begin transaction
881
+  (0.1ms) SAVEPOINT active_record_1
882
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 16:45:23.680110"], ["updated_at", "2015-06-25 16:45:23.680110"]]
883
+  (0.0ms) RELEASE SAVEPOINT active_record_1
884
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
885
+  (4.9ms) rollback transaction
886
+  (0.1ms) begin transaction
887
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
888
+  (0.0ms) rollback transaction
889
+  (0.0ms) begin transaction
890
+  (0.0ms) rollback transaction
891
+  (0.0ms) begin transaction
892
+  (0.0ms) rollback transaction
893
+  (0.0ms) begin transaction
894
+  (0.0ms) rollback transaction
895
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
896
+  (0.2ms) begin transaction
897
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
898
+  (0.1ms) rollback transaction
899
+  (0.1ms) begin transaction
900
+  (0.1ms) SAVEPOINT active_record_1
901
+ SQL (0.5ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 16:45:42.037110"], ["updated_at", "2015-06-25 16:45:42.037110"]]
902
+  (0.1ms) RELEASE SAVEPOINT active_record_1
903
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
904
+  (6.5ms) rollback transaction
905
+  (0.2ms) begin transaction
906
+  (0.1ms) rollback transaction
907
+  (0.1ms) begin transaction
908
+  (0.1ms) rollback transaction
909
+  (0.1ms) begin transaction
910
+  (0.1ms) rollback transaction
911
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
912
+  (0.2ms) begin transaction
913
+  (0.1ms) rollback transaction
914
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
915
+  (0.2ms) begin transaction
916
+  (0.3ms) rollback transaction
917
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
918
+  (0.1ms) begin transaction
919
+  (0.2ms) rollback transaction
920
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
921
+  (0.2ms) begin transaction
922
+  (0.2ms) rollback transaction
923
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
924
+  (0.2ms) begin transaction
925
+  (0.2ms) rollback transaction
926
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
927
+  (0.1ms) begin transaction
928
+  (0.1ms) rollback transaction
929
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
930
+  (0.1ms) begin transaction
931
+  (0.0ms) rollback transaction
932
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
933
+  (0.2ms) begin transaction
934
+  (0.2ms) rollback transaction
935
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
936
+  (0.2ms) begin transaction
937
+  (0.2ms) rollback transaction
938
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
939
+  (0.1ms) begin transaction
940
+  (0.1ms) rollback transaction
941
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
942
+  (0.2ms) begin transaction
943
+  (0.2ms) rollback transaction
944
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
945
+  (0.2ms) begin transaction
946
+  (0.2ms) rollback transaction
947
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
948
+  (0.2ms) begin transaction
949
+  (0.2ms) rollback transaction
950
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
951
+  (0.2ms) begin transaction
952
+  (0.2ms) rollback transaction
953
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
954
+  (0.2ms) begin transaction
955
+ PathRewrite::PathTranslation Load (0.3ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
956
+  (0.1ms) rollback transaction
957
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
958
+  (0.2ms) begin transaction
959
+ PathRewrite::PathTranslation Load (0.2ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
960
+  (0.1ms) rollback transaction
961
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
962
+  (0.1ms) begin transaction
963
+  (0.0ms) SAVEPOINT active_record_1
964
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
965
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 17:12:59.636609"], ["updated_at", "2015-06-25 17:12:59.636609"]]
966
+  (0.0ms) RELEASE SAVEPOINT active_record_1
967
+ Processing by PathRewrite::PathController#rewrite as HTML
968
+ Parameters: {"path"=>"test"}
969
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
970
+ Redirecting /test to /captured from request http://test.host/test
971
+ Redirected to http://test.host/captured
972
+ Completed 301 Moved Permanently in 4ms (ActiveRecord: 0.1ms)
973
+  (0.4ms) rollback transaction
974
+  (0.0ms) begin transaction
975
+ Processing by PathRewrite::PathController#rewrite as HTML
976
+ Parameters: {"path"=>"non_translated_path"}
977
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
978
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
979
+  (0.1ms) rollback transaction
980
+  (0.0ms) begin transaction
981
+  (0.0ms) rollback transaction
982
+  (0.0ms) begin transaction
983
+  (0.0ms) rollback transaction
984
+  (0.0ms) begin transaction
985
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
986
+  (0.0ms) rollback transaction
987
+  (0.0ms) begin transaction
988
+  (0.0ms) SAVEPOINT active_record_1
989
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
990
+ SQL (0.2ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 17:12:59.655604"], ["updated_at", "2015-06-25 17:12:59.655604"]]
991
+  (0.0ms) RELEASE SAVEPOINT active_record_1
992
+ PathRewrite::PathTranslation Load (0.0ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
993
+  (0.4ms) rollback transaction
994
+  (0.0ms) begin transaction
995
+  (0.0ms) rollback transaction
996
+  (0.0ms) begin transaction
997
+  (0.0ms) rollback transaction
998
+  (0.0ms) begin transaction
999
+  (0.0ms) rollback transaction
1000
+  (0.0ms) begin transaction
1001
+  (0.0ms) rollback transaction
1002
+  (0.0ms) begin transaction
1003
+  (0.0ms) rollback transaction
1004
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1005
+  (0.1ms) begin transaction
1006
+  (0.1ms) SAVEPOINT active_record_1
1007
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1008
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:14:54.847654"], ["updated_at", "2015-06-25 17:14:54.847654"]]
1009
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1010
+  (0.0ms) SAVEPOINT active_record_1
1011
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1012
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1013
+  (0.3ms) rollback transaction
1014
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1015
+  (0.1ms) begin transaction
1016
+  (0.1ms) SAVEPOINT active_record_1
1017
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1018
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:15:16.824704"], ["updated_at", "2015-06-25 17:15:16.824704"]]
1019
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1020
+  (0.0ms) SAVEPOINT active_record_1
1021
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1022
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1023
+  (0.5ms) rollback transaction
1024
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1025
+  (0.1ms) begin transaction
1026
+  (0.1ms) SAVEPOINT active_record_1
1027
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1028
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:15:33.705204"], ["updated_at", "2015-06-25 17:15:33.705204"]]
1029
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1030
+  (0.0ms) SAVEPOINT active_record_1
1031
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1032
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1033
+  (0.5ms) rollback transaction
1034
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1035
+  (0.1ms) begin transaction
1036
+  (0.1ms) rollback transaction
1037
+  (0.0ms) begin transaction
1038
+  (0.0ms) rollback transaction
1039
+  (0.0ms) begin transaction
1040
+  (0.1ms) rollback transaction
1041
+  (0.1ms) begin transaction
1042
+  (0.0ms) rollback transaction
1043
+  (0.1ms) begin transaction
1044
+  (0.1ms) SAVEPOINT active_record_1
1045
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1046
+ SQL (0.4ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:18:06.170025"], ["updated_at", "2015-06-25 17:18:06.170025"]]
1047
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1048
+  (0.0ms) SAVEPOINT active_record_1
1049
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1050
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1051
+  (0.3ms) rollback transaction
1052
+  (0.0ms) begin transaction
1053
+  (0.0ms) SAVEPOINT active_record_1
1054
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1055
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 17:18:06.183554"], ["updated_at", "2015-06-25 17:18:06.183554"]]
1056
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1057
+ Processing by PathRewrite::PathController#rewrite as HTML
1058
+ Parameters: {"path"=>"test"}
1059
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1060
+ Redirecting /test to /captured from request http://test.host/test
1061
+ Redirected to http://test.host/captured
1062
+ Completed 301 Moved Permanently in 4ms (ActiveRecord: 0.1ms)
1063
+  (0.4ms) rollback transaction
1064
+  (0.0ms) begin transaction
1065
+ Processing by PathRewrite::PathController#rewrite as HTML
1066
+ Parameters: {"path"=>"non_translated_path"}
1067
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
1068
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
1069
+  (0.1ms) rollback transaction
1070
+  (0.1ms) begin transaction
1071
+  (0.0ms) rollback transaction
1072
+  (0.0ms) begin transaction
1073
+  (0.0ms) rollback transaction
1074
+  (0.0ms) begin transaction
1075
+  (0.0ms) rollback transaction
1076
+  (0.0ms) begin transaction
1077
+  (0.0ms) SAVEPOINT active_record_1
1078
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1079
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 17:18:06.204942"], ["updated_at", "2015-06-25 17:18:06.204942"]]
1080
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1081
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1082
+  (0.4ms) rollback transaction
1083
+  (0.0ms) begin transaction
1084
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1085
+  (0.0ms) rollback transaction
1086
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1087
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1088
+  (1.2ms) CREATE TABLE "path_rewrite_path_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "old_path" varchar, "new_path" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1089
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
1090
+  (0.1ms) select sqlite_version(*)
1091
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1092
+  (0.1ms) SELECT version FROM "schema_migrations"
1093
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150618003028')
1094
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1095
+  (0.1ms) begin transaction
1096
+ PathRewrite::PathTranslation Load (0.3ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1097
+  (0.1ms) rollback transaction
1098
+  (0.1ms) begin transaction
1099
+  (0.1ms) SAVEPOINT active_record_1
1100
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1101
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 17:28:16.565257"], ["updated_at", "2015-06-25 17:28:16.565257"]]
1102
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1103
+ PathRewrite::PathTranslation Load (0.0ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1104
+  (0.5ms) rollback transaction
1105
+  (0.0ms) begin transaction
1106
+  (0.0ms) rollback transaction
1107
+  (0.0ms) begin transaction
1108
+  (0.0ms) rollback transaction
1109
+  (0.0ms) begin transaction
1110
+  (0.0ms) rollback transaction
1111
+  (0.0ms) begin transaction
1112
+  (0.0ms) SAVEPOINT active_record_1
1113
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1114
+ SQL (0.2ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:28:16.575342"], ["updated_at", "2015-06-25 17:28:16.575342"]]
1115
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1116
+  (0.0ms) SAVEPOINT active_record_1
1117
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1118
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1119
+  (0.5ms) rollback transaction
1120
+  (0.0ms) begin transaction
1121
+  (0.0ms) rollback transaction
1122
+  (0.0ms) begin transaction
1123
+  (0.0ms) rollback transaction
1124
+  (0.0ms) begin transaction
1125
+  (0.0ms) rollback transaction
1126
+  (0.0ms) begin transaction
1127
+  (0.0ms) rollback transaction
1128
+  (0.0ms) begin transaction
1129
+ Processing by PathRewrite::PathController#rewrite as HTML
1130
+ Parameters: {"path"=>"non_translated_path"}
1131
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
1132
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
1133
+  (0.1ms) rollback transaction
1134
+  (0.0ms) begin transaction
1135
+  (0.1ms) SAVEPOINT active_record_1
1136
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1137
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 17:28:16.596803"], ["updated_at", "2015-06-25 17:28:16.596803"]]
1138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1139
+ Processing by PathRewrite::PathController#rewrite as HTML
1140
+ Parameters: {"path"=>"test"}
1141
+ PathRewrite::PathTranslation Load (0.0ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1142
+ Redirecting /test to /captured from request http://test.host/test
1143
+ Redirected to http://test.host/captured
1144
+ Completed 301 Moved Permanently in 1ms (ActiveRecord: 0.0ms)
1145
+  (0.5ms) rollback transaction
1146
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1147
+  (0.1ms) begin transaction
1148
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1149
+  (0.0ms) rollback transaction
1150
+  (0.0ms) begin transaction
1151
+  (0.0ms) SAVEPOINT active_record_1
1152
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1153
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/redirected"], ["created_at", "2015-06-25 17:29:00.402749"], ["updated_at", "2015-06-25 17:29:00.402749"]]
1154
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1155
+ PathRewrite::PathTranslation Load (0.0ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1156
+  (6.5ms) rollback transaction
1157
+  (0.1ms) begin transaction
1158
+  (0.1ms) rollback transaction
1159
+  (0.5ms) begin transaction
1160
+  (0.1ms) rollback transaction
1161
+  (0.1ms) begin transaction
1162
+  (0.0ms) rollback transaction
1163
+  (0.1ms) begin transaction
1164
+  (0.0ms) SAVEPOINT active_record_1
1165
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1166
+ SQL (0.2ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "from"], ["new_path", "to"], ["created_at", "2015-06-25 17:29:00.419485"], ["updated_at", "2015-06-25 17:29:00.419485"]]
1167
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1168
+  (0.0ms) SAVEPOINT active_record_1
1169
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = 'from' LIMIT 1
1170
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1171
+  (0.4ms) rollback transaction
1172
+  (0.0ms) begin transaction
1173
+  (0.0ms) SAVEPOINT active_record_1
1174
+ PathRewrite::PathTranslation Exists (0.1ms) SELECT 1 AS one FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = '/test' LIMIT 1
1175
+ SQL (0.3ms) INSERT INTO "path_rewrite_path_translations" ("old_path", "new_path", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["old_path", "/test"], ["new_path", "/captured"], ["created_at", "2015-06-25 17:29:00.430758"], ["updated_at", "2015-06-25 17:29:00.430758"]]
1176
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1177
+ Processing by PathRewrite::PathController#rewrite as HTML
1178
+ Parameters: {"path"=>"test"}
1179
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/test"]]
1180
+ Redirecting /test to /captured from request http://test.host/test
1181
+ Redirected to http://test.host/captured
1182
+ Completed 301 Moved Permanently in 1ms (ActiveRecord: 0.1ms)
1183
+  (0.5ms) rollback transaction
1184
+  (0.0ms) begin transaction
1185
+ Processing by PathRewrite::PathController#rewrite as HTML
1186
+ Parameters: {"path"=>"non_translated_path"}
1187
+ PathRewrite::PathTranslation Load (0.1ms) SELECT "path_rewrite_path_translations".* FROM "path_rewrite_path_translations" WHERE "path_rewrite_path_translations"."old_path" = ? LIMIT 1 [["old_path", "/non_translated_path"]]
1188
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
1189
+  (0.0ms) rollback transaction
1190
+  (0.0ms) begin transaction
1191
+  (0.0ms) rollback transaction
1192
+  (0.0ms) begin transaction
1193
+  (0.0ms) rollback transaction
1194
+  (0.0ms) begin transaction
1195
+  (0.0ms) rollback transaction
1196
+  (0.0ms) begin transaction
1197
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: path_rewrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Tucker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -115,6 +115,7 @@ files:
115
115
  - lib/tasks/path_rewrite_tasks.rake
116
116
  - spec/controllers/path_rewrite/path_controller_spec.rb
117
117
  - spec/lib/path_rewrite/configuration_spec.rb
118
+ - spec/models/path_rewrite/path_translation_spec.rb
118
119
  - spec/rails_helper.rb
119
120
  - spec/rcov_exclude_list.rb
120
121
  - spec/routing/routes_spec.rb
@@ -186,6 +187,7 @@ summary: Mountable engine to support dynamic registration of application paths f
186
187
  test_files:
187
188
  - spec/controllers/path_rewrite/path_controller_spec.rb
188
189
  - spec/lib/path_rewrite/configuration_spec.rb
190
+ - spec/models/path_rewrite/path_translation_spec.rb
189
191
  - spec/rails_helper.rb
190
192
  - spec/rcov_exclude_list.rb
191
193
  - spec/routing/routes_spec.rb