diff options
| author | Jack Nagel | 2014-07-18 15:14:42 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-18 15:14:57 -0500 |
| commit | a87d2108ea6e8b4261ca3411ff3b30b0a6714eeb (patch) | |
| tree | 18bb7cea1667ae8d8b03a897d4367ff09ce370c4 /Library/Homebrew/cmd | |
| parent | 7d28a6c54bc361154a0d4b7be8e88baef5301c14 (diff) | |
| download | brew-a87d2108ea6e8b4261ca3411ff3b30b0a6714eeb.tar.bz2 | |
Move bottle filename construction to a class
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index c74bb1921..8bd1c4b9e 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -125,12 +125,7 @@ module Homebrew bottle_revision = max ? max + 1 : 0 end - filename = bottle_filename( - :name => f.name, - :version => f.pkg_version, - :revision => bottle_revision, - :tag => bottle_tag - ) + filename = Bottle::Filename.new(f.name, f.pkg_version, bottle_tag, bottle_revision) if bottle_filename_formula_name(filename).empty? return ofail "Add a new regex to bottle_version.rb to parse #{f.version} from #{filename}" @@ -197,7 +192,7 @@ module Homebrew puts output if ARGV.include? '--rb' - bottle_base = filename.gsub(bottle_suffix(bottle_revision), '') + bottle_base = filename.to_s.gsub(bottle_suffix(bottle_revision), '') File.open "#{bottle_base}.bottle.rb", 'w' do |file| file.write output end |
