rodf 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 6d5bdd76cb3b3ddf5b262b30b74190fc932c096ef74ddce506ccece191a1b4c4
4
- data.tar.gz: 40949bf8a0bfe4fe39a89a7b34e8a97814e3160e94f762f34abab16dfcfb4322
3
+ metadata.gz: 448589026c98db61c56b1f4078725adf5cb08282a9257cc0be55ba6f6d90d885
4
+ data.tar.gz: 2c387630e0250037207433aad4fc886a7e5cbddf624fb1b1943d0aae6585fd7d
5
5
  SHA512:
6
- metadata.gz: af1a5477be81146254b67ac087bf67c1fc8b28e03f327699e3678a3cacb2017b3c3792d4b422a4585c299cdc2ce0930841db0ecdac67b43cc73028613e5fef9e
7
- data.tar.gz: 5358ba34d162d5ef45775813458fcf2a0a0ab10b191d2c42c012f5c0807f7517c1377f09d998cfe69424c2b1b96fe75a054f6fa60e2852038455a9684b755c2a
6
+ metadata.gz: 974dc5d9c321154811ed47ce27f1c04d065542c08242bbc0f65f9c3c3e685cd80b3165b9ddc0f10eebfc13643cbb38aef48dd92da83dc367990afac78f46d783
7
+ data.tar.gz: ad463dcab3b3589b4e29fc50b224323a05a23cc662923bf73bcc02b49105daee0de0ee72cbe29c0843a12df6ecef7d25742c295aaee3f8dc8f54544961ad8e08
@@ -1,10 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## Unreleased
4
+ - Nothing yet
5
+
6
+ ## v1.1.1
7
+ - [Issue #36](https://github.com/westonganger/rodf/issues/36) - Improve compatibility for Float Cells
8
+ - Fix gemspec require for Ruby 1.9
9
+ - Cleanup File Commenting
10
+
3
11
  ## v1.1.0
4
- * [#34](https://github.com/westonganger/rodf/pull/34) - Add ability to add many rows or cells at once
5
- * [#29](https://github.com/westonganger/rodf/pull/29) - Remove ActiveSupport dependency in favor of `dry-inflector`
6
- * [#21](https://github.com/thiagoarrais/rodf/pull/21) - Allow more attributes for the `data_style` method
7
- * [#19](https://github.com/westonganger/rodf/issues/19) - Changes to Date/Time handling
12
+ - [#34](https://github.com/westonganger/rodf/pull/34) - Add ability to add many rows or cells at once
13
+ - [#29](https://github.com/westonganger/rodf/pull/29) - Remove ActiveSupport dependency in favor of `dry-inflector`
14
+ - [#21](https://github.com/thiagoarrais/rodf/pull/21) - Allow more attributes for the `data_style` method
15
+ - [#19](https://github.com/westonganger/rodf/issues/19) - Changes to Date/Time handling
8
16
 
9
17
  ## v1.0.0
10
18
  - Rename main module ODF to RODF, Fix cell types
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # RODF
2
2
  <a href="https://badge.fury.io/rb/rodf" target="_blank"><img height="21" style='border:0px;height:21px;' border='0' src="https://badge.fury.io/rb/rodf.svg" alt="Gem Version"></a>
3
- <a href='https://travis-ci.org/westonganger/rodf' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://api.travis-ci.org/westonganger/rodf.svg?branch=master' border='0' alt='Build Status' /></a>
3
+ <a href='https://travis-ci.com/westonganger/rodf' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://travis-ci.com/westonganger/rodf.svg?branch=master' border='0' alt='Build Status' /></a>
4
4
  <a href='https://rubygems.org/gems/rodf' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://ruby-gem-downloads-badge.herokuapp.com/rodf?label=rubygems&type=total&total_label=downloads&color=brightgreen' border='0' alt='RubyGems Downloads' /></a>
5
5
  <a href='https://ko-fi.com/A5071NK' target='_blank'><img height='22' style='border:0px;height:22px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>
6
6
 
7
- This is a library for writing to ODF output from Ruby. It mainly focuses creating ODS spreadsheets.
7
+ RODF is a library for writing to ODF output from Ruby. It mainly focuses creating ODS spreadsheets.
8
8
 
9
- As well as writing ODS spreadsheets, this library also can write ODT text documents but it is undocumented and will require knowledge of the ODF spec. It currently does not support ODP Slide shows.
10
-
11
- This is NOT an ODF reading library.
9
+ As well as writing ODS spreadsheets, this library also can write ODT text documents but it is undocumented and will require knowledge of the ODF spec. It currently does not support ODP Slide shows. Also this is NOT an ODF reading library.
12
10
 
13
11
  ## Install
14
12
 
@@ -18,7 +16,7 @@ gem install rodf
18
16
 
19
17
  ## How do I use it?
20
18
 
21
- rODF works pretty much like Builder, but with ODF-aware constructs. Try this:
19
+ RODF works pretty much like Builder, but with ODF-aware constructs. For example:
22
20
 
23
21
  ```ruby
24
22
  require 'rodf'
@@ -26,7 +24,7 @@ require 'rodf'
26
24
  RODF::Spreadsheet.file("my-spreadsheet.ods") do
27
25
  table 'My first table from Ruby' do
28
26
  row do
29
- cell 'Hello, rODF world!'
27
+ cell 'Hello world!'
30
28
  end
31
29
  end
32
30
  end
@@ -37,7 +35,7 @@ For access to variables and methods from outer code you can use block parameter:
37
35
  ```ruby
38
36
  require 'rodf'
39
37
 
40
- @data = 'Hello, rODF world!'
38
+ @data = 'Hello world!'
41
39
 
42
40
  RODF::Spreadsheet.file("my-spreadsheet.ods") do |spreadsheet|
43
41
  spreadsheet.table 'My first table from Ruby' do |table|
@@ -70,8 +68,7 @@ end
70
68
 
71
69
  ## Procedural style
72
70
 
73
- The declarative style shown above is just syntatic sugar. A more procedural
74
- style can also be used. Like so:
71
+ The declarative style shown above is just syntatic sugar. A more procedural style can also be used. Like so:
75
72
 
76
73
  ```ruby
77
74
  require 'rodf'
@@ -79,7 +76,7 @@ require 'rodf'
79
76
  ss = RODF::Spreadsheet.new
80
77
  t = ss.table 'My first table from Ruby'
81
78
  r = t.row
82
- c = r.cell 'Hello, rODF world!'
79
+ c = r.cell 'Hello world!'
83
80
 
84
81
  # two methods to write to file
85
82
  ss.write_to 'my-spreadsheet.ods'
@@ -96,7 +93,7 @@ require 'rodf'
96
93
  ss = RODF::Spreadsheet.new
97
94
  ss.table 'My first table from Ruby' do
98
95
  row do
99
- cell 'Hello, rODF world!'
96
+ cell 'Hello world!'
100
97
  end
101
98
  end
102
99
 
@@ -205,10 +202,8 @@ property :table,
205
202
  'writing-mode' => 'lr-tb',
206
203
  ```
207
204
 
208
-
209
205
  ## Credits
210
- Currently Maintained by [@westonganger](https://github.com/westonganger) for simplified ODS spreadsheet creation in the [spreadsheet_architect](https://github.com/westonganger/spreadsheet_architect) gem
211
206
 
212
207
  Originally Created by [@thiagoarrais](https://github.com/thiagoarrais)
213
208
 
214
- Created & Maintained by [Weston Ganger](https://westonganger.com) [(@westonganger)](https://github.com/westonganger) to support simplified ODS spreadsheet making in the [spreadsheet_architect](https://github.com/westonganger/spreadsheet_architect) gem
209
+ Maintained by [@westonganger](https://github.com/westonganger) since 2016, for simplified ODS spreadsheet creation within the [spreadsheet_architect](https://github.com/westonganger/spreadsheet_architect) gem
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'date'
6
2
 
7
3
  require 'builder'
@@ -74,10 +70,6 @@ module RODF
74
70
 
75
71
  private
76
72
 
77
- def contains_string?
78
- :string == @type && !empty?(@value)
79
- end
80
-
81
73
  def make_element_attributes(type, value, opts)
82
74
  attrs = {}
83
75
 
@@ -117,16 +109,25 @@ module RODF
117
109
  end
118
110
 
119
111
  def make_value_paragraph
120
- if contains_string?
121
- cell, value, url = self, @value, @url
122
-
123
- # Split out newlines to be new cells since the text has been escaped at this point
124
- value.to_s.split("\n").each do |split_value|
112
+ if !empty?(@value)
113
+ case @type
114
+ when :float
115
+ ### https://github.com/westonganger/rodf/issues/36
116
+ value = @value
125
117
  paragraph do
126
- if cell.contains_url?
127
- link split_value, href: url
128
- else
129
- self << split_value
118
+ self << value
119
+ end
120
+ when :string
121
+ cell, value, url = self, @value, @url
122
+
123
+ # Split out newlines to be new cells since the text has been escaped at this point
124
+ value.to_s.split("\n").each do |split_value|
125
+ paragraph do
126
+ if cell.contains_url?
127
+ link split_value, href: url
128
+ else
129
+ self << split_value
130
+ end
130
131
  end
131
132
  end
132
133
  end
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010-2012 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  if !String.method_defined? :to_xs
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'dry/inflector'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'zip'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'paragraph_container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'paragraph_container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'erb'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'compatibility'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require_relative 'data_style'
6
2
  require_relative 'document'
7
3
  require_relative 'hyperlink'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'container'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  module RODF
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'paragraph_container'
@@ -21,4 +17,3 @@ module RODF
21
17
  end
22
18
  end
23
19
  end
24
-
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2008 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'column'
@@ -1,7 +1,3 @@
1
- # Copyright (c) 2010 Thiago Arrais
2
- #
3
- # This file is part of rODF.
4
-
5
1
  require 'builder'
6
2
 
7
3
  require_relative 'document'
@@ -48,4 +44,3 @@ module RODF
48
44
  end
49
45
  end
50
46
  end
51
-
@@ -1,3 +1,3 @@
1
1
  module RODF
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
8
8
  - Thiago Arrais
9
- - Foivos Zakkak
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2019-02-12 00:00:00.000000000 Z
12
+ date: 2020-01-31 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: builder
@@ -179,8 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
178
  - !ruby/object:Gem::Version
180
179
  version: '0'
181
180
  requirements: []
182
- rubyforge_project:
183
- rubygems_version: 2.7.6
181
+ rubygems_version: 3.0.3
184
182
  signing_key:
185
183
  specification_version: 4
186
184
  summary: This is a library for writing to ODF output from Ruby. It mainly focuses