dia 1.4.pre → 1.4.pre.2

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ## NEWS
2
2
 
3
+ * Mac OSX 10.5 reported as working! (Bug fix)
4
+ Many thanks to Josh Creek for reporting and helping me debug this bug.
3
5
  * Use ffi\_lib() to explicitly load the dynamic library "sandbox", or "System"
4
6
  * Depend explicitly on FFI v0.6.2
5
7
  * Dia::Sandbox#run accepts a variable amount of arguments that will be passed onto the block supplied to the constructer.
data/lib/dia.rb CHANGED
@@ -5,7 +5,7 @@ require File.join(File.dirname(__FILE__), 'dia/commonapi.rb')
5
5
  require File.join(File.dirname(__FILE__), 'dia/sandbox.rb')
6
6
 
7
7
  module Dia
8
- VERSION = '1.4.pre'
8
+ VERSION = '1.4.pre.2'
9
9
  class SandboxException < StandardError; end
10
10
  end
11
11
 
@@ -5,6 +5,6 @@ module Dia
5
5
  module CommonAPI
6
6
  extend FFI::Library
7
7
  ffi_lib(%w(sandbox system libSystem.B.dylib))
8
- attach_function :sandbox_init, [ :string, :int, :pointer ], :int
8
+ attach_function :sandbox_init, [ :pointer, :uint64, :pointer ], :int
9
9
  end
10
10
  end
@@ -2,7 +2,7 @@ module Dia
2
2
 
3
3
  module Profiles
4
4
  extend FFI::Library
5
- ffi_lib(%w(sandbox System libSystem.B.dylib))
5
+ ffi_lib(%w(sandbox system libSystem.B.dylib))
6
6
 
7
7
  NO_INTERNET = attach_variable(:kSBXProfileNoInternet, :string).read_string
8
8
  NO_NETWORKING = attach_variable(:kSBXProfileNoNetwork, :string).read_string
@@ -56,8 +56,8 @@ module Dia
56
56
  def run(*args)
57
57
 
58
58
  @pid = fork do
59
- if ( ret = sandbox_init(@profile, 0x0001, error = FFI::MemoryPointer.new(:pointer)) ) == -1
60
- raise Dia::SandboxException, "Failed to initialize sandbox (#{error.read_pointer.read_string})"
59
+ if sandbox_init(FFI::MemoryPointer.from_string(@profile), 0x0001, err = FFI::MemoryPointer.new(:pointer)) == -1
60
+ raise Dia::SandboxException, "Failed to initialize sandbox (#{err.read_pointer.read_string}"
61
61
  end
62
62
 
63
63
  if @app_path
metadata CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 4
8
8
  - pre
9
- version: 1.4.pre
9
+ - 2
10
+ version: 1.4.pre.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Robert Gleeson
@@ -67,7 +68,7 @@ has_rdoc: yard
67
68
  homepage:
68
69
  licenses: []
69
70
 
70
- post_install_message: " ********************************************************************\n Thanks for installing Dia! (1.4.pre)\n \n Don't forget to check NEWS.md for what has changed in this release:\n http://www.flowof.info/dia/file.NEWS.html\n \n You can chat with us at irc.freenode.net / #flowof.info if you have\n any problems. Feel free to join us!\n ********************************************************************\n"
71
+ post_install_message: " ********************************************************************\n Dia (1.4.pre.2)\n \n The Mac OSX 10.5 bug has been reported as fixed! \n Many thanks to \"Josh Creek\" for reporting, and helping me debug the\n problem until we solved it.\n ********************************************************************\n"
71
72
  rdoc_options: []
72
73
 
73
74
  require_paths: