openxml-package 0.3.3 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 76da3fa471566c2c7f1e99fe5d830f66288924df
4
- data.tar.gz: d55dfa69f9959a7d2bc53ece11d6d82c5b69dc10
2
+ SHA256:
3
+ metadata.gz: 3d979b5a2556bb7813c72892f2b1a9f2d4cb86218c5475f9d7ca687bac05bdbf
4
+ data.tar.gz: dbe147781818f38c87a18e3657d9333fa5baf661f6d076ce2d92649b3ef6d190
5
5
  SHA512:
6
- metadata.gz: ee814d1eeed9ea6892795afea4075fbe9a7c833d033447ccb292b02e18e46354202082f5cb11690872a172d91a5fd7198c6aed517a9582e5ca768b00fb2d9aac
7
- data.tar.gz: de04ea1ad3da58c3e2f1baf56e9d619191a4d59605e2cd30dd030e41c49ff65ea74ba3c8b369c690746e000103e4e0b20713e8944d3182066bbfb75fb9e19a50
6
+ metadata.gz: c57f3ba33337a750022adc371ebea813324924645606dedd0b7b2954f696af2aefb04cf8daf0a451ea97a937d180d77a76e5208c983fad570d4e1ab329243711
7
+ data.tar.gz: a3195773e3c9dd112b929f21cec5618a4522133bc777510d731c09ea6163f5b8c78ee773fad19f4ab2be9e5c83db56f610875168cfd3a43cb3b068edd0322778
@@ -0,0 +1,21 @@
1
+ name: Tests
2
+ on: [push]
3
+
4
+ jobs:
5
+ ruby:
6
+ name: Ruby Tests
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby-version: [ "3.0", "3.1", "3.2", "3.3" ]
11
+
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
+ - name: Setup Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ bundler-cache: true
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ - name: Run Tests
21
+ run: bundle exec rake test
data/.gitignore CHANGED
@@ -22,3 +22,4 @@ test/version_tmp
22
22
  *.o
23
23
  *.a
24
24
  mkmf.log
25
+ .DS_Store
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.3.5 - Oct 7, 2024
2
+
3
+ - Ruby 3.2 support
4
+
5
+ ## 0.3.4 - Oct 16, 2019
6
+
7
+ - Removed rubyzip lock
8
+
9
+
1
10
  ## 0.3.3 - Oct 2, 2018
2
11
 
3
12
  - Optimized setting attributes
@@ -1,3 +1,5 @@
1
+ require "delegate"
2
+
1
3
  module OpenXml
2
4
  class Builder
3
5
  class Element < SimpleDelegator
@@ -162,7 +162,7 @@ module OpenXml
162
162
  end
163
163
 
164
164
  def matches?(value, regexp)
165
- return if value =~ regexp
165
+ return if value.is_a?(String) && value =~ regexp
166
166
  raise ArgumentError, "Value does not match #{regexp}"
167
167
  end
168
168
 
@@ -1,6 +1,5 @@
1
1
  require "openxml-package/version"
2
2
  require "openxml/content_types_presets"
3
- require "openxml/rubyzip_fix"
4
3
  require "openxml/errors"
5
4
  require "openxml/types"
6
5
  require "openxml/parts"
@@ -80,7 +79,7 @@ module OpenXml
80
79
  end
81
80
 
82
81
  def write_to(path)
83
- File.open(path, "w") do |file|
82
+ File.open(path, "wb") do |file|
84
83
  file.write to_stream.string
85
84
  end
86
85
  end
@@ -1,3 +1,3 @@
1
1
  module OpenXmlPackage
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubyzip", "~> 1.2.2"
22
+ spec.add_dependency "rubyzip", "~> 2.3"
23
23
  spec.add_dependency "nokogiri"
24
24
  spec.add_dependency "ox"
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.6"
26
+ spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency "rake"
28
28
  spec.add_development_dependency "minitest"
29
29
  spec.add_development_dependency "minitest-reporters"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openxml-package
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.2
19
+ version: '2.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.2
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.6'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.6'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -185,8 +185,8 @@ executables: []
185
185
  extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
+ - ".github/workflows/ci.yml"
188
189
  - ".gitignore"
189
- - ".travis.yml"
190
190
  - CHANGELOG.md
191
191
  - Gemfile
192
192
  - LICENSE.txt
@@ -223,7 +223,6 @@ files:
223
223
  - lib/openxml/properties/value_property.rb
224
224
  - lib/openxml/relationship.rb
225
225
  - lib/openxml/render_when_empty.rb
226
- - lib/openxml/rubyzip_fix.rb
227
226
  - lib/openxml/types.rb
228
227
  - lib/openxml/unmet_requirement.rb
229
228
  - openxml-package.gemspec
@@ -232,7 +231,7 @@ homepage: https://github.com/openxml/openxml-package
232
231
  licenses:
233
232
  - MIT
234
233
  metadata: {}
235
- post_install_message:
234
+ post_install_message:
236
235
  rdoc_options: []
237
236
  require_paths:
238
237
  - lib
@@ -247,9 +246,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
246
  - !ruby/object:Gem::Version
248
247
  version: '0'
249
248
  requirements: []
250
- rubyforge_project:
251
- rubygems_version: 2.6.11
252
- signing_key:
249
+ rubygems_version: 3.4.19
250
+ signing_key:
253
251
  specification_version: 4
254
252
  summary: A Ruby implementation of OpenXmlPackage from Microsoft's Open XML SDK
255
253
  test_files: []
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- # .travis.yml
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- script:
6
- - bundle exec rake test
@@ -1,19 +0,0 @@
1
- require "zip"
2
-
3
- module Zip
4
- class InputStream
5
- protected
6
-
7
- alias _old_get_io get_io
8
-
9
- # The problem in RubyZip 1.1.0 is that we only call `seek`
10
- # when `io` is a File. We need to move the cursor to the
11
- # right position when `io` is a StringIO as well.
12
- def get_io(io, offset=0)
13
- io = ::File.open(io, "rb") unless io.is_a?(IO) || io.is_a?(StringIO)
14
- io.seek(offset, ::IO::SEEK_SET)
15
- io
16
- end
17
-
18
- end
19
- end