Class: ChocBomb::Configuration
- Inherits:
-
Object
- Object
- ChocBomb::Configuration
- Includes:
- Tasks
- Defined in:
- lib/chocbomb.rb
Instance Attribute Summary collapse
-
#app_icon_position ⇒ Object
Position of the icon app.
-
#appcast_filename ⇒ Object
readonly
Returns the value of attribute appcast_filename.
-
#applications_icon_position ⇒ Object
Position of the Application symlink icon.
-
#background_file ⇒ Object
The background image.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#build_options ⇒ Object
Build options.
-
#build_path ⇒ Object
readonly
Returns the value of attribute build_path.
-
#build_type ⇒ Object
Build type (Release, Debug, …).
-
#bundle ⇒ Object
readonly
Returns the value of attribute bundle.
-
#dmg_src_folder ⇒ Object
readonly
Returns the value of attribute dmg_src_folder.
-
#dsa_signature ⇒ Object
readonly
Returns the value of attribute dsa_signature.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#host ⇒ Object
Returns the value of attribute host.
-
#icon_size ⇒ Object
Returns the value of attribute icon_size.
-
#icon_text_size ⇒ Object
Returns the value of attribute icon_text_size.
-
#minimum_osx_version ⇒ Object
Returns the value of attribute minimum_osx_version.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pkg ⇒ Object
readonly
Returns the value of attribute pkg.
-
#pkg_name ⇒ Object
readonly
Returns the value of attribute pkg_name.
-
#pkg_relative_url ⇒ Object
readonly
Returns the value of attribute pkg_relative_url.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#release_notes ⇒ Object
Returns the value of attribute release_notes.
-
#release_notes_template ⇒ Object
readonly
Returns the value of attribute release_notes_template.
-
#su_feed_url ⇒ Object
Returns the value of attribute su_feed_url.
-
#target ⇒ Object
Target.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#versionless_pkg_name ⇒ Object
readonly
Returns the value of attribute versionless_pkg_name.
-
#volume_background ⇒ Object
readonly
Returns the value of attribute volume_background.
-
#volume_icon ⇒ Object
Icns for the volume icon.
-
#volume_path ⇒ Object
readonly
Returns the value of attribute volume_path.
Instance Method Summary collapse
-
#file(*args, &block) ⇒ Object
Add an explicit file/bundle/folder into the DMG Examples: file ‘build/Release/SampleApp.app’, :position => [50, 100] file :target_bundle, :position => [50, 100] file proc { ‘README.txt’ }, :position => [50, 100] file :position => [50, 100] { ‘README.txt’ } Required option:
:position
- two item array [x, y] window position Options::name
- override the name of the project when mounted in the DMG:exclude
- do not include files/folders. -
#initialize {|_self| ... } ⇒ Configuration
constructor
A new instance of Configuration.
-
#link(url, *options) ⇒ Object
Add the whole project as a mounted item; e.g.
Methods included from Tasks
Constructor Details
#initialize {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
83 84 85 86 87 88 89 90 91 |
# File 'lib/chocbomb.rb', line 83 def initialize @plist = Plist::parse_xml(File.('Info.plist')) @files = {} yield self if block_given? default define_tasks end |
Instance Attribute Details
#app_icon_position ⇒ Object
Position of the icon app
25 26 27 |
# File 'lib/chocbomb.rb', line 25 def app_icon_position @app_icon_position end |
#appcast_filename ⇒ Object (readonly)
Returns the value of attribute appcast_filename.
105 106 107 |
# File 'lib/chocbomb.rb', line 105 def appcast_filename @appcast_filename end |
#applications_icon_position ⇒ Object
Position of the Application symlink icon
28 29 30 |
# File 'lib/chocbomb.rb', line 28 def applications_icon_position @applications_icon_position end |
#background_file ⇒ Object
The background image
22 23 24 |
# File 'lib/chocbomb.rb', line 22 def background_file @background_file end |
#base_url ⇒ Object
Returns the value of attribute base_url.
13 14 15 |
# File 'lib/chocbomb.rb', line 13 def base_url @base_url end |
#build_options ⇒ Object
Build options
40 41 42 |
# File 'lib/chocbomb.rb', line 40 def @build_options end |
#build_path ⇒ Object (readonly)
Returns the value of attribute build_path.
96 97 98 |
# File 'lib/chocbomb.rb', line 96 def build_path @build_path end |
#build_type ⇒ Object
Build type (Release, Debug, …)
34 35 36 |
# File 'lib/chocbomb.rb', line 34 def build_type @build_type end |
#bundle ⇒ Object (readonly)
Returns the value of attribute bundle.
100 101 102 |
# File 'lib/chocbomb.rb', line 100 def bundle @bundle end |
#dmg_src_folder ⇒ Object (readonly)
Returns the value of attribute dmg_src_folder.
99 100 101 |
# File 'lib/chocbomb.rb', line 99 def dmg_src_folder @dmg_src_folder end |
#dsa_signature ⇒ Object (readonly)
Returns the value of attribute dsa_signature.
106 107 108 |
# File 'lib/chocbomb.rb', line 106 def dsa_signature @dsa_signature end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
103 104 105 |
# File 'lib/chocbomb.rb', line 103 def files @files end |
#host ⇒ Object
Returns the value of attribute host.
12 13 14 |
# File 'lib/chocbomb.rb', line 12 def host @host end |
#icon_size ⇒ Object
Returns the value of attribute icon_size.
42 43 44 |
# File 'lib/chocbomb.rb', line 42 def icon_size @icon_size end |
#icon_text_size ⇒ Object
Returns the value of attribute icon_text_size.
43 44 45 |
# File 'lib/chocbomb.rb', line 43 def icon_text_size @icon_text_size end |
#minimum_osx_version ⇒ Object
Returns the value of attribute minimum_osx_version.
19 20 21 |
# File 'lib/chocbomb.rb', line 19 def minimum_osx_version @minimum_osx_version end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
93 94 95 |
# File 'lib/chocbomb.rb', line 93 def name @name end |
#pkg ⇒ Object (readonly)
Returns the value of attribute pkg.
98 99 100 |
# File 'lib/chocbomb.rb', line 98 def pkg @pkg end |
#pkg_name ⇒ Object (readonly)
Returns the value of attribute pkg_name.
97 98 99 |
# File 'lib/chocbomb.rb', line 97 def pkg_name @pkg_name end |
#pkg_relative_url ⇒ Object (readonly)
Returns the value of attribute pkg_relative_url.
109 110 111 |
# File 'lib/chocbomb.rb', line 109 def pkg_relative_url @pkg_relative_url end |
#private_key ⇒ Object
Returns the value of attribute private_key.
17 18 19 |
# File 'lib/chocbomb.rb', line 17 def private_key @private_key end |
#release_notes ⇒ Object
Returns the value of attribute release_notes.
16 17 18 |
# File 'lib/chocbomb.rb', line 16 def release_notes @release_notes end |
#release_notes_template ⇒ Object (readonly)
Returns the value of attribute release_notes_template.
111 112 113 |
# File 'lib/chocbomb.rb', line 111 def release_notes_template @release_notes_template end |
#su_feed_url ⇒ Object
Returns the value of attribute su_feed_url.
14 15 16 |
# File 'lib/chocbomb.rb', line 14 def su_feed_url @su_feed_url end |
#target ⇒ Object
Target
37 38 39 |
# File 'lib/chocbomb.rb', line 37 def target @target end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
94 95 96 |
# File 'lib/chocbomb.rb', line 94 def version @version end |
#versionless_pkg_name ⇒ Object (readonly)
Returns the value of attribute versionless_pkg_name.
108 109 110 |
# File 'lib/chocbomb.rb', line 108 def versionless_pkg_name @versionless_pkg_name end |
#volume_background ⇒ Object (readonly)
Returns the value of attribute volume_background.
101 102 103 |
# File 'lib/chocbomb.rb', line 101 def volume_background @volume_background end |
#volume_icon ⇒ Object
Icns for the volume icon
31 32 33 |
# File 'lib/chocbomb.rb', line 31 def volume_icon @volume_icon end |
#volume_path ⇒ Object (readonly)
Returns the value of attribute volume_path.
95 96 97 |
# File 'lib/chocbomb.rb', line 95 def volume_path @volume_path end |
Instance Method Details
#file(*args, &block) ⇒ Object
Add an explicit file/bundle/folder into the DMG Examples:
file 'build/Release/SampleApp.app', :position => [50, 100]
file :target_bundle, :position => [50, 100]
file proc { 'README.txt' }, :position => [50, 100]
file :position => [50, 100] { 'README.txt' }
Required option:
+:position+ - two item array [x, y] window position
Options:
+:name+ - override the name of the project when mounted in the DMG
+:exclude+ - do not include files/folders
56 57 58 59 60 61 |
# File 'lib/chocbomb.rb', line 56 def file(*args, &block) path_or_helper, = 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 [:position] @files[path_or_helper] = end |
#link(url, *options) ⇒ Object
Add the whole project as a mounted item; e.g. a TextMate bundle Examples:
add_link "http://github.com/drnic/choctop", :name => 'Github', :position => [50, 100]
add_link "http://github.com/drnic/choctop", 'Github.webloc', :position => [50, 100]
Required option:
+:position+ - two item array [x, y] window position
+:name+ - override the name of the project when mounted in the DMG
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/chocbomb.rb', line 70 def link(url, *) name = .first if .first.is_a?(String) = .last || {} [:url] = url [:name] = name if name throw "add_link :position => [x,y] option is missing" unless [:position] throw "add_link :name => 'Name' option is missing" unless [:name] [:name].gsub!(/(\.webloc|\.url)$/, '') [:name] += ".webloc" @files[[:name]] = end |