actionpack-direct_routes 0.2.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89701bacada4a996ccac6559e646f16076e37844
4
- data.tar.gz: f57814f01be6a26acd88d2fcbb8262b8c74b0cc4
3
+ metadata.gz: ccc5f1672e2b3dec8b0ebcf2d5db0b55605809cb
4
+ data.tar.gz: 214a93f522ca73f42893e74a5186dfe85848aaff
5
5
  SHA512:
6
- metadata.gz: 96af7efb398c1d54bd5aa732a8397bc65963da5712f38157e52b88793dba6999e0e6cf4c8505b3db1294cd49c40799868fb32adb827e389816cc6996b7d63cc9
7
- data.tar.gz: ef73278154f31252693c8ee83ea6236d1d96c27e670de23160b31cd9c6604ed9d5495aeeb97aea9da8f00371cf2f3dd0997cf426c5588d24c0952b9fe07f959f
6
+ metadata.gz: 9613b751b5c34a1809ce3f0b79dfd379ce1dd87f84670fcf9c544848f553f53dd402cf528ef8763915354e4f4c37b95fab4d9bddd1d5f87c01ea666c6686518d
7
+ data.tar.gz: f7911bff1ff3db61b987b325e3cdfcec456addf0431954f727317245f40aa2a1d0fcd3b33d6f10c8893117cef221e283fe0e161f0b0478fcab18e667dd082a47
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/actionpack-direct_routes.svg)](https://badge.fury.io/rb/actionpack-direct_routes)
2
- [![Build Status](https://travis-ci.org/hamuyuuki/actionpack-direct_routes.svg?branch=master)](https://travis-ci.org/hamuyuuki/actionpack-direct_routes)
2
+ [![Build Status](https://travis-ci.com/hamuyuuki/actionpack-direct_routes.svg?branch=master)](https://travis-ci.com/hamuyuuki/actionpack-direct_routes)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/37a26fb3d2dbec167997/maintainability)](https://codeclimate.com/github/hamuyuuki/actionpack-direct_routes/maintainability)
4
4
  [![Test Coverage](https://api.codeclimate.com/v1/badges/37a26fb3d2dbec167997/test_coverage)](https://codeclimate.com/github/hamuyuuki/actionpack-direct_routes/test_coverage)
5
5
 
@@ -11,18 +11,18 @@ Rails 5.1 adds Direct routes that you can create custom URL helpers directly.
11
11
 
12
12
  ## Getting Started
13
13
  Install `actionpack-direct_routes` at the command prompt:
14
- ```
14
+ ```sh
15
15
  gem install actionpack-direct_routes
16
16
  ```
17
17
 
18
18
  Or add `actionpack-direct_routes` to your Gemfile:
19
- ```
19
+ ```ruby
20
20
  gem "actionpack-direct_routes"
21
21
  ```
22
22
 
23
23
  ## How to use
24
24
  You can create custom URL helpers directly. For example:
25
- ```
25
+ ```ruby
26
26
  direct :homepage do
27
27
  "http://www.rubyonrails.org"
28
28
  end
@@ -33,10 +33,6 @@ end
33
33
 
34
34
  For details to [Rails Routing from the Outside In — Ruby on Rails Guides](https://guides.rubyonrails.org/routing.html#direct-routes)
35
35
 
36
-
37
- ## Limitation
38
- You can backport Direct routes into Rails 4.2 only now.
39
-
40
36
  ## Contributing
41
37
  Bug reports and pull requests are welcome on GitHub at https://github.com/hamuyuuki/actionpack-direct_routes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
42
38
 
@@ -5,8 +5,12 @@ module ActionDispatch
5
5
  module DirectRoutes
6
6
  module Mapper
7
7
  module Scope
8
+ def null?
9
+ @hash.nil? && @parent.nil?
10
+ end
11
+
8
12
  def root?
9
- @parent == {}
13
+ @parent == {} || @parent.null?
10
14
  end
11
15
  end
12
16
  end
@@ -15,7 +15,7 @@ module ActionDispatch
15
15
 
16
16
  def call(t, args, only_path = false)
17
17
  options = args.extract_options!
18
- url = t.url_for(eval_block(t, args, options))
18
+ url = t.full_url_for(eval_block(t, args, options))
19
19
 
20
20
  if only_path
21
21
  "/" + url.partition(%r{(?<!/)/(?!/)}).last
@@ -9,6 +9,14 @@ module ActionDispatch
9
9
  proxy.url_for(options)
10
10
  end
11
11
 
12
+ def full_url_for(options)
13
+ proxy.full_url_for(options)
14
+ end
15
+
16
+ def route_for(name, *args)
17
+ proxy.route_for(name, *args)
18
+ end
19
+
12
20
  def optimize_routes_generation?
13
21
  proxy.optimize_routes_generation?
14
22
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "route_set/url_helpers"
4
+
5
+ module ActionDispatch
6
+ module Routing
7
+ module DirectRoutes
8
+ module UrlFor
9
+ def self.included(url_for_module)
10
+ url_for_module.module_exec { alias full_url_for url_for }
11
+ end
12
+
13
+ def route_for(name, *args)
14
+ public_send(:"#{name}_url", *args)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -7,9 +7,11 @@ ActiveSupport.on_load(:before_initialize) do
7
7
  require "action_dispatch/routing/direct_routes/mapper/scope"
8
8
  require "action_dispatch/routing/direct_routes/route_set"
9
9
  require "action_dispatch/routing/direct_routes/route_set/named_route_collection"
10
+ require "action_dispatch/routing/direct_routes/url_for"
10
11
 
11
12
  ActionDispatch::Routing::Mapper.include(ActionDispatch::Routing::DirectRoutes::Mapper)
12
13
  ActionDispatch::Routing::Mapper::Scope.include(ActionDispatch::Routing::DirectRoutes::Mapper::Scope)
13
14
  ActionDispatch::Routing::RouteSet.prepend(ActionDispatch::Routing::DirectRoutes::RouteSet)
14
15
  ActionDispatch::Routing::RouteSet::NamedRouteCollection.include(ActionDispatch::Routing::DirectRoutes::RouteSet::NamedRouteCollection)
16
+ ActionDispatch::Routing::UrlFor.include(ActionDispatch::Routing::DirectRoutes::UrlFor)
15
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActionPack
4
4
  module DirectRoutes
5
- VERSION = "0.2.0"
5
+ VERSION = "1.0.1"
6
6
  end
7
7
  end
@@ -108,6 +108,7 @@ class CustomUrlHelpersTest < ActionDispatch::IntegrationTest
108
108
  direct("string") { "http://www.rubyonrails.org" }
109
109
  direct(:helper) { basket_url }
110
110
  direct(:linkable) { |linkable| [:"#{linkable.linkable_type}", { id: linkable.id }] }
111
+ direct(:nested) { |linkable| route_for(:linkable, linkable) }
111
112
  direct(:params) { |params| params }
112
113
  direct(:symbol) { :basket }
113
114
  direct(:hash) { { controller: "basket", action: "show" } }
@@ -135,7 +136,7 @@ class CustomUrlHelpersTest < ActionDispatch::IntegrationTest
135
136
  @user = User.new
136
137
  @page = Page.new("6")
137
138
  @path_params = { "controller" => "pages", "action" => "index" }
138
- @unsafe_params = ActionController::Parameters.new(@path_param)
139
+ @unsafe_params = ActionController::Parameters.new(@path_params)
139
140
  @safe_params = ActionController::Parameters.new(@path_params).permit(:controller, :action)
140
141
  end
141
142
 
@@ -160,10 +161,19 @@ class CustomUrlHelpersTest < ActionDispatch::IntegrationTest
160
161
  assert_equal "/products/3", linkable_path(@product)
161
162
  assert_equal "/products/3", Routes.url_helpers.linkable_path(@product)
162
163
 
164
+ assert_equal "/categories/1", nested_path(@category)
165
+ assert_equal "/categories/1", Routes.url_helpers.nested_path(@category)
166
+
163
167
  assert_equal "/", params_path(@safe_params)
164
168
  assert_equal "/", Routes.url_helpers.params_path(@safe_params)
165
- assert_raises(ActionController::UrlGenerationError) { params_path(@unsafe_params) }
166
- assert_raises(ActionController::UrlGenerationError) { Routes.url_helpers.params_path(@unsafe_params) }
169
+
170
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2
171
+ assert_equal "/", params_path(@unsafe_params)
172
+ assert_equal "/", Routes.url_helpers.params_path(@unsafe_params)
173
+ elsif Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 0
174
+ assert_raises(ArgumentError) { params_path(@unsafe_params) }
175
+ assert_raises(ArgumentError) { Routes.url_helpers.params_path(@unsafe_params) }
176
+ end
167
177
 
168
178
  assert_equal "/basket", symbol_path
169
179
  assert_equal "/basket", Routes.url_helpers.symbol_path
@@ -200,10 +210,19 @@ class CustomUrlHelpersTest < ActionDispatch::IntegrationTest
200
210
  assert_equal "http://www.example.com/products/3", linkable_url(@product)
201
211
  assert_equal "http://www.example.com/products/3", Routes.url_helpers.linkable_url(@product)
202
212
 
213
+ assert_equal "http://www.example.com/categories/1", nested_url(@category)
214
+ assert_equal "http://www.example.com/categories/1", Routes.url_helpers.nested_url(@category)
215
+
203
216
  assert_equal "http://www.example.com/", params_url(@safe_params)
204
217
  assert_equal "http://www.example.com/", Routes.url_helpers.params_url(@safe_params)
205
- assert_raises(ActionController::UrlGenerationError) { params_url(@unsafe_params) }
206
- assert_raises(ActionController::UrlGenerationError) { Routes.url_helpers.params_url(@unsafe_params) }
218
+
219
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2
220
+ assert_equal "http://www.example.com/", params_url(@unsafe_params)
221
+ assert_equal "http://www.example.com/", Routes.url_helpers.params_url(@unsafe_params)
222
+ elsif Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 0
223
+ assert_raises(ArgumentError) { params_url(@unsafe_params) }
224
+ assert_raises(ArgumentError) { Routes.url_helpers.params_url(@unsafe_params) }
225
+ end
207
226
 
208
227
  assert_equal "http://www.example.com/basket", symbol_url
209
228
  assert_equal "http://www.example.com/basket", Routes.url_helpers.symbol_url
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "test_helper"
4
+
5
+ require File.expand_path("../../../test/dummy/config/environment.rb", __FILE__)
6
+ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../../test/dummy/db/migrate", __FILE__)]
7
+ require "rails/test_help"
8
+
9
+ class DirectRoutesTest < ActionView::TestCase
10
+ class Linkable
11
+ attr_reader :id
12
+
13
+ def self.name
14
+ super.demodulize
15
+ end
16
+
17
+ def initialize(id)
18
+ @id = id
19
+ end
20
+
21
+ def linkable_type
22
+ self.class.name.underscore
23
+ end
24
+ end
25
+
26
+ class Category < Linkable; end
27
+ class Collection < Linkable; end
28
+ class Product < Linkable; end
29
+
30
+ Routes = ActionDispatch::Routing::RouteSet.new
31
+ Routes.draw do
32
+ resources :categories, :collections, :products
33
+ direct(:linkable) { |linkable| [:"#{linkable.linkable_type}", { id: linkable.id }] }
34
+ end
35
+
36
+ include Routes.url_helpers
37
+
38
+ def setup
39
+ @category = Category.new("1")
40
+ @collection = Collection.new("2")
41
+ @product = Product.new("3")
42
+ end
43
+
44
+ def test_direct_routes
45
+ assert_equal "/categories/1", linkable_path(@category)
46
+ assert_equal "/collections/2", linkable_path(@collection)
47
+ assert_equal "/products/3", linkable_path(@product)
48
+
49
+ assert_equal "http://test.host/categories/1", linkable_url(@category)
50
+ assert_equal "http://test.host/collections/2", linkable_url(@collection)
51
+ assert_equal "http://test.host/products/3", linkable_url(@product)
52
+ end
53
+ end
@@ -3,14 +3,14 @@
3
3
  # Configure Rails Environment
4
4
  ENV["RAILS_ENV"] = "test"
5
5
 
6
- # Filter out Minitest backtrace while allowing backtrace from other libraries
7
- # to be shown.
8
- require "minitest"
9
- Minitest.backtrace_filter = Minitest::BacktraceFilter.new
10
-
11
6
  if ENV["CI"]
12
7
  require "simplecov"
13
8
  SimpleCov.start "rails" do
14
9
  add_filter "/test/"
15
10
  end
16
11
  end
12
+
13
+ # Filter out Minitest backtrace while allowing backtrace from other libraries
14
+ # to be shown.
15
+ require "minitest"
16
+ Minitest.backtrace_filter = Minitest::BacktraceFilter.new
metadata CHANGED
@@ -1,71 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack-direct_routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hamuyuuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-26 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: 4.2.0
22
+ version: '5.1'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '4.2'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 4.2.0
32
+ version: '5.1'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: activesupport
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '4.2'
40
+ - - "<"
32
41
  - !ruby/object:Gem::Version
33
- version: 4.2.0
42
+ version: '5.1'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - "~>"
47
+ - - ">="
39
48
  - !ruby/object:Gem::Version
40
- version: 4.2.0
49
+ version: '4.2'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '5.1'
41
53
  - !ruby/object:Gem::Dependency
42
- name: minitest
54
+ name: appraisal
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
- - - "~>"
57
+ - - ">="
46
58
  - !ruby/object:Gem::Version
47
- version: 5.1.0
59
+ version: '0'
48
60
  type: :development
49
61
  prerelease: false
50
62
  version_requirements: !ruby/object:Gem::Requirement
51
63
  requirements:
52
- - - "~>"
64
+ - - ">="
53
65
  - !ruby/object:Gem::Version
54
- version: 5.1.0
66
+ version: '0'
55
67
  - !ruby/object:Gem::Dependency
56
- name: rails
68
+ name: minitest
57
69
  requirement: !ruby/object:Gem::Requirement
58
70
  requirements:
59
71
  - - "~>"
60
72
  - !ruby/object:Gem::Version
61
- version: 4.2.0
73
+ version: 5.1.0
62
74
  type: :development
63
75
  prerelease: false
64
76
  version_requirements: !ruby/object:Gem::Requirement
65
77
  requirements:
66
78
  - - "~>"
67
79
  - !ruby/object:Gem::Version
68
- version: 4.2.0
80
+ version: 5.1.0
69
81
  - !ruby/object:Gem::Dependency
70
82
  name: rubocop
71
83
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +124,16 @@ dependencies:
112
124
  name: simplecov
113
125
  requirement: !ruby/object:Gem::Requirement
114
126
  requirements:
115
- - - ">="
127
+ - - "<"
116
128
  - !ruby/object:Gem::Version
117
- version: '0'
129
+ version: '0.18'
118
130
  type: :development
119
131
  prerelease: false
120
132
  version_requirements: !ruby/object:Gem::Requirement
121
133
  requirements:
122
- - - ">="
134
+ - - "<"
123
135
  - !ruby/object:Gem::Version
124
- version: '0'
136
+ version: '0.18'
125
137
  - !ruby/object:Gem::Dependency
126
138
  name: sqlite3
127
139
  requirement: !ruby/object:Gem::Requirement
@@ -153,6 +165,7 @@ files:
153
165
  - lib/action_dispatch/routing/direct_routes/route_set/custom_url_helper.rb
154
166
  - lib/action_dispatch/routing/direct_routes/route_set/named_route_collection.rb
155
167
  - lib/action_dispatch/routing/direct_routes/route_set/url_helpers.rb
168
+ - lib/action_dispatch/routing/direct_routes/url_for.rb
156
169
  - lib/actionpack/direct_routes.rb
157
170
  - lib/actionpack/direct_routes/version.rb
158
171
  - test/application/routing_test.rb
@@ -187,14 +200,12 @@ files:
187
200
  - test/dummy/config/locales/en.yml
188
201
  - test/dummy/config/routes.rb
189
202
  - test/dummy/config/secrets.yml
190
- - test/dummy/db/test.sqlite3
191
- - test/dummy/log/development.log
192
- - test/dummy/log/test.log
193
203
  - test/dummy/public/404.html
194
204
  - test/dummy/public/422.html
195
205
  - test/dummy/public/500.html
196
206
  - test/dummy/public/favicon.ico
197
207
  - test/integration/custom_url_helpers_test.rb
208
+ - test/integration/direct_routes_test.rb
198
209
  - test/test_helper.rb
199
210
  homepage: https://github.com/hamuyuuki/actionpack-direct_routes
200
211
  licenses:
@@ -216,49 +227,47 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
227
  version: '0'
217
228
  requirements: []
218
229
  rubyforge_project:
219
- rubygems_version: 2.6.14.1
230
+ rubygems_version: 2.6.14.4
220
231
  signing_key:
221
232
  specification_version: 4
222
233
  summary: Backport Direct routes into Rails 4 and Rails 5.0.
223
234
  test_files:
224
235
  - test/test_helper.rb
225
236
  - test/application/routing_test.rb
237
+ - test/integration/direct_routes_test.rb
226
238
  - test/integration/custom_url_helpers_test.rb
227
- - test/dummy/app/controllers/application_controller.rb
228
- - test/dummy/app/helpers/application_helper.rb
229
- - test/dummy/app/views/layouts/application.html.erb
230
- - test/dummy/app/assets/javascripts/application.js
231
- - test/dummy/app/assets/stylesheets/application.css
232
- - test/dummy/config/locales/en.yml
233
- - test/dummy/config/database.yml
234
- - test/dummy/config/environments/production.rb
235
- - test/dummy/config/environments/development.rb
236
- - test/dummy/config/environments/test.rb
237
- - test/dummy/config/secrets.yml
238
- - test/dummy/config/environment.rb
239
- - test/dummy/config/routes.rb
239
+ - test/dummy/Rakefile
240
+ - test/dummy/bin/rake
241
+ - test/dummy/bin/rails
242
+ - test/dummy/bin/bundle
243
+ - test/dummy/bin/setup
244
+ - test/dummy/README.rdoc
245
+ - test/dummy/public/favicon.ico
246
+ - test/dummy/public/422.html
247
+ - test/dummy/public/404.html
248
+ - test/dummy/public/500.html
249
+ - test/dummy/config.ru
240
250
  - test/dummy/config/boot.rb
241
251
  - test/dummy/config/application.rb
242
- - test/dummy/config/initializers/to_time_preserves_timezone.rb
252
+ - test/dummy/config/secrets.yml
253
+ - test/dummy/config/environment.rb
254
+ - test/dummy/config/environments/development.rb
255
+ - test/dummy/config/environments/test.rb
256
+ - test/dummy/config/environments/production.rb
243
257
  - test/dummy/config/initializers/assets.rb
258
+ - test/dummy/config/initializers/backtrace_silencers.rb
244
259
  - test/dummy/config/initializers/cookies_serializer.rb
245
- - test/dummy/config/initializers/mime_types.rb
260
+ - test/dummy/config/initializers/wrap_parameters.rb
261
+ - test/dummy/config/initializers/to_time_preserves_timezone.rb
246
262
  - test/dummy/config/initializers/session_store.rb
263
+ - test/dummy/config/initializers/mime_types.rb
247
264
  - test/dummy/config/initializers/filter_parameter_logging.rb
248
- - test/dummy/config/initializers/backtrace_silencers.rb
249
265
  - test/dummy/config/initializers/inflections.rb
250
- - test/dummy/config/initializers/wrap_parameters.rb
251
- - test/dummy/README.rdoc
252
- - test/dummy/public/500.html
253
- - test/dummy/public/favicon.ico
254
- - test/dummy/public/422.html
255
- - test/dummy/public/404.html
256
- - test/dummy/bin/bundle
257
- - test/dummy/bin/rake
258
- - test/dummy/bin/rails
259
- - test/dummy/bin/setup
260
- - test/dummy/config.ru
261
- - test/dummy/db/test.sqlite3
262
- - test/dummy/Rakefile
263
- - test/dummy/log/development.log
264
- - test/dummy/log/test.log
266
+ - test/dummy/config/database.yml
267
+ - test/dummy/config/locales/en.yml
268
+ - test/dummy/config/routes.rb
269
+ - test/dummy/app/views/layouts/application.html.erb
270
+ - test/dummy/app/assets/stylesheets/application.css
271
+ - test/dummy/app/assets/javascripts/application.js
272
+ - test/dummy/app/controllers/application_controller.rb
273
+ - test/dummy/app/helpers/application_helper.rb
File without changes
File without changes
@@ -1,360 +0,0 @@
1
-  (0.1ms) begin transaction
2
- ------------------------------------------------------------------------------
3
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
4
- ------------------------------------------------------------------------------
5
-  (0.1ms) rollback transaction
6
-  (0.1ms) begin transaction
7
- ---------------------------------------
8
- CustomUrlHelpersTest: test_direct_paths
9
- ---------------------------------------
10
-  (0.1ms) rollback transaction
11
-  (0.1ms) begin transaction
12
- --------------------------------------
13
- CustomUrlHelpersTest: test_direct_urls
14
- --------------------------------------
15
-  (0.1ms) rollback transaction
16
-  (0.1ms) begin transaction
17
- ----------------------------------------------------------------------
18
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
19
- ----------------------------------------------------------------------
20
-  (0.1ms) rollback transaction
21
-  (0.2ms) begin transaction
22
- ---------------------------------------
23
- CustomUrlHelpersTest: test_direct_paths
24
- ---------------------------------------
25
-  (1.0ms) rollback transaction
26
-  (0.1ms) begin transaction
27
- --------------------------------------
28
- CustomUrlHelpersTest: test_direct_urls
29
- --------------------------------------
30
-  (0.1ms) rollback transaction
31
-  (0.4ms) begin transaction
32
- ----------------------------------------------------------------------
33
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
34
- ----------------------------------------------------------------------
35
-  (0.1ms) rollback transaction
36
-  (0.1ms) begin transaction
37
- ------------------------------------------------------------------------------
38
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
39
- ------------------------------------------------------------------------------
40
-  (0.1ms) rollback transaction
41
-  (0.1ms) begin transaction
42
- ----------------------------------------------------------------------
43
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
44
- ----------------------------------------------------------------------
45
-  (0.1ms) rollback transaction
46
-  (0.1ms) begin transaction
47
- ------------------------------------------------------------------------------
48
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
49
- ------------------------------------------------------------------------------
50
-  (0.1ms) rollback transaction
51
-  (0.1ms) begin transaction
52
- --------------------------------------
53
- CustomUrlHelpersTest: test_direct_urls
54
- --------------------------------------
55
-  (0.1ms) rollback transaction
56
-  (0.3ms) begin transaction
57
- ---------------------------------------
58
- CustomUrlHelpersTest: test_direct_paths
59
- ---------------------------------------
60
-  (0.1ms) rollback transaction
61
-  (0.1ms) begin transaction
62
- ---------------------------------------
63
- CustomUrlHelpersTest: test_direct_paths
64
- ---------------------------------------
65
-  (0.1ms) rollback transaction
66
-  (0.3ms) begin transaction
67
- --------------------------------------
68
- CustomUrlHelpersTest: test_direct_urls
69
- --------------------------------------
70
-  (0.1ms) rollback transaction
71
-  (0.5ms) begin transaction
72
- ------------------------------------------------------------------------------
73
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
74
- ------------------------------------------------------------------------------
75
-  (0.1ms) rollback transaction
76
-  (0.0ms) begin transaction
77
- ----------------------------------------------------------------------
78
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
79
- ----------------------------------------------------------------------
80
-  (0.1ms) rollback transaction
81
-  (0.1ms) begin transaction
82
- ----------------------------------------------------------------------
83
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
84
- ----------------------------------------------------------------------
85
-  (0.1ms) rollback transaction
86
-  (0.1ms) begin transaction
87
- --------------------------------------
88
- CustomUrlHelpersTest: test_direct_urls
89
- --------------------------------------
90
-  (0.0ms) rollback transaction
91
-  (0.1ms) begin transaction
92
- ------------------------------------------------------------------------------
93
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
94
- ------------------------------------------------------------------------------
95
-  (0.1ms) rollback transaction
96
-  (0.1ms) begin transaction
97
- ---------------------------------------
98
- CustomUrlHelpersTest: test_direct_paths
99
- ---------------------------------------
100
-  (0.1ms) rollback transaction
101
-  (0.1ms) begin transaction
102
- ------------------------------------------------------------------------------
103
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
104
- ------------------------------------------------------------------------------
105
-  (0.3ms) rollback transaction
106
-  (0.0ms) begin transaction
107
- ---------------------------------------
108
- CustomUrlHelpersTest: test_direct_paths
109
- ---------------------------------------
110
-  (0.0ms) rollback transaction
111
-  (0.1ms) begin transaction
112
- --------------------------------------
113
- CustomUrlHelpersTest: test_direct_urls
114
- --------------------------------------
115
-  (0.1ms) rollback transaction
116
-  (0.0ms) begin transaction
117
- ----------------------------------------------------------------------
118
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
119
- ----------------------------------------------------------------------
120
-  (0.1ms) rollback transaction
121
-  (0.1ms) begin transaction
122
- ------------------------------------------------------------------------------
123
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
124
- ------------------------------------------------------------------------------
125
-  (0.1ms) rollback transaction
126
-  (0.1ms) begin transaction
127
- ---------------------------------------
128
- CustomUrlHelpersTest: test_direct_paths
129
- ---------------------------------------
130
-  (0.1ms) rollback transaction
131
-  (0.1ms) begin transaction
132
- ----------------------------------------------------------------------
133
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
134
- ----------------------------------------------------------------------
135
-  (0.1ms) rollback transaction
136
-  (0.1ms) begin transaction
137
- --------------------------------------
138
- CustomUrlHelpersTest: test_direct_urls
139
- --------------------------------------
140
-  (0.1ms) rollback transaction
141
-  (0.1ms) begin transaction
142
- --------------------------------------
143
- CustomUrlHelpersTest: test_direct_urls
144
- --------------------------------------
145
-  (0.1ms) rollback transaction
146
-  (0.0ms) begin transaction
147
- ----------------------------------------------------------------------
148
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
149
- ----------------------------------------------------------------------
150
-  (0.1ms) rollback transaction
151
-  (0.2ms) begin transaction
152
- ------------------------------------------------------------------------------
153
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
154
- ------------------------------------------------------------------------------
155
-  (0.1ms) rollback transaction
156
-  (0.1ms) begin transaction
157
- ---------------------------------------
158
- CustomUrlHelpersTest: test_direct_paths
159
- ---------------------------------------
160
-  (0.1ms) rollback transaction
161
-  (0.1ms) begin transaction
162
- ------------------------------------------------------------------------------
163
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
164
- ------------------------------------------------------------------------------
165
-  (0.1ms) rollback transaction
166
-  (0.1ms) begin transaction
167
- ---------------------------------------
168
- CustomUrlHelpersTest: test_direct_paths
169
- ---------------------------------------
170
-  (0.1ms) rollback transaction
171
-  (0.1ms) begin transaction
172
- --------------------------------------
173
- CustomUrlHelpersTest: test_direct_urls
174
- --------------------------------------
175
-  (0.1ms) rollback transaction
176
-  (0.1ms) begin transaction
177
- ----------------------------------------------------------------------
178
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
179
- ----------------------------------------------------------------------
180
-  (0.1ms) rollback transaction
181
-  (0.3ms) begin transaction
182
- ----------------------------------------------------------------------------
183
- RoutingTest: test_reloads_routes_when_configuration_is_changed_in_production
184
- ----------------------------------------------------------------------------
185
-  (0.2ms) begin transaction
186
- -----------------------------------------------------------------------------
187
- RoutingTest: test_reloads_routes_when_configuration_is_changed_in_development
188
- -----------------------------------------------------------------------------
189
-  (0.1ms) rollback transaction
190
-  (0.1ms) rollback transaction
191
-  (0.2ms) begin transaction
192
- -------------------------------------------------------------
193
- RoutingTest: test_routes_are_added_and_removed_when_reloading
194
- -------------------------------------------------------------
195
-  (0.4ms) begin transaction
196
- ---------------------------------------------------------
197
- RoutingTest: test_named_routes_are_cleared_when_reloading
198
- ---------------------------------------------------------
199
-  (0.1ms) rollback transaction
200
-  (0.0ms) rollback transaction
201
-  (0.1ms) begin transaction
202
- ------------------------------------------------------------------------------
203
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
204
- ------------------------------------------------------------------------------
205
-  (0.1ms) rollback transaction
206
-  (0.0ms) begin transaction
207
- --------------------------------------
208
- CustomUrlHelpersTest: test_direct_urls
209
- --------------------------------------
210
-  (0.1ms) rollback transaction
211
-  (0.1ms) begin transaction
212
- ---------------------------------------
213
- CustomUrlHelpersTest: test_direct_paths
214
- ---------------------------------------
215
-  (0.1ms) rollback transaction
216
-  (0.2ms) begin transaction
217
- ----------------------------------------------------------------------
218
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
219
- ----------------------------------------------------------------------
220
-  (0.1ms) rollback transaction
221
-  (0.1ms) begin transaction
222
- ------------------------------------------------------------------------------
223
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
224
- ------------------------------------------------------------------------------
225
-  (0.1ms) rollback transaction
226
-  (0.0ms) begin transaction
227
- ----------------------------------------------------------------------
228
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
229
- ----------------------------------------------------------------------
230
-  (0.1ms) rollback transaction
231
-  (0.1ms) begin transaction
232
- ---------------------------------------
233
- CustomUrlHelpersTest: test_direct_paths
234
- ---------------------------------------
235
-  (0.1ms) rollback transaction
236
-  (0.0ms) begin transaction
237
- --------------------------------------
238
- CustomUrlHelpersTest: test_direct_urls
239
- --------------------------------------
240
-  (0.1ms) rollback transaction
241
-  (0.1ms) begin transaction
242
- ------------------------------------------------------------------------------
243
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
244
- ------------------------------------------------------------------------------
245
-  (0.1ms) rollback transaction
246
-  (0.2ms) begin transaction
247
- ----------------------------------------------------------------------
248
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
249
- ----------------------------------------------------------------------
250
-  (0.2ms) rollback transaction
251
-  (0.1ms) begin transaction
252
- ---------------------------------------
253
- CustomUrlHelpersTest: test_direct_paths
254
- ---------------------------------------
255
-  (0.1ms) rollback transaction
256
-  (0.0ms) begin transaction
257
- --------------------------------------
258
- CustomUrlHelpersTest: test_direct_urls
259
- --------------------------------------
260
-  (0.1ms) rollback transaction
261
-  (0.1ms) begin transaction
262
- ------------------------------------------------------------------------------
263
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
264
- ------------------------------------------------------------------------------
265
-  (0.1ms) rollback transaction
266
-  (0.3ms) begin transaction
267
- ---------------------------------------
268
- CustomUrlHelpersTest: test_direct_paths
269
- ---------------------------------------
270
-  (0.1ms) rollback transaction
271
-  (0.7ms) begin transaction
272
- ----------------------------------------------------------------------
273
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
274
- ----------------------------------------------------------------------
275
-  (0.1ms) rollback transaction
276
-  (0.1ms) begin transaction
277
- --------------------------------------
278
- CustomUrlHelpersTest: test_direct_urls
279
- --------------------------------------
280
-  (0.4ms) rollback transaction
281
-  (0.1ms) begin transaction
282
- ------------------------------------------------------------------------------
283
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
284
- ------------------------------------------------------------------------------
285
-  (0.1ms) rollback transaction
286
-  (0.1ms) begin transaction
287
- ----------------------------------------------------------------------
288
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
289
- ----------------------------------------------------------------------
290
-  (0.5ms) rollback transaction
291
-  (0.1ms) begin transaction
292
- ---------------------------------------
293
- CustomUrlHelpersTest: test_direct_paths
294
- ---------------------------------------
295
-  (0.1ms) rollback transaction
296
-  (0.2ms) begin transaction
297
- --------------------------------------
298
- CustomUrlHelpersTest: test_direct_urls
299
- --------------------------------------
300
-  (0.1ms) rollback transaction
301
-  (0.1ms) begin transaction
302
- ------------------------------------------------------------------------------
303
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
304
- ------------------------------------------------------------------------------
305
-  (0.1ms) rollback transaction
306
-  (0.1ms) begin transaction
307
- ----------------------------------------------------------------------
308
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
309
- ----------------------------------------------------------------------
310
-  (0.1ms) rollback transaction
311
-  (0.7ms) begin transaction
312
- ---------------------------------------
313
- CustomUrlHelpersTest: test_direct_paths
314
- ---------------------------------------
315
-  (0.1ms) rollback transaction
316
-  (0.1ms) begin transaction
317
- --------------------------------------
318
- CustomUrlHelpersTest: test_direct_urls
319
- --------------------------------------
320
-  (0.1ms) rollback transaction
321
-  (0.1ms) begin transaction
322
- ------------------------------------------------------------------------------
323
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
324
- ------------------------------------------------------------------------------
325
-  (0.1ms) rollback transaction
326
-  (0.1ms) begin transaction
327
- --------------------------------------
328
- CustomUrlHelpersTest: test_direct_urls
329
- --------------------------------------
330
-  (0.1ms) rollback transaction
331
-  (0.1ms) begin transaction
332
- ----------------------------------------------------------------------
333
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
334
- ----------------------------------------------------------------------
335
-  (0.1ms) rollback transaction
336
-  (0.1ms) begin transaction
337
- ---------------------------------------
338
- CustomUrlHelpersTest: test_direct_paths
339
- ---------------------------------------
340
-  (0.1ms) rollback transaction
341
-  (0.1ms) begin transaction
342
- --------------------------------------
343
- CustomUrlHelpersTest: test_direct_urls
344
- --------------------------------------
345
-  (0.1ms) rollback transaction
346
-  (0.0ms) begin transaction
347
- ----------------------------------------------------------------------
348
- CustomUrlHelpersTest: test_defining_direct_url_registers_helper_method
349
- ----------------------------------------------------------------------
350
-  (0.1ms) rollback transaction
351
-  (0.1ms) begin transaction
352
- ---------------------------------------
353
- CustomUrlHelpersTest: test_direct_paths
354
- ---------------------------------------
355
-  (0.1ms) rollback transaction
356
-  (0.0ms) begin transaction
357
- ------------------------------------------------------------------------------
358
- CustomUrlHelpersTest: test_defining_direct_inside_a_scope_raises_runtime_error
359
- ------------------------------------------------------------------------------
360
-  (0.1ms) rollback transaction