lib/chocbomb.rb in chocbomb-0.0.0 vs lib/chocbomb.rb in chocbomb-0.0.1
- old
+ new
@@ -13,10 +13,12 @@
attr_accessor :su_feed_url
attr_accessor :release_notes
attr_accessor :private_key
+ attr_accessor :minimum_osx_version
+
# The background image
attr_accessor :background_file
# Position of the icon app
attr_accessor :app_icon_position
@@ -51,10 +53,11 @@
# +:name+ - override the name of the project when mounted in the DMG
# +:exclude+ - do not include files/folders
def file(*args, &block)
path_or_helper, options = args.first.is_a?(Hash) ? [block, args.first] : [args.first, args.last]
throw "add_files #{path_or_helper}, :position => [x,y] option is missing" unless options[:position]
+
@files[path_or_helper] = options
end
# Add the whole project as a mounted item; e.g. a TextMate bundle
# Examples:
@@ -70,21 +73,21 @@
options[:name] = name if name
throw "add_link :position => [x,y] option is missing" unless options[:position]
throw "add_link :name => 'Name' option is missing" unless options[:name]
options[:name].gsub!(/(\.webloc|\.url)$/, '')
options[:name] += ".webloc"
- self.files ||= {}
- files[options[:name]] = options
+
+ @files[options[:name]] = options
end
def initialize
@plist = Plist::parse_xml(File.expand_path('Info.plist'))
@files = {}
yield self if block_given?
- default
+ default
define_tasks
end
attr_reader :name
attr_reader :version
@@ -144,8 +147,10 @@
@versionless_pkg_name = "#{@name}.dmg"
@pkg_relative_url = "#{@base_url.gsub(%r{/$}, '')}/#{@pkg_name}".gsub(%r{^.*#{@host}}, '')
@release_notes_template = "release_notes_template.html.erb"
+
+ @minimum_osx_version ||= nil
end
end
end
\ No newline at end of file