Skip to content

Commit

Permalink
zipruby isn't working on Ruby 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
maccman committed Jun 24, 2010
1 parent fcd29eb commit 921c6a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -9,7 +9,7 @@ begin
gemspec.authors = ["Alex MacCaw"]
gemspec.add_dependency('templater', '>= 0.3.2')
gemspec.add_dependency('activesupport', '>= 3.0.0.beta')
gemspec.add_dependency('zipruby')
gemspec.add_dependency('rubyzip2', '>= 2.0.1')
gemspec.add_dependency('supermodel', '>= 0.1.3')
gemspec.add_dependency('bowline-bundler','>= 0.0.1')

Expand Down
8 changes: 4 additions & 4 deletions bowline.gemspec
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Alex MacCaw"]
s.date = %q{2010-06-23}
s.date = %q{2010-06-24}
s.default_executable = %q{bowline-gen}
s.description = %q{Ruby/JS GUI framework}
s.email = %q{alex@leadthinking.com}
Expand Down Expand Up @@ -145,20 +145,20 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<templater>, [">= 0.3.2"])
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0.beta"])
s.add_runtime_dependency(%q<zipruby>, [">= 0"])
s.add_runtime_dependency(%q<rubyzip2>, [">= 2.0.1"])
s.add_runtime_dependency(%q<supermodel>, [">= 0.1.3"])
s.add_runtime_dependency(%q<bowline-bundler>, [">= 0.0.1"])
else
s.add_dependency(%q<templater>, [">= 0.3.2"])
s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
s.add_dependency(%q<zipruby>, [">= 0"])
s.add_dependency(%q<rubyzip2>, [">= 2.0.1"])
s.add_dependency(%q<supermodel>, [">= 0.1.3"])
s.add_dependency(%q<bowline-bundler>, [">= 0.0.1"])
end
else
s.add_dependency(%q<templater>, [">= 0.3.2"])
s.add_dependency(%q<activesupport>, [">= 3.0.0.beta"])
s.add_dependency(%q<zipruby>, [">= 0"])
s.add_dependency(%q<rubyzip2>, [">= 2.0.1"])
s.add_dependency(%q<supermodel>, [">= 0.1.3"])
s.add_dependency(%q<bowline-bundler>, [">= 0.0.1"])
end
Expand Down
12 changes: 7 additions & 5 deletions lib/bowline/tasks/app.rake
Expand Up @@ -2,7 +2,7 @@ require 'fileutils'
require 'erb'
require 'rbconfig'
require 'tempfile'
require 'zipruby'
require 'zip/zip'

namespace :app do
namespace :build do
Expand All @@ -26,13 +26,15 @@ namespace :app do
dirs.delete_if {|d| d.include?(Bowline.root.join(*%w{db migrate}).to_s) }
dirs.delete_if {|i| i =~ /\.svn|\.DS_Store|\.git/ }

Zip::Archive.open(app_path, Zip::CREATE) do |zf|
zf.add_buffer("app_first_run", "")
zf.add_buffer("app_production", "")
Zip::ZipFile.open(app_path, Zip::ZipFile::CREATE) do |zf|
# This is horrible - but RubyZIP's API sucks
blank = Tempfile.new("blank")
zf.add("app_first_run", blank.path)
zf.add("app_production", blank.path)

dirs.each do |dir|
name = dir.sub(Bowline.root.to_s + "/", "")
zf.add_file(dir, name)
zf.add(name, dir)
end
end
end
Expand Down

0 comments on commit 921c6a8

Please sign in to comment.