osheet 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osheet (0.8.0)
4
+ osheet (0.9.0)
5
5
  enumeration (~> 1.2)
6
6
  xmlss (~> 0.2)
7
7
 
@@ -9,12 +9,16 @@ GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
11
  ansi (1.3.0)
12
- assert (0.3.0)
12
+ assert (0.6.0)
13
+ assert-view (~> 0.3)
14
+ assert-view (0.3.0)
13
15
  ansi (~> 1.3)
16
+ undies (~> 1.1)
14
17
  enumeration (1.2.1)
15
18
  nokogiri (1.4.7)
16
19
  rake (0.9.2)
17
- xmlss (0.2.1)
20
+ undies (1.1.0)
21
+ xmlss (0.3.0)
18
22
  enumeration (~> 1.2)
19
23
  nokogiri (~> 1.4.0)
20
24
 
data/examples/styles.rb CHANGED
@@ -63,6 +63,8 @@ Osheet::Workbook.new {
63
63
  style('.font.sizeB') { font 14 }
64
64
  style('.font.colorA') { font '#FF0000' }
65
65
  style('.font.colorB') { font '#00FF00' }
66
+ style('.font.nameA') { font 'Courier' }
67
+ style('.font.nameB') { font 'Times New Roman' }
66
68
 
67
69
  worksheet {
68
70
  name "font"
@@ -113,6 +115,14 @@ Osheet::Workbook.new {
113
115
  }
114
116
  end
115
117
  }
118
+ row {
119
+ [:nameA, :nameB].each do |a|
120
+ cell {
121
+ data a.to_s
122
+ style_class "font #{a}"
123
+ }
124
+ end
125
+ }
116
126
  }
117
127
 
118
128
 
@@ -238,4 +248,4 @@ Osheet::Workbook.new {
238
248
 
239
249
 
240
250
 
241
- }.to_file('examples/styles.xls', :format)
251
+ }.to_file('examples/styles.xls', :format)
@@ -1,3 +1,3 @@
1
1
  module Osheet
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -97,6 +97,8 @@ module Osheet::XmlssWriter::Styles
97
97
  when ::String
98
98
  if font_cmd =~ /^#/
99
99
  [:color, font_cmd]
100
+ else
101
+ [:name, font_cmd]
100
102
  end
101
103
  when :bold, :italic, :shadow
102
104
  [font_cmd, true]
@@ -111,6 +111,7 @@ module Osheet
111
111
  end
112
112
  style('.font.size') { font 14 }
113
113
  style('.font.color') { font '#FF0000' }
114
+ style('.font.name') { font 'Verdana' }
114
115
  }
115
116
  end
116
117
 
@@ -145,6 +146,10 @@ module Osheet
145
146
  assert_equal '#FF0000', subject.send(:style, 'font color').font.color
146
147
  end
147
148
 
149
+ should "build style objs for font name" do
150
+ assert_equal 'Verdana', subject.send(:style, 'font name').font.name
151
+ end
152
+
148
153
  end
149
154
 
150
155
  class XmlssWriter::Bg < XmlssWriter::StylesTest
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osheet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
8
+ - 9
9
9
  - 0
10
- version: 0.8.0
10
+ version: 0.9.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -15,11 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-25 00:00:00 Z
18
+ date: 2011-09-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- prerelease: false
22
21
  type: :development
22
+ prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
@@ -30,11 +30,11 @@ dependencies:
30
30
  - 1
31
31
  - 0
32
32
  version: "1.0"
33
- name: bundler
34
33
  version_requirements: *id001
34
+ name: bundler
35
35
  - !ruby/object:Gem::Dependency
36
- prerelease: false
37
36
  type: :development
37
+ prerelease: false
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
@@ -45,11 +45,11 @@ dependencies:
45
45
  - 0
46
46
  - 3
47
47
  version: "0.3"
48
- name: assert
49
48
  version_requirements: *id002
49
+ name: assert
50
50
  - !ruby/object:Gem::Dependency
51
- prerelease: false
52
51
  type: :runtime
52
+ prerelease: false
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
@@ -60,11 +60,11 @@ dependencies:
60
60
  - 1
61
61
  - 2
62
62
  version: "1.2"
63
- name: enumeration
64
63
  version_requirements: *id003
64
+ name: enumeration
65
65
  - !ruby/object:Gem::Dependency
66
- prerelease: false
67
66
  type: :runtime
67
+ prerelease: false
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
70
70
  requirements:
@@ -75,8 +75,8 @@ dependencies:
75
75
  - 0
76
76
  - 2
77
77
  version: "0.2"
78
- name: xmlss
79
78
  version_requirements: *id004
79
+ name: xmlss
80
80
  description: A DSL for specifying and generating spreadsheets using Ruby
81
81
  email:
82
82
  - kelly@kelredd.com
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  requirements: []
201
201
 
202
202
  rubyforge_project:
203
- rubygems_version: 1.8.8
203
+ rubygems_version: 1.8.10
204
204
  signing_key:
205
205
  specification_version: 3
206
206
  summary: A DSL for specifying and generating spreadsheets using Ruby