diff options
| author | Jack Nagel | 2014-07-18 15:14:42 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-18 15:14:57 -0500 |
| commit | 03fdaecee7632722e93edef2322b9d9ce629de86 (patch) | |
| tree | e5f8faf90f2b72c8ed592d917f55db1eba9e2ee4 /Library/Homebrew/cmd | |
| parent | 8eac19abd1165d677b45e7110335204d4abda6ef (diff) | |
| download | homebrew-03fdaecee7632722e93edef2322b9d9ce629de86.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 |
