prawn-icon 3.1.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,7 @@ module Prawn
54
54
  [Prawn::Icon - DEPRECATION WARNING]
55
55
  FontAwesome 4 icon was referenced as '#{old_key}'.
56
56
  Use the FontAwesome 5 icon '#{new_key}' instead.
57
- This compatibility layer will be removed in Prawn::Icon 4.0.0.
57
+ This compatibility layer will be removed in a future major release.
58
58
  DEPRECATION
59
59
  end
60
60
  end
@@ -8,6 +8,6 @@
8
8
 
9
9
  module Prawn
10
10
  class Icon
11
- VERSION = '3.1.0'
11
+ VERSION = '4.0.0'
12
12
  end
13
13
  end
@@ -68,7 +68,7 @@ describe Prawn::Icon::Interface do
68
68
  inspector = PDF::Inspector::Text.analyze(pdf.render)
69
69
  y = inspector.positions[1].last.round
70
70
 
71
- expect(y).to eq(723)
71
+ expect(y).to eq(722)
72
72
  end
73
73
  end
74
74
  end
@@ -154,7 +154,7 @@ describe Prawn::Icon::Interface do
154
154
  x, y = inspector.positions[0]
155
155
 
156
156
  expect(x).to eq(200)
157
- expect(y.round).to eq(90)
157
+ expect(y.round).to eq(89)
158
158
  end
159
159
 
160
160
  it 'handles final_gap: false correctly' do
@@ -267,7 +267,13 @@ describe Prawn::Icon do
267
267
  pdf.icon 'mdi-beer'
268
268
  text = PDF::Inspector::Text.analyze(pdf.render)
269
269
 
270
- expect(text.strings.first).to eq('')
270
+ # NOTE: Prawn <= 2.4.0 incorrectly handled unicode codepoints
271
+ # see: https://github.com/prawnpdf/prawn/pull/1327#issuecomment-1905817491
272
+ if Gem::Version.new(Prawn::VERSION) <= Gem::Version.new('2.4.0')
273
+ expect(text.strings.first).to eq("\u{F009}")
274
+ else
275
+ expect(text.strings.first).to eq("\u{F0098}")
276
+ end
271
277
  end
272
278
  end
273
279
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-icon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Doyle
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-02 00:00:00.000000000 Z
11
+ date: 2024-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn
@@ -188,7 +188,7 @@ licenses:
188
188
  - GPL-3
189
189
  metadata:
190
190
  rubygems_mfa_required: 'true'
191
- post_install_message:
191
+ post_install_message:
192
192
  rdoc_options: []
193
193
  require_paths:
194
194
  - lib
@@ -203,8 +203,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: 1.3.6
205
205
  requirements: []
206
- rubygems_version: 3.3.8
207
- signing_key:
206
+ rubygems_version: 3.5.23
207
+ signing_key:
208
208
  specification_version: 4
209
209
  summary: Provides icon fonts for PrawnPDF
210
210
  test_files: []