route_dog 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/tasks/tasks.rake +6 -2
- data/test/mock_app/Gemfile +1 -1
- data/test/support/assertions.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.1
|
data/lib/tasks/tasks.rake
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require "launchy"
|
3
|
+
rescue LoadError => e
|
4
|
+
puts "Install launchy gem to automatically open the report in your browser"
|
5
|
+
end
|
2
6
|
|
3
7
|
namespace :route_dog do
|
4
8
|
desc "Clean Tested Routes File"
|
@@ -21,7 +25,7 @@ end
|
|
21
25
|
def save_and_open_report_in_browser(html_report)
|
22
26
|
path = File.join(Rails.root, "tmp", Rails.application.class.to_s.gsub(":", "").concat("RoutesReport.html").underscore)
|
23
27
|
File.open(path, "w+") {|file| file.puts(html_report) }
|
24
|
-
Launchy::Browser.run(path)
|
28
|
+
defined?(Launchy) ? Launchy::Browser.run(path) : puts("The report was saved in: #{path}")
|
25
29
|
end
|
26
30
|
|
27
31
|
def implemented_route?(route)
|
data/test/mock_app/Gemfile
CHANGED
data/test/support/assertions.rb
CHANGED
@@ -13,7 +13,7 @@ def assert_watched_routes_not_include(controller, action, method = :get)
|
|
13
13
|
routes = YAML.load_file(RouteDog::Middleware::RouteDog.config_file)
|
14
14
|
routes[controller.to_s][action.to_s].include?(method.to_s)
|
15
15
|
assert false
|
16
|
-
rescue
|
16
|
+
rescue ActiveSupport::TestCase::Assertion
|
17
17
|
assert false, "Expected Watched Routes To Not include {:controller => :#{controller}, :action => :#{action}, :method => :#{method}}."
|
18
18
|
rescue
|
19
19
|
assert true
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: route_dog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 1
|
10
|
+
version: 2.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alvaro Gil
|