diff options
| author | Jack Nagel | 2014-05-27 21:14:59 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-05-27 21:16:15 -0500 | 
| commit | 69b1b0844ad782433d3913c687ec271cba797a8d (patch) | |
| tree | d2036cbbd89f55894d66b63a136ddacdc4d2288c /Library/Homebrew/software_spec.rb | |
| parent | bd52a15621153450fca3537239467532981af8b3 (diff) | |
| download | homebrew-69b1b0844ad782433d3913c687ec271cba797a8d.tar.bz2 | |
Make some constant strings into actual constants
We only need one copy of each of these strings, not ~7500.
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 0e6dddc89..77ad7d42c 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -148,14 +148,18 @@ class Bottle  end  class BottleSpecification +  DEFAULT_PREFIX = "/usr/local".freeze +  DEFAULT_CELLAR = "/usr/local/Cellar".freeze +  DEFAULT_ROOT_URL = "https://downloads.sf.net/project/machomebrew/Bottles".freeze +    attr_rw :root_url, :prefix, :cellar, :revision    attr_reader :checksum, :collector    def initialize      @revision = 0 -    @prefix = '/usr/local' -    @cellar = '/usr/local/Cellar' -    @root_url = 'https://downloads.sf.net/project/machomebrew/Bottles' +    @prefix = DEFAULT_PREFIX +    @cellar = DEFAULT_CELLAR +    @root_url = DEFAULT_ROOT_URL      @collector = BottleCollector.new    end | 
