routesjs-rails 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/routesjs/rails/version.rb +1 -1
- data/test/dummy/log/test.log +359 -0
- data/test/dummy/spec/teaspoon_env.rb +1 -1
- data/test/dummy/tmp/cache/assets/test/sprockets/1597598c873fec75c50410326d52dab7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5bdd912f192e505000c28dea42844491 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b5bfff8e2b7ddf0764244738df18fe7d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cea726b2a0ada8d0bf1754030bb4ded3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e4ea4e96ddd14ee81c3c72883cb23bd2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/eb41926965866a0bfed229b4a3ce9259 +0 -0
- data/test/javascripts/routesjs-rails_spec.coffee +50 -0
- data/test/javascripts/spec_helper.coffee +31 -0
- data/vendor/assets/javascripts/routesjs-rails.js.erb +65 -0
- metadata +18 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18a162ac90d8e08244858f15f07b4d90f8041f5
|
4
|
+
data.tar.gz: 57395a2009db1fd75326f37ec35e0b1d4b72821b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e42f19bf16cfbd5b27009de0317aaea877445daebafad3f94424c2bac59b12cba89de55bd84baf734ee30898c893af9796f6b51071fe9df14e23272fb6dc637
|
7
|
+
data.tar.gz: b3aa6ae22916d9d5b9b59ad7b0d13eb8671b76303f278a5e1b817fd8758e4ab88892ed3bd043e3d1b79086db6e26600e34c3ac901cec6d44f3459c15fcd7cfb0
|
data/test/dummy/log/test.log
CHANGED
@@ -1037,3 +1037,362 @@ close: 127.0.0.1:36572
|
|
1037
1037
|
close: 127.0.0.1:36569
|
1038
1038
|
going to shutdown ...
|
1039
1039
|
WEBrick::HTTPServer#start done.
|
1040
|
+
---------------------------------------------------------------------
|
1041
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1042
|
+
---------------------------------------------------------------------
|
1043
|
+
------------------------------------------------------------
|
1044
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1045
|
+
------------------------------------------------------------
|
1046
|
+
-----------------------------------------------------------
|
1047
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1048
|
+
-----------------------------------------------------------
|
1049
|
+
------------------------------------------------------------------------------
|
1050
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1051
|
+
------------------------------------------------------------------------------
|
1052
|
+
----------------------------------------------------------------------------------
|
1053
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1054
|
+
----------------------------------------------------------------------------------
|
1055
|
+
------------------------------------------------------------
|
1056
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1057
|
+
------------------------------------------------------------
|
1058
|
+
-----------------------------------------------------------
|
1059
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1060
|
+
-----------------------------------------------------------
|
1061
|
+
WEBrick 1.3.1
|
1062
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1063
|
+
Rack::Handler::WEBrick is mounted on /.
|
1064
|
+
WEBrick::HTTPServer#start: pid=2525 port=33438
|
1065
|
+
accept: 127.0.0.1:44171
|
1066
|
+
close: 127.0.0.1:44171
|
1067
|
+
accept: 127.0.0.1:44172
|
1068
|
+
Rack::Handler::WEBrick is invoked.
|
1069
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 14:48:44 +0000
|
1070
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1071
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1072
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (284.7ms)
|
1073
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (306.5ms)
|
1074
|
+
Completed 500 Internal Server Error in 315ms
|
1075
|
+
close: 127.0.0.1:44172
|
1076
|
+
going to shutdown ...
|
1077
|
+
WEBrick::HTTPServer#start done.
|
1078
|
+
------------------------------------------------------------
|
1079
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1080
|
+
------------------------------------------------------------
|
1081
|
+
-----------------------------------------------------------
|
1082
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1083
|
+
-----------------------------------------------------------
|
1084
|
+
------------------------------------------------------------------------------
|
1085
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1086
|
+
------------------------------------------------------------------------------
|
1087
|
+
----------------------------------------------------------------------------------
|
1088
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1089
|
+
----------------------------------------------------------------------------------
|
1090
|
+
------------------------------------------------------------
|
1091
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1092
|
+
------------------------------------------------------------
|
1093
|
+
-----------------------------------------------------------
|
1094
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1095
|
+
-----------------------------------------------------------
|
1096
|
+
---------------------------------------------------------------------
|
1097
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1098
|
+
---------------------------------------------------------------------
|
1099
|
+
WEBrick 1.3.1
|
1100
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1101
|
+
Rack::Handler::WEBrick is mounted on /.
|
1102
|
+
WEBrick::HTTPServer#start: pid=2694 port=43398
|
1103
|
+
accept: 127.0.0.1:59848
|
1104
|
+
close: 127.0.0.1:59848
|
1105
|
+
accept: 127.0.0.1:59849
|
1106
|
+
Rack::Handler::WEBrick is invoked.
|
1107
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1108
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1109
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1110
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (24.6ms)
|
1111
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_body.html.erb (0.4ms)
|
1112
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (38.4ms)
|
1113
|
+
Completed 200 OK in 43ms (Views: 42.6ms)
|
1114
|
+
Rack::Handler::WEBrick is invoked.
|
1115
|
+
Started GET "/assets/teaspoon.css" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1116
|
+
accept: 127.0.0.1:59854
|
1117
|
+
Rack::Handler::WEBrick is invoked.
|
1118
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1119
|
+
accept: 127.0.0.1:59853
|
1120
|
+
Rack::Handler::WEBrick is invoked.
|
1121
|
+
Started GET "/assets/routesjs-rails.js?body=1" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1122
|
+
accept: 127.0.0.1:59852
|
1123
|
+
Rack::Handler::WEBrick is invoked.
|
1124
|
+
Started GET "/assets/support/bind-poly.js?body=1" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1125
|
+
accept: 127.0.0.1:59850
|
1126
|
+
Rack::Handler::WEBrick is invoked.
|
1127
|
+
Started GET "/assets/jasmine/1.3.1.js" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1128
|
+
Rack::Handler::WEBrick is invoked.
|
1129
|
+
Started GET "/assets/routesjs-rails_spec.js?body=1" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1130
|
+
Rack::Handler::WEBrick is invoked.
|
1131
|
+
Started GET "/assets/spec_helper.js?body=1" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1132
|
+
accept: 127.0.0.1:59851
|
1133
|
+
Rack::Handler::WEBrick is invoked.
|
1134
|
+
Started GET "/assets/teaspoon-jasmine.js" for 127.0.0.1 at 2014-09-19 14:56:54 +0000
|
1135
|
+
close: 127.0.0.1:59849
|
1136
|
+
close: 127.0.0.1:59850
|
1137
|
+
close: 127.0.0.1:59852
|
1138
|
+
close: 127.0.0.1:59851
|
1139
|
+
close: 127.0.0.1:59854
|
1140
|
+
close: 127.0.0.1:59853
|
1141
|
+
going to shutdown ...
|
1142
|
+
WEBrick::HTTPServer#start done.
|
1143
|
+
---------------------------------------------------------------------
|
1144
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1145
|
+
---------------------------------------------------------------------
|
1146
|
+
------------------------------------------------------------
|
1147
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1148
|
+
------------------------------------------------------------
|
1149
|
+
-----------------------------------------------------------
|
1150
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1151
|
+
-----------------------------------------------------------
|
1152
|
+
------------------------------------------------------------------------------
|
1153
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1154
|
+
------------------------------------------------------------------------------
|
1155
|
+
----------------------------------------------------------------------------------
|
1156
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1157
|
+
----------------------------------------------------------------------------------
|
1158
|
+
------------------------------------------------------------
|
1159
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1160
|
+
------------------------------------------------------------
|
1161
|
+
-----------------------------------------------------------
|
1162
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1163
|
+
-----------------------------------------------------------
|
1164
|
+
WEBrick 1.3.1
|
1165
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1166
|
+
Rack::Handler::WEBrick is mounted on /.
|
1167
|
+
WEBrick::HTTPServer#start: pid=2741 port=47574
|
1168
|
+
accept: 127.0.0.1:35064
|
1169
|
+
close: 127.0.0.1:35064
|
1170
|
+
accept: 127.0.0.1:35065
|
1171
|
+
Rack::Handler::WEBrick is invoked.
|
1172
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1173
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1174
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1175
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (134.4ms)
|
1176
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_body.html.erb (0.4ms)
|
1177
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (147.0ms)
|
1178
|
+
Completed 200 OK in 152ms (Views: 151.4ms)
|
1179
|
+
accept: 127.0.0.1:35070
|
1180
|
+
Rack::Handler::WEBrick is invoked.
|
1181
|
+
Started GET "/assets/teaspoon-jasmine.js" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1182
|
+
accept: 127.0.0.1:35069
|
1183
|
+
Rack::Handler::WEBrick is invoked.
|
1184
|
+
Started GET "/assets/jasmine/1.3.1.js" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1185
|
+
Rack::Handler::WEBrick is invoked.
|
1186
|
+
Started GET "/assets/teaspoon.css" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1187
|
+
accept: 127.0.0.1:35068
|
1188
|
+
accept: 127.0.0.1:35067
|
1189
|
+
Rack::Handler::WEBrick is invoked.
|
1190
|
+
Started GET "/assets/routesjs-rails.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1191
|
+
Rack::Handler::WEBrick is invoked.
|
1192
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1193
|
+
Rack::Handler::WEBrick is invoked.
|
1194
|
+
Started GET "/assets/spec_helper.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1195
|
+
accept: 127.0.0.1:35066
|
1196
|
+
Rack::Handler::WEBrick is invoked.
|
1197
|
+
Started GET "/assets/support/bind-poly.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:17 +0000
|
1198
|
+
close: 127.0.0.1:35065
|
1199
|
+
close: 127.0.0.1:35068
|
1200
|
+
close: 127.0.0.1:35070
|
1201
|
+
close: 127.0.0.1:35069
|
1202
|
+
close: 127.0.0.1:35067
|
1203
|
+
close: 127.0.0.1:35066
|
1204
|
+
going to shutdown ...
|
1205
|
+
WEBrick::HTTPServer#start done.
|
1206
|
+
------------------------------------------------------------
|
1207
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1208
|
+
------------------------------------------------------------
|
1209
|
+
-----------------------------------------------------------
|
1210
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1211
|
+
-----------------------------------------------------------
|
1212
|
+
------------------------------------------------------------------------------
|
1213
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1214
|
+
------------------------------------------------------------------------------
|
1215
|
+
----------------------------------------------------------------------------------
|
1216
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1217
|
+
----------------------------------------------------------------------------------
|
1218
|
+
------------------------------------------------------------
|
1219
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1220
|
+
------------------------------------------------------------
|
1221
|
+
-----------------------------------------------------------
|
1222
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1223
|
+
-----------------------------------------------------------
|
1224
|
+
---------------------------------------------------------------------
|
1225
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1226
|
+
---------------------------------------------------------------------
|
1227
|
+
WEBrick 1.3.1
|
1228
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1229
|
+
Rack::Handler::WEBrick is mounted on /.
|
1230
|
+
WEBrick::HTTPServer#start: pid=2790 port=42065
|
1231
|
+
accept: 127.0.0.1:36419
|
1232
|
+
close: 127.0.0.1:36419
|
1233
|
+
accept: 127.0.0.1:36420
|
1234
|
+
Rack::Handler::WEBrick is invoked.
|
1235
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1236
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1237
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1238
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (9.9ms)
|
1239
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_body.html.erb (0.3ms)
|
1240
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (21.8ms)
|
1241
|
+
Completed 200 OK in 26ms (Views: 25.9ms)
|
1242
|
+
accept: 127.0.0.1:36425
|
1243
|
+
Rack::Handler::WEBrick is invoked.
|
1244
|
+
Started GET "/assets/teaspoon.css" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1245
|
+
Rack::Handler::WEBrick is invoked.
|
1246
|
+
Started GET "/assets/teaspoon-jasmine.js" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1247
|
+
accept: 127.0.0.1:36422
|
1248
|
+
Rack::Handler::WEBrick is invoked.
|
1249
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1250
|
+
Rack::Handler::WEBrick is invoked.
|
1251
|
+
Started GET "/assets/spec_helper.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1252
|
+
accept: 127.0.0.1:36424
|
1253
|
+
accept: 127.0.0.1:36423
|
1254
|
+
Rack::Handler::WEBrick is invoked.
|
1255
|
+
Started GET "/assets/jasmine/1.3.1.js" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1256
|
+
Rack::Handler::WEBrick is invoked.
|
1257
|
+
Started GET "/assets/routesjs-rails.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1258
|
+
accept: 127.0.0.1:36421
|
1259
|
+
Rack::Handler::WEBrick is invoked.
|
1260
|
+
Started GET "/assets/support/bind-poly.js?body=1" for 127.0.0.1 at 2014-09-19 14:57:56 +0000
|
1261
|
+
close: 127.0.0.1:36421
|
1262
|
+
close: 127.0.0.1:36422
|
1263
|
+
close: 127.0.0.1:36420
|
1264
|
+
close: 127.0.0.1:36424
|
1265
|
+
close: 127.0.0.1:36425
|
1266
|
+
close: 127.0.0.1:36423
|
1267
|
+
going to shutdown ...
|
1268
|
+
WEBrick::HTTPServer#start done.
|
1269
|
+
------------------------------------------------------------
|
1270
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1271
|
+
------------------------------------------------------------
|
1272
|
+
-----------------------------------------------------------
|
1273
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1274
|
+
-----------------------------------------------------------
|
1275
|
+
------------------------------------------------------------------------------
|
1276
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1277
|
+
------------------------------------------------------------------------------
|
1278
|
+
----------------------------------------------------------------------------------
|
1279
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1280
|
+
----------------------------------------------------------------------------------
|
1281
|
+
------------------------------------------------------------
|
1282
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1283
|
+
------------------------------------------------------------
|
1284
|
+
-----------------------------------------------------------
|
1285
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1286
|
+
-----------------------------------------------------------
|
1287
|
+
---------------------------------------------------------------------
|
1288
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1289
|
+
---------------------------------------------------------------------
|
1290
|
+
WEBrick 1.3.1
|
1291
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1292
|
+
Rack::Handler::WEBrick is mounted on /.
|
1293
|
+
WEBrick::HTTPServer#start: pid=2836 port=36621
|
1294
|
+
accept: 127.0.0.1:47237
|
1295
|
+
close: 127.0.0.1:47237
|
1296
|
+
accept: 127.0.0.1:47238
|
1297
|
+
Rack::Handler::WEBrick is invoked.
|
1298
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1299
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1300
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1301
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (144.9ms)
|
1302
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_body.html.erb (0.4ms)
|
1303
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (157.5ms)
|
1304
|
+
Completed 200 OK in 162ms (Views: 161.7ms)
|
1305
|
+
accept: 127.0.0.1:47240
|
1306
|
+
accept: 127.0.0.1:47239
|
1307
|
+
Rack::Handler::WEBrick is invoked.
|
1308
|
+
Started GET "/assets/teaspoon.css" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1309
|
+
Rack::Handler::WEBrick is invoked.
|
1310
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1311
|
+
accept: 127.0.0.1:47241
|
1312
|
+
Rack::Handler::WEBrick is invoked.
|
1313
|
+
Started GET "/assets/support/bind-poly.js?body=1" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1314
|
+
Rack::Handler::WEBrick is invoked.
|
1315
|
+
Started GET "/assets/routesjs-rails.js?body=1" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1316
|
+
Rack::Handler::WEBrick is invoked.
|
1317
|
+
Started GET "/assets/spec_helper.js?body=1" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1318
|
+
Rack::Handler::WEBrick is invoked.
|
1319
|
+
Started GET "/assets/routesjs-rails_spec.js?body=1" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1320
|
+
accept: 127.0.0.1:47243
|
1321
|
+
Rack::Handler::WEBrick is invoked.
|
1322
|
+
Started GET "/assets/teaspoon-jasmine.js" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1323
|
+
accept: 127.0.0.1:47242
|
1324
|
+
Rack::Handler::WEBrick is invoked.
|
1325
|
+
Started GET "/assets/jasmine/1.3.1.js" for 127.0.0.1 at 2014-09-19 14:58:28 +0000
|
1326
|
+
close: 127.0.0.1:47243
|
1327
|
+
close: 127.0.0.1:47242
|
1328
|
+
close: 127.0.0.1:47238
|
1329
|
+
close: 127.0.0.1:47240
|
1330
|
+
close: 127.0.0.1:47239
|
1331
|
+
close: 127.0.0.1:47241
|
1332
|
+
going to shutdown ...
|
1333
|
+
WEBrick::HTTPServer#start done.
|
1334
|
+
------------------------------------------------------------
|
1335
|
+
RoutesJS::FormatterTest: test_hand_coded_URLs_are_left_as_is
|
1336
|
+
------------------------------------------------------------
|
1337
|
+
-----------------------------------------------------------
|
1338
|
+
RoutesJS::FormatterTest: test_named_redirects_are_supported
|
1339
|
+
-----------------------------------------------------------
|
1340
|
+
------------------------------------------------------------------------------
|
1341
|
+
RoutesJS::FormatterTest: test_named_redirects_within_a_namespace_are_supported
|
1342
|
+
------------------------------------------------------------------------------
|
1343
|
+
----------------------------------------------------------------------------------
|
1344
|
+
RoutesJS::FormatterTest: test_namespaced_routes_include_the_namespace_in_the_route
|
1345
|
+
----------------------------------------------------------------------------------
|
1346
|
+
------------------------------------------------------------
|
1347
|
+
RoutesJS::FormatterTest: test_only_named_routes_are_included
|
1348
|
+
------------------------------------------------------------
|
1349
|
+
-----------------------------------------------------------
|
1350
|
+
RoutesJS::FormatterTest: test_result_is_a_valid_JSON_object
|
1351
|
+
-----------------------------------------------------------
|
1352
|
+
---------------------------------------------------------------------
|
1353
|
+
RoutesJS::RoutesTest: test_routes_are_rendered_as_a_valid_json_object
|
1354
|
+
---------------------------------------------------------------------
|
1355
|
+
WEBrick 1.3.1
|
1356
|
+
ruby 2.1.2 (2014-05-08) [x86_64-linux]
|
1357
|
+
Rack::Handler::WEBrick is mounted on /.
|
1358
|
+
WEBrick::HTTPServer#start: pid=3615 port=35704
|
1359
|
+
accept: 127.0.0.1:40727
|
1360
|
+
close: 127.0.0.1:40727
|
1361
|
+
accept: 127.0.0.1:40728
|
1362
|
+
Rack::Handler::WEBrick is invoked.
|
1363
|
+
Started GET "/teaspoon/default?reporter=Console" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1364
|
+
Processing by Teaspoon::SuiteController#show as HTML
|
1365
|
+
Parameters: {"reporter"=>"Console", "suite"=>"default"}
|
1366
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_boot.html.erb (12.9ms)
|
1367
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/_body.html.erb (0.3ms)
|
1368
|
+
Rendered /home/vagrant/Code/routesjs_rails/vendor/bundle/gems/teaspoon-0.8.0/app/views/teaspoon/suite/show.html.erb (27.2ms)
|
1369
|
+
Completed 200 OK in 32ms (Views: 31.4ms)
|
1370
|
+
accept: 127.0.0.1:40732
|
1371
|
+
accept: 127.0.0.1:40731
|
1372
|
+
Rack::Handler::WEBrick is invoked.
|
1373
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1374
|
+
Rack::Handler::WEBrick is invoked.
|
1375
|
+
Started GET "/assets/jasmine/1.3.1.js" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1376
|
+
Rack::Handler::WEBrick is invoked.
|
1377
|
+
Rack::Handler::WEBrick is invoked.
|
1378
|
+
Started GET "/assets/spec_helper.js?body=1" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1379
|
+
accept: 127.0.0.1:40730
|
1380
|
+
Rack::Handler::WEBrick is invoked.
|
1381
|
+
Started GET "/assets/teaspoon-jasmine.js" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1382
|
+
Started GET "/assets/teaspoon.css" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1383
|
+
Rack::Handler::WEBrick is invoked.
|
1384
|
+
Started GET "/assets/routesjs-rails_spec.js?body=1" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1385
|
+
accept: 127.0.0.1:40729
|
1386
|
+
Rack::Handler::WEBrick is invoked.
|
1387
|
+
Started GET "/assets/support/bind-poly.js?body=1" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1388
|
+
accept: 127.0.0.1:40733
|
1389
|
+
Rack::Handler::WEBrick is invoked.
|
1390
|
+
Started GET "/assets/routesjs-rails.js?body=1" for 127.0.0.1 at 2014-09-19 15:05:33 +0000
|
1391
|
+
close: 127.0.0.1:40729
|
1392
|
+
close: 127.0.0.1:40733
|
1393
|
+
close: 127.0.0.1:40731
|
1394
|
+
close: 127.0.0.1:40728
|
1395
|
+
close: 127.0.0.1:40732
|
1396
|
+
close: 127.0.0.1:40730
|
1397
|
+
going to shutdown ...
|
1398
|
+
WEBrick::HTTPServer#start done.
|
@@ -46,7 +46,7 @@ Teaspoon.configure do |config|
|
|
46
46
|
|
47
47
|
# Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
|
48
48
|
# files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
|
49
|
-
|
49
|
+
suite.matcher = "{test/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
|
50
50
|
|
51
51
|
# This suites spec helper, which can require additional support files. This file is loaded before any of your test
|
52
52
|
# files are loaded.
|
@@ -0,0 +1,50 @@
|
|
1
|
+
describe "Routes", ->
|
2
|
+
beforeEach ->
|
3
|
+
Routes.setBaseUrl("//example.com/")
|
4
|
+
|
5
|
+
describe "simple path and url generation", ->
|
6
|
+
beforeEach ->
|
7
|
+
Routes.initRoutes
|
8
|
+
"oauthToken": "/oauth/token"
|
9
|
+
"adminRoot": "/admin"
|
10
|
+
|
11
|
+
it "makes a path function for each route", ->
|
12
|
+
expect(Routes.oauthTokenPath()).toBe("/oauth/token")
|
13
|
+
expect(Routes.adminRootPath()).toBe("/admin")
|
14
|
+
|
15
|
+
it "makes a url function for each route", ->
|
16
|
+
expect(Routes.oauthTokenUrl()).toBe("//example.com/oauth/token")
|
17
|
+
expect(Routes.adminRootUrl()).toBe("//example.com/admin")
|
18
|
+
|
19
|
+
describe "token replacement with object", ->
|
20
|
+
beforeEach ->
|
21
|
+
Routes.initRoutes
|
22
|
+
"user": "/users/:id"
|
23
|
+
"userRoles": "/users/:id/roles"
|
24
|
+
"userRole": "/users/:id/roles/:role_id"
|
25
|
+
|
26
|
+
it "replaces tokens with values from object", ->
|
27
|
+
user =
|
28
|
+
id: 1
|
29
|
+
role_id: 2
|
30
|
+
|
31
|
+
expect(Routes.userPath(user)).toBe("/users/1")
|
32
|
+
expect(Routes.userRolesPath(user)).toBe("/users/1/roles")
|
33
|
+
expect(Routes.userRoleUrl(user)).toBe("//example.com/users/1/roles/2")
|
34
|
+
|
35
|
+
describe "token replacement with arguments", ->
|
36
|
+
beforeEach ->
|
37
|
+
Routes.initRoutes
|
38
|
+
"root": "/"
|
39
|
+
"user": "/users/:id"
|
40
|
+
"userRole": "/users/:id/roles/:role_id"
|
41
|
+
|
42
|
+
it "replaces tokens with ordered arguments", ->
|
43
|
+
expect(Routes.userPath(1)).toBe("/users/1")
|
44
|
+
expect(Routes.userRoleUrl(1, "admin")).toBe("//example.com/users/1/roles/admin")
|
45
|
+
|
46
|
+
it "ignores extra arguments", ->
|
47
|
+
expect(Routes.userPath(1, "this", 2, "be", "ignored")).toBe("/users/1")
|
48
|
+
|
49
|
+
it "returns the unmodified route when no tokens are found", ->
|
50
|
+
expect(Routes.rootPath(1, 2)).toBe("/")
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Teaspoon includes some support files, but you can use anything from your own support path too.
|
2
|
+
# require support/jasmine-jquery-1.7.0
|
3
|
+
# require support/jasmine-jquery-2.0.0
|
4
|
+
# require support/sinon
|
5
|
+
# require support/your-support-file
|
6
|
+
#
|
7
|
+
# PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
|
8
|
+
# Use this polyfill to avoid the confusion.
|
9
|
+
#= require support/bind-poly
|
10
|
+
#
|
11
|
+
# Deferring execution
|
12
|
+
# If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
|
13
|
+
# Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
|
14
|
+
#
|
15
|
+
# Teaspoon.defer = true
|
16
|
+
# setTimeout(Teaspoon.execute, 1000)
|
17
|
+
#
|
18
|
+
# Matching files
|
19
|
+
# By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
|
20
|
+
# spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
|
21
|
+
# configuration in config/initializers/teaspoon.rb
|
22
|
+
#
|
23
|
+
# Manifest
|
24
|
+
# If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
|
25
|
+
# the configuration and use this file as a manifest.
|
26
|
+
#
|
27
|
+
# For more information: http://github.com/modeset/teaspoon
|
28
|
+
#
|
29
|
+
# You can require your own javascript files here. By default this will include everything in application, however you
|
30
|
+
# may get better load performance if you require the specific files that are being used in the spec that tests them.
|
31
|
+
#= require application
|
@@ -0,0 +1,65 @@
|
|
1
|
+
var Routes = (function(railsRoutes) {
|
2
|
+
var BASE_URL = document.location.protocol +"//" + document.location.host;
|
3
|
+
var PARAM_PATTERN = /:[^\/$]+(\/|$)/
|
4
|
+
|
5
|
+
var addRoute = function(name, path) {
|
6
|
+
RouteSet[name +"Path"] = function() {
|
7
|
+
return buildRoute(path, arguments);
|
8
|
+
};
|
9
|
+
|
10
|
+
RouteSet[name +"Url"] = function() {
|
11
|
+
return buildRoute(BASE_URL + path, arguments);
|
12
|
+
};
|
13
|
+
};
|
14
|
+
|
15
|
+
var buildRoute = function(route, args) {
|
16
|
+
if (!(args && args.length)) return route;
|
17
|
+
if (!PARAM_PATTERN.test(route)) return route;
|
18
|
+
|
19
|
+
if(args.length === 1 && args[0] instanceof Object) {
|
20
|
+
return buildRouteWithObject(route, args[0]);
|
21
|
+
} else {
|
22
|
+
return buildRouteWithValues(route, args);
|
23
|
+
}
|
24
|
+
};
|
25
|
+
|
26
|
+
var buildRouteWithObject = function(route, fromObject) {
|
27
|
+
var token = null, key = null;
|
28
|
+
var tokens = Object.keys(fromObject);
|
29
|
+
|
30
|
+
for (var i = 0; i < tokens.length; i++) {
|
31
|
+
key = tokens[i];
|
32
|
+
token = fromObject[key].toString();
|
33
|
+
route = route.replace(RegExp(":" + key.toString()), token);
|
34
|
+
}
|
35
|
+
|
36
|
+
return route;
|
37
|
+
};
|
38
|
+
|
39
|
+
var buildRouteWithValues = function(route, values) {
|
40
|
+
var param = null;
|
41
|
+
|
42
|
+
while (PARAM_PATTERN.test(route) && values.length) {
|
43
|
+
param = [].shift.call(values).toString();
|
44
|
+
route = route.replace(PARAM_PATTERN, param + "$1");
|
45
|
+
}
|
46
|
+
|
47
|
+
return route;
|
48
|
+
};
|
49
|
+
|
50
|
+
var RouteSet = {
|
51
|
+
setBaseUrl: function(protocol_and_host) {
|
52
|
+
BASE_URL = protocol_and_host.replace(/\/$/, "");
|
53
|
+
},
|
54
|
+
initRoutes: function(routes) {
|
55
|
+
Object.keys(routes).map(function(key) {
|
56
|
+
addRoute(key, routes[key]);
|
57
|
+
});
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
61
|
+
RouteSet.initRoutes(railsRoutes);
|
62
|
+
return RouteSet;
|
63
|
+
})(<%= RoutesJS::Routes.as_json %>);
|
64
|
+
|
65
|
+
window.Routes = Routes;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routesjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Muto
|
@@ -117,31 +117,40 @@ files:
|
|
117
117
|
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
118
118
|
- test/dummy/tmp/cache/assets/test/sprockets/06fe8c2fd8e66b4605fb8720f6f01fa1
|
119
119
|
- test/dummy/tmp/cache/assets/test/sprockets/1015a631e7a66a0b078c820da841a4dc
|
120
|
+
- test/dummy/tmp/cache/assets/test/sprockets/1597598c873fec75c50410326d52dab7
|
120
121
|
- test/dummy/tmp/cache/assets/test/sprockets/1ef842e27a58c8d5c6c766a808769124
|
121
122
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
122
123
|
- test/dummy/tmp/cache/assets/test/sprockets/38f92cfa1698a8913703ad40c946b0a5
|
123
124
|
- test/dummy/tmp/cache/assets/test/sprockets/4f69580262ad653bc0809da19ad82711
|
124
125
|
- test/dummy/tmp/cache/assets/test/sprockets/57f13cf7825213c3b1df69a76df722a9
|
125
126
|
- test/dummy/tmp/cache/assets/test/sprockets/58c347f7e5c0045579ef085f41ae6d56
|
127
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5bdd912f192e505000c28dea42844491
|
126
128
|
- test/dummy/tmp/cache/assets/test/sprockets/6a2ef5706e101143d91085f790648f13
|
127
129
|
- test/dummy/tmp/cache/assets/test/sprockets/6b41edb1d59348fc5f5a9be9e0070ba3
|
128
130
|
- test/dummy/tmp/cache/assets/test/sprockets/7cfb78f56f62208e304eaee5a4687ff5
|
129
131
|
- test/dummy/tmp/cache/assets/test/sprockets/9487c761e1ddfe7509f566400379f444
|
130
132
|
- test/dummy/tmp/cache/assets/test/sprockets/9c8ef791c17d2b3f0a26d187f1c5cd88
|
131
133
|
- test/dummy/tmp/cache/assets/test/sprockets/a70550f1a2c27e11c3188a48c01170f3
|
134
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b5bfff8e2b7ddf0764244738df18fe7d
|
132
135
|
- test/dummy/tmp/cache/assets/test/sprockets/bc499c125dd2de53421b8a948c8777ee
|
133
136
|
- test/dummy/tmp/cache/assets/test/sprockets/bf36f67f2b6fbdcfe8d00c090481e768
|
137
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cea726b2a0ada8d0bf1754030bb4ded3
|
134
138
|
- test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
|
135
139
|
- test/dummy/tmp/cache/assets/test/sprockets/dca3f6a70d551aa519687c2fccd97176
|
136
140
|
- test/dummy/tmp/cache/assets/test/sprockets/e280b920f9f8a02070c974eba18074c1
|
137
141
|
- test/dummy/tmp/cache/assets/test/sprockets/e2e6a86be7c636f28c9b0311d987720a
|
138
142
|
- test/dummy/tmp/cache/assets/test/sprockets/e45a5d1eb39ff43af7c681e2a271a726
|
143
|
+
- test/dummy/tmp/cache/assets/test/sprockets/e4ea4e96ddd14ee81c3c72883cb23bd2
|
139
144
|
- test/dummy/tmp/cache/assets/test/sprockets/e98bc73f3afc0368fc3c110e3305bb6e
|
145
|
+
- test/dummy/tmp/cache/assets/test/sprockets/eb41926965866a0bfed229b4a3ce9259
|
140
146
|
- test/dummy/tmp/cache/assets/test/sprockets/ebfb2f47de67d2be33a5117afe306e80
|
141
147
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
148
|
+
- test/javascripts/routesjs-rails_spec.coffee
|
149
|
+
- test/javascripts/spec_helper.coffee
|
142
150
|
- test/routesjs/formatter_test.rb
|
143
151
|
- test/routesjs/routes_test.rb
|
144
152
|
- test/test_helper.rb
|
153
|
+
- vendor/assets/javascripts/routesjs-rails.js.erb
|
145
154
|
homepage: https://github.com/pseudomuto/routesjs-rails
|
146
155
|
licenses:
|
147
156
|
- MIT
|
@@ -237,18 +246,24 @@ test_files:
|
|
237
246
|
- test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
238
247
|
- test/dummy/tmp/cache/assets/development/sprockets/c09b0ea3f4c777394e24f505d23d6324
|
239
248
|
- test/dummy/tmp/cache/assets/development/sprockets/e45a5d1eb39ff43af7c681e2a271a726
|
249
|
+
- test/dummy/tmp/cache/assets/test/sprockets/1597598c873fec75c50410326d52dab7
|
240
250
|
- test/dummy/tmp/cache/assets/test/sprockets/58c347f7e5c0045579ef085f41ae6d56
|
241
251
|
- test/dummy/tmp/cache/assets/test/sprockets/e98bc73f3afc0368fc3c110e3305bb6e
|
252
|
+
- test/dummy/tmp/cache/assets/test/sprockets/cea726b2a0ada8d0bf1754030bb4ded3
|
242
253
|
- test/dummy/tmp/cache/assets/test/sprockets/dca3f6a70d551aa519687c2fccd97176
|
243
254
|
- test/dummy/tmp/cache/assets/test/sprockets/57f13cf7825213c3b1df69a76df722a9
|
255
|
+
- test/dummy/tmp/cache/assets/test/sprockets/5bdd912f192e505000c28dea42844491
|
244
256
|
- test/dummy/tmp/cache/assets/test/sprockets/ebfb2f47de67d2be33a5117afe306e80
|
257
|
+
- test/dummy/tmp/cache/assets/test/sprockets/e4ea4e96ddd14ee81c3c72883cb23bd2
|
245
258
|
- test/dummy/tmp/cache/assets/test/sprockets/6b41edb1d59348fc5f5a9be9e0070ba3
|
246
259
|
- test/dummy/tmp/cache/assets/test/sprockets/06fe8c2fd8e66b4605fb8720f6f01fa1
|
247
260
|
- test/dummy/tmp/cache/assets/test/sprockets/bf36f67f2b6fbdcfe8d00c090481e768
|
261
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b5bfff8e2b7ddf0764244738df18fe7d
|
248
262
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
249
263
|
- test/dummy/tmp/cache/assets/test/sprockets/38f92cfa1698a8913703ad40c946b0a5
|
250
264
|
- test/dummy/tmp/cache/assets/test/sprockets/7cfb78f56f62208e304eaee5a4687ff5
|
251
265
|
- test/dummy/tmp/cache/assets/test/sprockets/e280b920f9f8a02070c974eba18074c1
|
266
|
+
- test/dummy/tmp/cache/assets/test/sprockets/eb41926965866a0bfed229b4a3ce9259
|
252
267
|
- test/dummy/tmp/cache/assets/test/sprockets/4f69580262ad653bc0809da19ad82711
|
253
268
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
254
269
|
- test/dummy/tmp/cache/assets/test/sprockets/bc499c125dd2de53421b8a948c8777ee
|
@@ -268,3 +283,5 @@ test_files:
|
|
268
283
|
- test/dummy/public/500.html
|
269
284
|
- test/routesjs/formatter_test.rb
|
270
285
|
- test/routesjs/routes_test.rb
|
286
|
+
- test/javascripts/routesjs-rails_spec.coffee
|
287
|
+
- test/javascripts/spec_helper.coffee
|