route_mechanic 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 7a45e646ff04b613cb52b102ff6d47ef3b02750fe4455eab2d081e549c37313f
4
- data.tar.gz: 4df4c8d6bc5dee7e15338a93e1a8f1f468e3e76dd7299b80baf14922322ca0bd
3
+ metadata.gz: dcf55f8d2a48c7a0ff01db79aef7007f04debdf0041446ad54dbee8ef96ef1c9
4
+ data.tar.gz: ec43017513f3cb41e85463eb87c0ba6717395fce97cad5cff706a404ddf60bdc
5
5
  SHA512:
6
- metadata.gz: f2dbdb3b471fc9d47686fb4b924f3a32843a3d5dce778a64706fe72b4127a84cdaa09dcc3b0bc2527ff6b6b77b393d8af5124595bd62d17fc10651e82fef2978
7
- data.tar.gz: b47585e146f2e8aa6af03802794c3cb8206057adb216fb54581871baba4a820b0103bfbe45885491de8aaaf0f54c52279885ff1fef30fa58c585cd743c3434f6
6
+ metadata.gz: e2c1f56abcb02e80ea81ccc44cb39fff35166fbc94d413ff8ae838ec98d7c867ddad8a089ce3ad30416c15f331268438e3f06880eabac2c41ba750d062387101
7
+ data.tar.gz: 11719f321b17f608408c2d5f195fa332a1a95ef1f491ce23fd3e7a9af2e82e3b940a934bdc5dd96f5d3c6a11bd6b51da895eb8a013b20d5ee42a30d6d6c87354
@@ -10,6 +10,10 @@ FakeApp.config.root = File.dirname(__FILE__)
10
10
  FakeApp.initialize!
11
11
 
12
12
  FakeApp.routes.draw do
13
+ constraints subdomain: /\A[0-9a-z-]+\z/ do
14
+ get '/constraints_test' => 'users#index'
15
+ end
16
+
13
17
  resources :users do
14
18
  get 'friends', to: :friends
15
19
  mount FakeEngine::Engine, at: "/fake_engine", fake_default_param: 'FAKE'
@@ -53,7 +53,12 @@ module RouteMechanic
53
53
  base_option.merge({ only_path: true }).merge(required_parts))
54
54
  expected_options = base_option.merge(required_parts)
55
55
 
56
- assert_routing({ path: url, method: wrapper.verb }, expected_options)
56
+ assert_generates(url, expected_options)
57
+ # Q. Why not using `assert_routing` or `assert_recognize`?
58
+ # A. They strictly checks `constraints` in routes.rb and
59
+ # this gem can't generate a request that meets whole constraints just in time.
60
+ # https://github.com/ohbarye/route_mechanic/issues/7#issuecomment-695957142
61
+ # https://guides.rubyonrails.org/routing.html#specifying-constraints
57
62
  end
58
63
 
59
64
  # @return [Array<Controller>]
@@ -1,3 +1,3 @@
1
1
  module RouteMechanic
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route_mechanic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ohbarye