diff --git a/docx_replace.gemspec b/docx_replace.gemspec index ebd2df1..cb85cc5 100644 --- a/docx_replace.gemspec +++ b/docx_replace.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |gem| gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] - gem.add_runtime_dependency 'rubyzip', '~> 1.2', '>= 1.2.1' + gem.add_runtime_dependency 'rubyzip', '>= 2.3', '< 4' gem.add_development_dependency "rake" gem.add_development_dependency "rspec" end diff --git a/lib/docx_replace.rb b/lib/docx_replace.rb index 9bb0565..0e702df 100644 --- a/lib/docx_replace.rb +++ b/lib/docx_replace.rb @@ -70,7 +70,7 @@ def write_back_to_file(new_path=nil) path = new_path end FileUtils.mv(temp_file.path, path) - @zip_file = Zip::File.new(path, true) + @zip_file = Zip::File.new(path) end end end