route_mechanic 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 880e2dd0341ed11d953e4a4d27e71431ef393049153224f62231ba3c527252c8
4
- data.tar.gz: '0592972c3d62edf50cbeb1f4bcfee4473921e789c31eff61cd2673927c22013b'
3
+ metadata.gz: a9ff0ae5fc0f5045075d58e1a353cb60c7dd440a2a964b2990b12f5298493496
4
+ data.tar.gz: b8b517e7f557d648aee51cb1f6e61cb151058cbf2bd662df11783a67c0d05378
5
5
  SHA512:
6
- metadata.gz: 1a75f67529149119f59e7e78082a4364ea98b15c4906959a75d4970420a877444d36c37e150f21ab4a2a7e347daf80afe2645072f40d93cff18d57a6427fa5e1
7
- data.tar.gz: 71dd0672e63045a5c386ce4510712f75472a07abc236a8d73b696a361ef4fd65a394afb2578ac8f8b3c216d9d4f5e7142cc823fbef67e52c99b65a28f129fd8d
6
+ metadata.gz: ab4884a5c8f220562e025581a1aad63b66221b15e573a97fc3d0b1517149ff78cb4beb493c1f4ee58077f4ec97ebfc3d81c98673854032c3e23dac132d2368d3
7
+ data.tar.gz: c054466bbe6a7750fde4eb1563b82d819a51d0f4e638b11309f2ee8962fa67503c3a5f976232d02d68b873f550e7f5aa175ab6b27327942ddb88322b34f7937d
@@ -23,7 +23,6 @@ jobs:
23
23
  fail-fast: false
24
24
  matrix:
25
25
  ruby:
26
- - ruby:2.3
27
26
  - ruby:2.4
28
27
  - ruby:2.5
29
28
  - ruby:2.6
@@ -24,5 +24,6 @@ FakeApp.routes.draw do
24
24
  resources :users do
25
25
  get 'friends', to: :friends
26
26
  mount FakeEngine::Engine, at: "/fake_engine", fake_default_param: 'FAKE'
27
+ post 'create_as_another_name', to: 'users#create'
27
28
  end
28
29
  end
@@ -40,15 +40,15 @@ module RouteMechanic
40
40
  @controllers.each do |controller|
41
41
  controller_path = controller.controller_path
42
42
  controller.action_methods.each do |action_method|
43
- journey_route = @routes.detect do |route|
43
+ journey_routes = @routes.select do |route|
44
44
  route.defaults[:controller].to_sym == controller_path.to_sym && route.defaults[:action].to_sym == action_method.to_sym
45
45
  end
46
46
 
47
- if journey_route
48
- wrapper = RouteWrapper.new journey_route
49
- @controller_routes << wrapper
50
- else
47
+ if journey_routes.empty?
51
48
  @controller_routes_errors << { controller: controller, action: action_method }
49
+ else
50
+ wrappers = journey_routes.map { |r| RouteWrapper.new(r) }
51
+ @controller_routes.concat(wrappers)
52
52
  end
53
53
  end
54
54
  end
@@ -1,3 +1,3 @@
1
1
  module RouteMechanic
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.description = %q{No need to maintain Rails' routing tests manually. RouteMechanic automatically detects broken routes and missing action methods in controller once you've finished installation.}
11
11
  spec.homepage = "https://github.com/ohbarye/route_mechanic"
12
12
  spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
16
  spec.metadata["source_code_uri"] = "https://github.com/ohbarye/route_mechanic"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route_mechanic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ohbarye
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-21 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 2.3.0
99
+ version: 2.4.0
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="