podoff 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Makefile +1 -1
  4. data/lib/podoff.rb +5 -3
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1ef5ecc8cb922c5bd2725af0c936c9eb3291a353a05b2e927e103147e0da499
4
- data.tar.gz: e800a9be42f5c3c9ba12097d8c4edfad1a6e8722ae56887710c7939e65616095
3
+ metadata.gz: 1ad420a8e70f2922fb210c790029198637f8f0e02781b130085b69c4ac74832d
4
+ data.tar.gz: 23830be1137ebae7502a3fecd2d9c06c432564d4d59be81ffbc3c2182701cb16
5
5
  SHA512:
6
- metadata.gz: 2f9ab0d2349c2059c7c8d43695d4db10452cd0b4c2e86628852c5f858e8e6da918e93f3a57f200a9d0f88118ad328bf540d4233d1dff07a5407e4c9afc1ab17a
7
- data.tar.gz: 31ce324bce4473a96d8aa07737c1d1938df45af31987f05504f9809b248cbb517e37cdc6f3e7cec8dd4d7164aaafa734a6798ec1f2d915bb5551a552d7f609cb
6
+ metadata.gz: 6e260f8e869ea2a6cbb49e4dbfacb106b429ad8ea30b8d8362dadcc6f5e80708060ba3f470deb7f7f2121b094bb4b28b6f8247e434ccac9055e669475b0f7542
7
+ data.tar.gz: 76b2db5f127019578b4f9e1f07a8b9060619b7c932a5790b99493ba225301e9953c22405df73d0fdac52a14989285a9fd40debf50dd3f6ec4ccaca1b79606d83
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## podoff 1.4.0 released 2020-04-06
6
+
7
+ * Introduce Stream#deflate=bool
8
+
9
+
5
10
  ## podoff 1.3.0 released 2020-03-30
6
11
 
7
12
  * Introduce Podoff::Stream#line
data/Makefile CHANGED
@@ -28,7 +28,7 @@ build: gemspec_validate
28
28
  mv $(NAME)-$(VERSION).gem pkg/
29
29
 
30
30
  push: build
31
- gem push pkg/$(NAME)-$(VERSION).gem
31
+ gem push --otp "$(OTP)" pkg/$(NAME)-$(VERSION).gem
32
32
 
33
33
 
34
34
  .PHONY: count_lines gemspec_validate name cw build push
@@ -6,7 +6,7 @@ require 'stringio'
6
6
 
7
7
  module Podoff
8
8
 
9
- VERSION = '1.3.0'
9
+ VERSION = '1.4.0'
10
10
 
11
11
  def self.load(path, encoding)
12
12
 
@@ -494,13 +494,15 @@ module Podoff
494
494
  class Stream
495
495
 
496
496
  attr_accessor :obj
497
+ attr_accessor :deflate
497
498
 
498
- def initialize(obj=nil)
499
+ def initialize(obj=nil, opts={})
499
500
 
500
501
  @obj = obj
501
502
  @font = nil
502
503
  @color = nil
503
504
  @content = StringIO.new
505
+ @deflate = opts.has_key?(:deflate) ? opts[:deflate] : true
504
506
  end
505
507
 
506
508
  def tf(font_name, font_size)
@@ -588,7 +590,7 @@ module Podoff
588
590
 
589
591
  s = @content.string
590
592
  f = ''
591
- if s.length > 98
593
+ if @deflate && s.length > 98
592
594
  f = ' /Filter /FlateDecode'
593
595
  s = Zlib::Deflate.deflate(s)
594
596
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: podoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-30 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec