choctop 0.14.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,9 @@
1
+ == 0.14.1 2010-08-01
2
+
3
+ * add option to automatically mount the dmg created by the 'dmg' rake task [george]
4
+ * tag-activated ("@unmount_dmg") cucumber (After) hook to unmount disk images used for testing [george]
5
+ * cucumber tests folder aliasing in mounted volume via a call to osascript and an external AppleScript file [george]
6
+
1
7
  == 0.14.0 2010-07-30
2
8
 
3
9
  * install_choctop: added --tmbundle/--textmate flag
@@ -19,7 +19,7 @@ and XML file to your remote host via rsync.
19
19
 
20
20
  All rake tasks:
21
21
  rake build # Build Xcode Release
22
- rake dmg # Create the dmg file for appcasting
22
+ rake dmg[automount] # Create the dmg file for appcasting (`rake dmg`, or `rake dmg[automount]` to automatically mount the dmg)
23
23
  rake feed # Create/update the appcast file
24
24
  rake upload # Upload the appcast file to the host
25
25
  rake version:bump:major # Bump the gemspec by a major version.
@@ -3,6 +3,7 @@ Feature: Can build a customised DMG image from application build
3
3
  As a Cocoa developer or release manager
4
4
  I want a rake task to generate a DMG based on custom settings
5
5
 
6
+ @unmount_dmg
6
7
  Scenario: Build a DMG with default custom DMG config
7
8
  Given a Cocoa app with choctop installed called "SampleApp"
8
9
  When I invoke task "rake dmg"
@@ -14,6 +15,7 @@ Feature: Can build a customised DMG image from application build
14
15
  And file ".background/background.jpg" in mounted volume is invisible
15
16
  And file ".VolumeIcon.icns" in mounted volume is created
16
17
 
18
+ @unmount_dmg
17
19
  Scenario: Build a DMG with custom Applications symlink icon
18
20
  Given a Cocoa app with choctop installed called "SampleApp"
19
21
  And is configured for custom Applications icon
@@ -25,6 +27,7 @@ Feature: Can build a customised DMG image from application build
25
27
  And file "Applications" in mounted volume has GetFileInfo custom icon "1"
26
28
  And file "Applications" in mounted volume is aliased to "/Applications"
27
29
 
30
+ @unmount_dmg
28
31
  Scenario: Build a DMG with extra included file such as README in the project folder
29
32
  Given a Cocoa app with choctop installed called "SampleApp"
30
33
  And is configured for an asset file "README.txt" to be included in dmg
@@ -33,6 +36,7 @@ Feature: Can build a customised DMG image from application build
33
36
  And file "README.txt" in mounted volume is created
34
37
  And file "SampleApp.app.dSYM" in mounted volume is not created
35
38
 
39
+ @unmount_dmg
36
40
  Scenario: Build a DMG for non-Xcode project
37
41
  Given a non-Xcode chcotop project "MyProject" with files: README.txt, SomeBundle.thingy
38
42
  When I invoke task "rake dmg"
@@ -41,6 +45,7 @@ Feature: Can build a customised DMG image from application build
41
45
  And file "SomeBundle.thingy" in mounted volume is created
42
46
  And file "Applications" in mounted volume is not created
43
47
 
48
+ @unmount_dmg
44
49
  Scenario: Build a DMG for the entire project as an item (textmate bundle)
45
50
  Given a TextMate bundle project "MyBundle.tmbundle"
46
51
  When I invoke task "rake dmg"
@@ -48,6 +53,7 @@ Feature: Can build a customised DMG image from application build
48
53
  And file "MyBundle.tmbundle" in mounted volume is created
49
54
  And file "Applications" in mounted volume is not created
50
55
 
56
+ @unmount_dmg
51
57
  Scenario: Build a DMG with a URL webloc file
52
58
  Given a TextMate bundle project "MyBundle.tmbundle"
53
59
  And I want a link "GitHub.webloc" to "http://github.com/drnic/choctop" in the DMG
@@ -9,8 +9,10 @@ Then /^file "(.*)" in mounted volume has GetFileInfo (.*) "(.*)"/ do |file, file
9
9
  end
10
10
  end
11
11
 
12
- Then /^file "(.*)" in mounted volume is aliased to "(.*)"/ do |file, target|
12
+ Then /^file "(.*)" in mounted volume is aliased to "\/(.*)"/ do |folder_alias, target|
13
13
  in_mounted_volume do
