xlsx_writer 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZmU0NDJmNzRkNTEzZDc2NWMwMzk2ZGNmMzEwYmIzMjYzOGIzMDk5Yg==
5
- data.tar.gz: !binary |-
6
- YzZlMTkxOWVkOGNlYzk1NGI3ZWFjNTNiNjU1OThhMzM3ZjFjOGE4ZA==
2
+ SHA1:
3
+ metadata.gz: 1764266278de144b2b092f520beb3f9e6664a911
4
+ data.tar.gz: 6d6cc387b494b82393dd286bfbdebfc488c8f104
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NmRmMGE0ZDVkY2VmYTJiNDgyODU3Zjc1ZmIwNWEyYzY2ZjU1Zjk1MTk0ZmY4
10
- OWFhOGYwNTY3ZWUxOWI4ZTlhYjI1YzgxZjVhMmQ5Nzg1NDAyNjNiMjg2M2U3
11
- NDQ4MGRmZDFmYmRhY2YyYmU3ZDRmMzk1MmNiMmQyOTdmMjEyYmI=
12
- data.tar.gz: !binary |-
13
- NGNhMGVkZDc3NTkzN2ExYzVjNThjZjhmYWE1YjJlMzA3NGQyYTg5MTc2NmY4
14
- NTdiZjZjNjdlYmQwNTA5OGRkODgyMGJiYjUzMjM0ODZjNjQ5NzZkMDQyMGE1
15
- NGFlZjA3MDMxNjc4Y2ZkYWNmYjhhMmZiZDIwMWVlZjU0YjgyNTc=
6
+ metadata.gz: 4d4514e6c7d1cc29f86529455e052cb61625780df4eabcd2b52a0ef304e089ede7893fa19dd908b14aa38ed9e28e4804c38cd98dafd94b61816c6abcb5871b9c
7
+ data.tar.gz: b5547de43d51b73b160a5835da2d9af3f8aef476e1524b3823b4b60395ee731905543d887f6e27e153ecb3e630655b72123a9edbf643a79d3a4e4df4aca7004d
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.4.2 / 2014-04-18
2
+
3
+ * Enhancements
4
+
5
+ * Auto cast symbol to string - thanks @killthekitten in https://github.com/seamusabshere/xlsx_writer/pull/8
6
+
1
7
  0.4.1 / 2013-10-29
2
8
 
3
9
  * Bug fixes
@@ -26,7 +26,7 @@ class XlsxWriter
26
26
  value.class.name.to_sym
27
27
  end
28
28
  case hint
29
- when :NilClass
29
+ when :NilClass, :Symbol
30
30
  :String
31
31
  when :Fixnum
32
32
  :Integer
@@ -51,7 +51,7 @@ class XlsxWriter
51
51
  def type_name(type)
52
52
  TYPE_NAME[type] or raise "Don't know type name for #{type.inspect}. Must be #{TYPE_NAME.keys.map(&:inspect).join(', ')}."
53
53
  end
54
-
54
+
55
55
  # width = Truncate([{Number of Characters} * {Maximum Digit Width} + {5 pixel padding}]/{Maximum Digit Width}*256)/256
56
56
  # Using the Calibri font as an example, the maximum digit width of 11 point font size is 7 pixels (at 96 dpi). In fact, each digit is the same width for this font. Therefore if the cell width is 8 characters wide, the value of this attribute shall be Truncate([8*7+5]/7*256)/256 = 8.7109375.
57
57
  def pixel_width(value, type = nil)
@@ -205,7 +205,7 @@ class XlsxWriter
205
205
  def escaped_value
206
206
  @escaped_value ||= begin
207
207
  if type == :String
208
- row.sheet.document.shared_strings.ndx value
208
+ row.sheet.document.shared_strings.ndx value.to_s
209
209
  else
210
210
  Cell.escape value
211
211
  end
@@ -1,3 +1,3 @@
1
1
  class XlsxWriter
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -10,6 +10,7 @@ describe XlsxWriter do
10
10
  @sheet1.add_row(['hello', 'world'])
11
11
  @sheet1.add_row(['affirmative', true])
12
12
  @sheet1.add_row(['negative', false])
13
+ @sheet1.add_row(['symbol', :Symbol])
13
14
  end
14
15
  after do
15
16
  @doc.try :cleanup
@@ -132,7 +133,7 @@ describe XlsxWriter do
132
133
  # DATA
133
134
  sheet1.add_row(%w{DoB Name Occupation Number Integer Float})
134
135
  sheet1.add_row([
135
- Date.parse("July 31, 1912"),
136
+ Date.parse("July 31, 1912"),
136
137
  "Milton Friedman",
137
138
  "Economist / Statistician",
138
139
  {:type => :Currency, :value => 99_000_000},
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlsx_writer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dee Zsombor
@@ -10,118 +10,118 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-29 00:00:00.000000000 Z
13
+ date: 2014-04-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ! '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ! '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: fast_xs
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ! '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ! '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: unix_utils
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ! '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ! '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: minitest
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ! '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ! '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: minitest-reporters
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ! '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ! '>='
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: yard
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ! '>='
96
+ - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: remote_table
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ! '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - ! '>='
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: ruby-decimal
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - ! '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - ! '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  description: Writes XLSX files. Minimal XML and style. Supports autofilters and headers/footers
@@ -132,8 +132,8 @@ executables: []
132
132
  extensions: []
133
133
  extra_rdoc_files: []
134
134
  files:
135
- - .bundle/config
136
- - .gitignore
135
+ - ".bundle/config"
136
+ - ".gitignore"
137
137
  - CHANGELOG
138
138
  - Gemfile
139
139
  - LICENSE
@@ -187,17 +187,17 @@ require_paths:
187
187
  - lib
188
188
  required_ruby_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - ! '>='
190
+ - - ">="
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - ! '>='
195
+ - - ">="
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.1.5
200
+ rubygems_version: 2.2.2
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Writes XLSX files. Minimal XML and style. Supports autofilters and headers/footers
@@ -207,4 +207,3 @@ test_files:
207
207
  - test/support/image1.emf
208
208
  - test/support/image2.emf
209
209
  - test/test_xlsx_writer.rb
210
- has_rdoc: