swf_recompress 0.0.7 → 0.0.8

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.
data/bin/swf_recompress CHANGED
@@ -37,7 +37,7 @@ options[:output_filename] = ARGV[0] if options[:use_input_filename]
37
37
 
38
38
  def require_kzip!
39
39
  if !SWFRecompress.kzip_available?
40
- $stderr.puts "No kzip installed"
40
+ $stderr.puts "swf_recompress error - No kzip installed"
41
41
  $stderr.puts "#{ACQUIRE_KZIP_TEXT}\n#{SWFRecompress::KZIP_ABOUT}"
42
42
  exit 1
43
43
  end
@@ -1,5 +1,5 @@
1
1
  module SWFRecompress
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
 
4
4
  require 'fileutils'
5
5
  require 'pathname'
@@ -15,8 +15,9 @@ module SWFRecompress
15
15
  kzip by Ken Silverman: http://advsys.net/ken/utils.htm
16
16
  Mac OS X and Linux binaries maintained by Jonathan Fowler: http://www.jonof.id.au/
17
17
  END_KZIP_ABOUT
18
- KZIP_INSTALL_TEXT = " Install kzip binary to #{File.expand_path(File.join(ROOT, 'lib/kzip'))}"
19
-
18
+ LIB_KZIP = File.expand_path(File.join(ROOT, 'lib/kzip'))
19
+ KZIP_INSTALL_TEXT = " Install kzip binary to #{LIB_KZIP}"
20
+
20
21
  class Tempfile
21
22
  def self.open(temp_stem, write_mode = nil)
22
23
  begin
@@ -111,7 +112,7 @@ END_KZIP_ABOUT
111
112
  end
112
113
 
113
114
  def kzip(*args)
114
- command('lib/kzip', *args)
115
+ command(LIB_KZIP, *args)
115
116
  end
116
117
 
117
118
  def zip(*args)
@@ -153,7 +154,7 @@ END_KZIP_ABOUT
153
154
  end
154
155
 
155
156
  def kzip_available?
156
- @kzip_available ||= File.exists?('lib/kzip') && KZIP_MD5 == kzip_md5('lib/kzip')
157
+ @kzip_available ||= File.exists?(LIB_KZIP) && KZIP_MD5 == kzip_md5(LIB_KZIP)
157
158
  end
158
159
 
159
160
  def kzip_md5(kzip_filename)
@@ -173,7 +174,7 @@ END_KZIP_ABOUT
173
174
  if File.exists?(extracted_kzip_filename)
174
175
  extracted_kzip_md5 = kzip_md5(extracted_kzip_filename)
175
176
  if KZIP_MD5 == extracted_kzip_md5
176
- FileUtils.cp(extracted_kzip_filename, File.expand_path(File.join(ROOT, 'lib/kzip')))
177
+ FileUtils.cp(extracted_kzip_filename, LIB_KZIP)
177
178
  else
178
179
  raise "The MD5 of the downloaded kzip #{extracted_kzip_md5} did not match the expected MD5 #{KZIP_MD5}"
179
180
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swf_recompress
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Duncan Beevers
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-24 00:00:00 -07:00
18
+ date: 2010-08-16 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21