14
- puts "TODO - how to get applescript to test this?"
14
+ disk_name = `pwd`.chomp.split("/").last # HACK and an ugly on at that
15
+ folder_alias_url = `osascript #{File.join(File.dirname(__FILE__), "../support/get_folder_alias_target_url.scpt")} #{folder_alias} #{disk_name}`.chomp
16
+ folder_alias_url.should == "file://localhost/#{target}/"
15
17
  end
16
18
  end
@@ -18,7 +18,7 @@ module ChocTop
18
18
  include Dmg
19
19
  include RakeTasks
20
20
 
21
- VERSION = '0.14.0'
21
+ VERSION = '0.14.1'
22
22
 
23
23
  attr_writer :build_opts
24
24
  def build_opts
@@ -46,7 +46,7 @@ module ChocTop
46
46
  FileUtils.mkdir_p mountpoint # TODO can we remove random mountpoints?
47
47
  FileUtils.rm_f(pkg) # make sure destination pkg doesn't already exist, or hdiutil will barf
48
48
  sh "hdiutil create -format UDRW -quiet -volname '#{name}' -srcfolder '#{dmg_src_folder}' '#{pkg}'"
49
- sh "hdiutil attach '#{pkg}' -mountpoint '#{volume_path}' -noautoopen -quiet"
49
+ mount_dmg
50
50
  sh "bless --folder '#{volume_path}' --openfolder '#{volume_path}'"
51
51
  sh "sleep 1"
52
52
 
@@ -56,6 +56,10 @@ module ChocTop
56
56
  configure_applications_icon if include_applications_icon?
57
57
  configure_dmg_window
58
58
  end
59
+
60
+ def mount_dmg
61
+ sh "hdiutil attach '#{pkg}' -mountpoint '#{volume_path}' -noautoopen -quiet"
62
+ end
59
63
 
60
64
  def volume_background
61
65
  ".background/background#{File.extname(background_file)}"
@@ -14,13 +14,16 @@ module ChocTop
14
14
  FileUtils.rm_rf(build_path)
15
15
  end
16
16
 
17
- desc "Create the dmg file for appcasting"
18
- task :dmg => :build do
17
+ desc "Create the dmg file for appcasting (`rake dmg`, or `rake dmg[automount]` to automatically mount the dmg)"
18
+ task :dmg, :automount, :needs => :build do |t, args|
19
+ args.with_defaults(:automount => false)
20
+
19
21
  detach_dmg
20
22
  make_dmg
21
23
  detach_dmg
22
24
  convert_dmg_readonly
23
25
  add_eula
26
+ mount_dmg if args[:automount]
24
27
  end
25
28
 
26
29
  desc "Create/update the appcast file"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: choctop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 14
9
- - 0
10
- version: 0.14.0
9
+ - 1
10
+ version: 0.14.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dr Nic Williams
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-07-30 00:00:00 +10:00
20
+ date: 2010-08-01 00:00:00 +10:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -139,7 +139,8 @@ description: "Build and deploy tools for Cocoa apps using Sparkle for distributi
139
139
  The main feature is a powerful rake task \"rake appcast\" which builds a release of your\n\
140
140
  application, creates a DMG package, generates a Sparkle XML file, and posts the package\n\
141
141
  and XML file to your remote host via rsync.\n\n\
142
- All rake tasks:\n rake build # Build Xcode Release\n rake dmg # Create the dmg file for appcasting\n rake feed # Create/update the appcast file\n rake upload # Upload the appcast file to the host\n rake version:bump:major # Bump the gemspec by a major version.\n rake version:bump:minor # Bump the gemspec by a minor version.\n rake version:bump:patch # Bump the gemspec by a patch version.\n rake version:current # Display the current version"
142
+ All rake tasks:\n rake build # Build Xcode Release\n\
143
+ \t\trake dmg[automount] # Create the dmg file for appcasting (`rake dmg`, or `rake dmg[automount]` to automatically mount the dmg)\n rake feed # Create/update the appcast file\n rake upload # Upload the appcast file to the host\n rake version:bump:major # Bump the gemspec by a major version.\n rake version:bump:minor # Bump the gemspec by a minor version.\n rake version:bump:patch # Bump the gemspec by a patch version.\n rake version:current # Display the current version"
143
144
  email:
144
145
  - drnicwilliams@gmail.com
145
146
  - chris@cobaltedge.com