traceroute 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tasks/traceroute.rake +10 -4
- data/lib/traceroute/version.rb +1 -1
- metadata +4 -10
data/lib/tasks/traceroute.rake
CHANGED
@@ -2,10 +2,16 @@ desc 'Prints out unused routes and unreachable action methods'
|
|
2
2
|
task :traceroute => :environment do
|
3
3
|
Rails.application.eager_load!
|
4
4
|
Rails.application.reload_routes!
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
|
6
|
+
routes = Rails.application.routes.routes.reject {|r| r.name.nil? && r.requirements.blank?}
|
7
|
+
|
8
|
+
if Rails.application.config.respond_to?(:assets)
|
9
|
+
exclusion_regexp = %r{/rails/info/properties|^#{Rails.application.config.assets.prefix}}
|
10
|
+
|
11
|
+
routes.reject! do |route|
|
12
|
+
path = defined?(Journey::Route) ? route.path.spec.to_s : route.path
|
13
|
+
path =~ exclusion_regexp
|
14
|
+
end
|
9
15
|
end
|
10
16
|
|
11
17
|
defined_action_methods = ApplicationController.descendants.map {|controller|
|
data/lib/traceroute/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traceroute
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70303615304200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70303615304200
|
25
25
|
description: This Rake task investigates the application's routes definition, then
|
26
26
|
tells you unused routes and unreachable action methods
|
27
27
|
email:
|
@@ -52,18 +52,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
52
|
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
segments:
|
56
|
-
- 0
|
57
|
-
hash: -4458234733179957313
|
58
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
56
|
none: false
|
60
57
|
requirements:
|
61
58
|
- - ! '>='
|
62
59
|
- !ruby/object:Gem::Version
|
63
60
|
version: '0'
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
hash: -4458234733179957313
|
67
61
|
requirements: []
|
68
62
|
rubyforge_project: traceroute
|
69
63
|
rubygems_version: 1.8.16
|