action_not_found 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/action_not_found.rb
CHANGED
@@ -14,17 +14,22 @@ module ActionNotFound
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def formatted_action_not_found(formatted, base_path)
|
17
|
-
|
17
|
+
not_found_controller_count = 0
|
18
|
+
not_found_action_count = 0
|
19
|
+
formatted_action_not_found = formatted.each do |route|
|
18
20
|
route =~ /\/(.*?)\s+(.*?)#(.*?)$/
|
19
21
|
controller_path = base_path.join("#{$2}_controller.rb")
|
20
22
|
begin
|
21
23
|
unless File.readlines(controller_path).grep(/def\s#{$3}/).size > 0
|
22
24
|
route << " #=> not found action"
|
25
|
+
not_found_action_count += 1
|
23
26
|
end
|
24
27
|
rescue
|
25
28
|
route << " #=> not found controller file"
|
29
|
+
not_found_controller_count += 1
|
26
30
|
end
|
27
31
|
end
|
32
|
+
formatted_action_not_found.push("\n#{formatted.size} routes, #{not_found_action_count} not found actions, #{not_found_controller_count} not controller files")
|
28
33
|
end
|
29
34
|
|
30
35
|
def process_rails_3_2(all_routes)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_not_found
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -70,7 +70,6 @@ files:
|
|
70
70
|
- lib/action_not_found/tasks.rake
|
71
71
|
- lib/action_not_found/version.rb
|
72
72
|
- lib/action_not_found.rb
|
73
|
-
- lib/tasks/action_not_found_tasks.rake
|
74
73
|
- MIT-LICENSE
|
75
74
|
- Rakefile
|
76
75
|
- README.rdoc
|
@@ -88,7 +87,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
87
|
version: '0'
|
89
88
|
segments:
|
90
89
|
- 0
|
91
|
-
hash: -
|
90
|
+
hash: -2277268768173313223
|
92
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
92
|
none: false
|
94
93
|
requirements:
|
@@ -97,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
96
|
version: '0'
|
98
97
|
segments:
|
99
98
|
- 0
|
100
|
-
hash: -
|
99
|
+
hash: -2277268768173313223
|
101
100
|
requirements: []
|
102
101
|
rubyforge_project:
|
103
102
|
rubygems_version: 1.8.24
|