caracal 1.0.1 → 1.0.2

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
2
  SHA1:
3
- metadata.gz: 49b9cadac22d981a9ba90ceb29a2126e0ec0215a
4
- data.tar.gz: c12e57dd998ac3d6817543cc8bf7925383e77ad2
3
+ metadata.gz: aa886d1701a3fd3be57df67220f491dc020759ff
4
+ data.tar.gz: 0819776425e4c055c74946f6cf9c73622b8964cd
5
5
  SHA512:
6
- metadata.gz: 68abb86affc4e5e0d11747fe7d34396348b0d743a88f3260e486a8e19828640df9d01ea78cd8427fec5c292e62ba6db8923a07c0c5ad3eb2e3deef3410cbad04
7
- data.tar.gz: 26027a20cb6d3fd28727c85eff4f5c6806841523f9c350be00dd229c59533ee175106409cc3da4d3f9ffef3b742f935eac700d099368604ee30530285980274b
6
+ metadata.gz: 01bbb4a1ea7264b9f95363005af6acaa76796a1085a6ef3264645b4cd29f586a79bddcf87d458ae69d63fefd3570908367e7982cdf1705d608d5ab15dd593482
7
+ data.tar.gz: 8d116facbd2f0a0c7de17a85cf6694ffca5d8fd88799ccfd20159dbb13402f2e9ef6f57979d6982d2e462682749a93364e0323544602176396a1ce3a3a0c54c1
@@ -1,3 +1,9 @@
1
+ #### v1.0.2
2
+
3
+ * Enhancements
4
+ * Corrected image markup to support Word 2007 (@Alnoroid).
5
+
6
+
1
7
  #### v0.3.0
2
8
 
3
9
  * Deprecations
data/README.md CHANGED
@@ -12,6 +12,9 @@ Caracal is not a magical HTML to Word translator. Instead, it is a markup langua
12
12
 
13
13
  Or, said differently, if you use [Prawn](https://github.com/prawnpdf/prawn) for PDF generation, you'll probably like Caracal. Only you'll probably like it better. :)
14
14
 
15
+ Please see the [caracal-example](https://github.com/trade-informatics/caracal-example) repository for
16
+ a working demonstration of the library's capabilities.
17
+
15
18
 
16
19
  ## Teaser
17
20
 
@@ -42,7 +45,7 @@ Caracal::Document.save 'example.docx' do |docx|
42
45
  li 'Item 2'
43
46
  end
44
47
  docx.p
45
- docx.img image_url('graph.png'), width: 500, height: 300
48
+ docx.img 'https://www.example.com/logo.png', width: 500, height: 300
46
49
  end
47
50
  ```
48
51
 
@@ -533,7 +536,7 @@ Images can be added by using the `img` method. The method accepts several optio
533
536
  *Caracal will automatically embed the image in the Word document.*
534
537
 
535
538
  ```ruby
536
- docx.img image_url('example.png') do
539
+ docx.img 'https://www.example.com/logo.png' do
537
540
  data raw_data # sets the file data directly instead of opening the url
538
541
  width 396 # sets the image width. units specified in pixels.
539
542
  height 216 # sets the image height. units specified in pixels.
@@ -609,7 +612,7 @@ c1 = Caracal::Core::Models:TableCellModel.new do
609
612
 
610
613
  p 'This is a sentence above an image.'
611
614
  p
612
- img image_url('example.png'), width: 200, height: 100
615
+ img 'https://www.example.com/logo.png', width: 200, height: 100
613
616
  end
614
617
  ```
615
618
 
@@ -123,11 +123,11 @@ module Caracal
123
123
  xml.send 'pic:pic' do
124
124
  xml.send 'pic:nvPicPr' do
125
125
  xml.send 'pic:cNvPr', { id: rel_id, name: rel_name }
126
- xml.send 'pic:cNvPicPr', { preferRelativeSize: 0 }
126
+ xml.send 'pic:cNvPicPr'
127
127
  end
128
128
  xml.send 'pic:blipFill' do
129
129
  xml.send 'a:blip', { 'r:embed' => rel.formatted_id }
130
- xml.send 'a:srcRect', { t: 0, b: 0, r: 0, l: 0 }
130
+ xml.send 'a:srcRect'
131
131
  xml.send 'a:stretch' do
132
132
  xml.send 'a:fillRect'
133
133
  end
@@ -1,3 +1,3 @@
1
1
  module Caracal
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caracal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trade Infomatics
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-29 00:00:00.000000000 Z
12
+ date: 2015-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -257,3 +257,4 @@ test_files:
257
257
  - spec/lib/caracal/core/text_spec.rb
258
258
  - spec/lib/caracal/errors_spec.rb
259
259
  - spec/spec_helper.rb
260
+ has_rdoc: