Skip to content
This repository
Browse code

Remove deprecated config locations

  • Loading branch information...
commit 1f3a5d2a95f022cabcb85ab03b5015791e302fc5 1 parent 4f0a4d7
Justin authored April 10, 2013

Showing 1 changed file with 4 additions and 14 deletions. Show diff stats Hide diff stats

  1. 18  lib/brakeman.rb
18  lib/brakeman.rb
@@ -77,17 +77,10 @@ def self.set_options options
77 77
     options
78 78
   end
79 79
 
80  
-  DEPRECATED_CONFIG_FILES = [
81  
-    File.expand_path("./config.yaml"),
82  
-    File.expand_path("~/.brakeman/config.yaml"),
83  
-    File.expand_path("/etc/brakeman/config.yaml"),
84  
-    "#{File.expand_path(File.dirname(__FILE__))}/../lib/config.yaml"
85  
-  ]
86  
-
87 80
   CONFIG_FILES = [
88 81
     File.expand_path("./config/brakeman.yml"),
89 82
     File.expand_path("~/.brakeman/config.yml"),
90  
-    File.expand_path("/etc/brakeman/config.yml"),
  83
+    File.expand_path("/etc/brakeman/config.yml")
91 84
   ]
92 85
 
93 86
   #Load options from YAML file
@@ -103,12 +96,9 @@ def self.load_options custom_location
103 96
     end
104 97
   end
105 98
 
106  
-  def self.config_file(custom_location=nil)
107  
-    DEPRECATED_CONFIG_FILES.each do |f|
108  
-      notify "#{f} is deprecated, please use one of #{CONFIG_FILES.join(", ")}" if File.file?(f)
109  
-    end
110  
-    supported_locations = [File.expand_path(custom_location || "")] + DEPRECATED_CONFIG_FILES + CONFIG_FILES
111  
-    supported_locations.detect{|f| File.file?(f) }
  99
+  def self.config_file custom_location = nil
  100
+    supported_locations = [File.expand_path(custom_location || "")] + CONFIG_FILES
  101
+    supported_locations.detect {|f| File.file?(f) }
112 102
   end
113 103
 
114 104
   #Default set of options

0 notes on commit 1f3a5d2

Please sign in to comment.
Something went wrong with that request. Please try again.