xmlss 0.2.2 → 0.3.0

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xmlss (0.2.2)
4
+ xmlss (0.3.0)
5
5
  enumeration (~> 1.2)
6
6
  nokogiri (~> 1.4.0)
7
7
 
@@ -5,7 +5,8 @@ module Xmlss::Style
5
5
  { :node => :font,
6
6
  :attributes => [
7
7
  :bold, :color, :italic, :size, :shadow,
8
- :strike_through, :underline, :vertical_align
8
+ :strike_through, :underline, :vertical_align,
9
+ :font_name
9
10
  ] }
10
11
  end
11
12
 
@@ -22,7 +23,8 @@ module Xmlss::Style
22
23
  }
23
24
  alias_method :vertical_align, :alignment
24
25
 
25
- attr_accessor :bold, :color, :italic, :size, :strike_through, :shadow
26
+ attr_accessor :bold, :color, :italic, :size, :strike_through, :shadow, :name
27
+ alias :font_name :name
26
28
 
27
29
  def initialize(attrs={})
28
30
  self.bold = attrs[:bold] || false
@@ -33,6 +35,7 @@ module Xmlss::Style
33
35
  self.shadow = attrs[:shadow] || false
34
36
  self.underline = attrs[:underline]
35
37
  self.alignment = attrs[:alignment]
38
+ self.name = attrs[:name]
36
39
  end
37
40
 
38
41
  def bold?; !!self.bold; end
data/lib/xmlss/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xmlss
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -32,7 +32,7 @@ module Xmlss::Style
32
32
  end
33
33
 
34
34
  should have_accessors :bold, :color, :italic, :size, :strike_through, :shadow
35
- should have_accessors :underline, :alignment
35
+ should have_accessors :underline, :alignment, :name
36
36
  should have_instance_methods :bold?, :italic?, :strike_through?, :shadow?
37
37
  should have_reader :vertical_align
38
38
 
@@ -45,6 +45,7 @@ module Xmlss::Style
45
45
  assert_equal false, subject.shadow
46
46
  assert_equal nil, subject.underline
47
47
  assert_equal nil, subject.alignment
48
+ assert_equal nil, subject.name
48
49
  end
49
50
 
50
51
  should "set attrs at init" do
@@ -55,7 +56,8 @@ module Xmlss::Style
55
56
  :size => 10,
56
57
  :strike_through => true,
57
58
  :underline => :single,
58
- :alignment => :superscript
59
+ :alignment => :superscript,
60
+ :name => 'Verdana'
59
61
  }
60
62
  font = Font.new(attrs)
61
63
 
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-26 00:00:00 Z
18
+ date: 2011-09-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :development