Skip to content

Commit 755a943

Browse files
committed
Merge pull request #10 from tmikoss/master
Update rubyzip to 1.0
2 parents 122220d + 4f4c907 commit 755a943

4 files changed

Lines changed: 22 additions & 10 deletions

File tree

Gemfile.lock

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
PATH
22
remote: .
33
specs:
4-
docx (0.1.0)
4+
docx (0.2.04)
55
nokogiri (~> 1.5)
6-
rubyzip (~> 0.9)
6+
rubyzip (~> 1.0)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
nokogiri (1.5.2)
12-
rubyzip (0.9.7)
11+
diff-lcs (1.2.5)
12+
mini_portile (0.5.2)
13+
nokogiri (1.6.1)
14+
mini_portile (~> 0.5.0)
15+
rspec (2.14.1)
16+
rspec-core (~> 2.14.0)
17+
rspec-expectations (~> 2.14.0)
18+
rspec-mocks (~> 2.14.0)
19+
rspec-core (2.14.7)
20+
rspec-expectations (2.14.5)
21+
diff-lcs (>= 1.1.3, < 2.0)
22+
rspec-mocks (2.14.5)
23+
rubyzip (1.1.0)
1324

1425
PLATFORMS
1526
ruby
1627

1728
DEPENDENCIES
1829
docx!
30+
rspec

docx.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Gem::Specification.new do |s|
1010
s.email = ['chrahunt@gmail.com']
1111
s.homepage = 'https://github.com/chrahunt/docx'
1212
s.files = Dir["README.md", "LICENSE.md", "lib/**/*.rb"]
13-
13+
1414
s.add_dependency 'nokogiri', '~> 1.5'
15-
s.add_dependency 'rubyzip', '~> 0.9'
15+
s.add_dependency 'rubyzip', '~> 1.0'
1616

1717
s.add_development_dependency 'rspec'
1818
end

lib/docx/document.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'docx/parser'
2-
require 'zip/zip'
2+
require 'zip'
33

44
module Docx
55
# The Document class wraps around a docx file and provides methods to
@@ -56,7 +56,7 @@ def to_s
5656
# save(filepath) => void
5757
def save(path)
5858
update
59-
Zip::ZipOutputStream.open(path) do |out|
59+
Zip::OutputStream.open(path) do |out|
6060
zip.each do |entry|
6161
out.put_next_entry(entry.name)
6262

lib/docx/parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
require 'docx/containers'
22
require 'docx/elements'
33
require 'nokogiri'
4-
require 'zip/zip'
4+
require 'zip'
55

66
module Docx
77
class Parser
88
attr_reader :xml, :doc, :zip
99

1010
def initialize(path)
11-
@zip = Zip::ZipFile.open(path)
11+
@zip = Zip::File.open(path)
1212
@xml = @zip.read('word/document.xml')
1313
@doc = Nokogiri::XML(@xml)
1414
if block_given?

0 commit comments

Comments
 (0)