irpack 0.2.1 → 0.2.2

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.
@@ -79,7 +79,7 @@ module IRPack
79
79
  args.entry_file,
80
80
  :target => args.target,
81
81
  :compress => args.compress,
82
- :embed_references => args.embed)
82
+ :embed_references => args.embed_references)
83
83
  return 0
84
84
  end
85
85
  end
@@ -61,6 +61,7 @@ module IRPack
61
61
  }
62
62
  }
63
63
 
64
+ [STAThread]
64
65
  public static int Main(string[] args)
65
66
  {
66
67
  AppDomain domain = AppDomain.CurrentDomain;
@@ -70,7 +71,7 @@ module IRPack
70
71
  return asm;
71
72
  }
72
73
  }
73
- throw new FileNotFoundException(e.Name);
74
+ return null;
74
75
  });
75
76
  var stream = Assembly.GetEntryAssembly().GetManifestResourceStream(@"<%= package_file %>");
76
77
  var package = Package.Open(stream, FileMode.Open, FileAccess.Read);
@@ -88,7 +88,7 @@ module IRPack
88
88
  public override Assembly LoadAssemblyFromPath(string path)
89
89
  {
90
90
  try {
91
- return Assembly.LoadFile(path);
91
+ return Assembly.LoadFile(path.Replace("/", "\\\\"));
92
92
  }
93
93
  catch (FileNotFoundException e) {
94
94
  var uri = ToPackageLoadPath(path);
data/lib/irpack.rb CHANGED
@@ -64,6 +64,7 @@ module IRPack
64
64
  :embed_references => true,
65
65
  :module_name => path_to_module_name(output_file)
66
66
  }.update(opts)
67
+ output_file = File.expand_path(output_file)
67
68
  basename = File.basename(output_file, '.*')
68
69
  module_name = opts[:module_name]
69
70
  target = opts[:target]
data/test/test_irpack.rb CHANGED
@@ -68,7 +68,7 @@ class TC_IRPack < Test::Unit::TestCase
68
68
  hello => 'hello.rb',
69
69
  }
70
70
  outfile = tempfilename('.exe')
71
- assert_equal(outfile, IRPack.pack(outfile, files, 'entry.rb'))
71
+ assert_equal(File.expand_path(outfile), IRPack.pack(outfile, files, 'entry.rb'))
72
72
  assert_equal('Hello World!', `#{outfile}`.chomp)
73
73
  end
74
74
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: irpack
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - kumaryu
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-15 00:00:00 Z
13
+ date: 2011-07-16 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: |