Class: Vendorificator::Vendor::Archive

Inherits:
Vendorificator::Vendor show all
Defined in:
lib/vendorificator/vendor/archive.rb

Direct Known Subclasses

ChefCookbook

Instance Attribute Summary collapse

Attributes inherited from Vendorificator::Vendor

#args, #block, #environment, #name, #segment

Instance Method Summary collapse

Methods inherited from Vendorificator::Vendor

#===, arg_reader, #before_conjure!, #compute_dependencies!, #git_add_extra_paths, #group, #initialize, #inspect, #metadata, #version

Constructor Details

This class inherits a constructor from Vendorificator::Vendor

Instance Attribute Details

#conjured_checksumObject (readonly)

Returns the value of attribute conjured_checksum.



13
14
15
# File 'lib/vendorificator/vendor/archive.rb', line 13

def conjured_checksum
  @conjured_checksum
end

#conjured_filesizeObject (readonly)

Returns the value of attribute conjured_filesize.



13
14
15
# File 'lib/vendorificator/vendor/archive.rb', line 13

def conjured_filesize
  @conjured_filesize
end

Instance Method Details

#conjure!Object



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vendorificator/vendor/archive.rb', line 15

def conjure!
  say_status :default, :download, url
  archive = download_file
  say_status :default, :unpack, filename
  unpack_file archive
  
  super
ensure
  if archive
    archive.close
    archive.unlink
  end
end

#conjure_commit_messageObject



33
34
35
36
37
# File 'lib/vendorificator/vendor/archive.rb', line 33

def conjure_commit_message
  rv = "Conjured archive #{name} from #{filename}\nOrigin: #{url}\nChecksum: #{conjured_checksum}\n"
  rv << "Version: #{version}\n" if version
  rv
end

#upstream_versionObject



29
30
31
# File 'lib/vendorificator/vendor/archive.rb', line 29

def upstream_version
  filename
end