caracal_the_curve 1.4.5 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45e42709e5e6dd37c33347d099b56c90db0dfff8309539fe75da327279f34065
4
- data.tar.gz: 9c6d77453283e2a10e66f9224606bf2f445307143cf20395fa815b5ab1da71a9
3
+ metadata.gz: 6b7d0d5d9b35877b39809e95f771ae3c74415aff106d025684c9894bb64dc0e8
4
+ data.tar.gz: 832445128c4d74667febd458681f727c594069732795237dc005a02773ffe267
5
5
  SHA512:
6
- metadata.gz: 006140646a3c87366f118d25b3e62fc72386d849c57a9a5858253b4543b5a75e6978dda390d2ae547d1f3bfc4472c4e4fbf3f6364333ac96967bd628e1ff7c7a
7
- data.tar.gz: cb58b0fecf147183b867ebae009e972a95583a76094a30716751833383d3c9e0388f300b8b97ecbffcb0c27afb35cf1f448718c6a9f5c0c91170bfb94a9fb5f4
6
+ metadata.gz: 9c5d610541a8b4c88f8c7206213d0640e20a46b33ed305b5db5d2fe87163ed4d6c3940d9a1dc4d947b72316f3322a9c5eb3fbbe324818945457c0fb44b8f69d0
7
+ data.tar.gz: ccb1bc7b039ef8572da684d960fc0254b78fe5e8e885cdc275f1b06cfc8192cae2fe0f9d2920cf8cc6233945a606fe1551f2a3dd17cb25aec77105b325c50517
@@ -251,7 +251,7 @@ module Caracal
251
251
  if rel.relationship_data.to_s.size > 0
252
252
  content = rel.relationship_data
253
253
  else
254
- content = open(rel.relationship_target).read
254
+ content = URI.open(rel.relationship_target).read
255
255
  end
256
256
 
257
257
  zip.put_next_entry("word/#{ rel.formatted_target }")
@@ -367,17 +367,7 @@ module Caracal
367
367
  end
368
368
 
369
369
  def render_pagebreak(xml, model)
370
- if model.page_break_wrap
371
- xml['w'].p paragraph_options do
372
- xml['w'].r run_options do
373
- xml['w'].br({ 'w:type' => 'page' })
374
- end
375
- end
376
- else
377
- xml['w'].r run_options do
378
- xml['w'].br({ 'w:type' => 'page' })
379
- end
380
- end
370
+ @pagebreak_on_next_paragraph = true
381
371
  end
382
372
 
383
373
  def render_paragraph(xml, model)
@@ -389,6 +379,10 @@ module Caracal
389
379
  xml['w'].contextualSpacing({ 'w:val' => '0' })
390
380
  xml['w'].jc({ 'w:val' => model.paragraph_align }) unless model.paragraph_align.nil?
391
381
  render_run_attributes(xml, model, true)
382
+ if @pagebreak_on_next_paragraph
383
+ xml['w'].pageBreakBefore
384
+ @pagebreak_on_next_paragraph = false
385
+ end
392
386
  end
393
387
  model.runs.each do |run|
394
388
  method = render_method_for_model(run)
@@ -1,3 +1,3 @@
1
1
  module Caracal
2
- VERSION = '1.4.5'
2
+ VERSION = '1.4.7'
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caracal_the_curve
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trade Infomatics
8
8
  - John Dugan
9
9
  - James Ridgway
10
10
  - Matthew Barber
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-02-07 00:00:00.000000000 Z
14
+ date: 2025-05-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: nokogiri
@@ -250,7 +250,7 @@ homepage: https://github.com/trade-informatics/caracal
250
250
  licenses:
251
251
  - MIT
252
252
  metadata: {}
253
- post_install_message:
253
+ post_install_message:
254
254
  rdoc_options: []
255
255
  require_paths:
256
256
  - lib
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  version: '0'
267
267
  requirements: []
268
268
  rubygems_version: 3.4.19
269
- signing_key:
269
+ signing_key:
270
270
  specification_version: 4
271
271
  summary: Fast, professional Microsoft Word (docx) writer for Ruby.
272
272
  test_files: