nokogiri-plist 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/nokogiri-plist/generator.rb +5 -1
- data/lib/nokogiri-plist/version.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Nokogiri-plist provides the functionality for dealing with XML in Apple's property list format.
|
6
6
|
|
7
|
-
There is already a plist gem (http://github.com/bleything/plist) that has similar functionality. I didn't realize it until I had written most of this gem. However this gem uses Nokogiri, so the implementation is simpler. The plist gem does
|
7
|
+
There is already a plist gem (http://github.com/bleything/plist) that has similar functionality. I didn't realize it until I had written most of this gem. However this gem uses Nokogiri, so the implementation is simpler. The plist gem does its own XML parsing. I figured since I was already using Nokogiri in my project, it's better to build on top of that. I did get ideas from the original gem. I have benchmarked my gem against that gem and it performs similarly. Once I come up with a little more scientific benchmarks, I'll show them.'
|
8
8
|
|
9
9
|
|
10
10
|
== FEATURES:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'bigdecimal'
|
2
|
+
|
1
3
|
module NokogiriPList
|
2
4
|
|
3
5
|
class Generator
|
@@ -36,6 +38,8 @@ module NokogiriPList
|
|
36
38
|
tag("integer", value, current_indent)
|
37
39
|
when Float
|
38
40
|
tag("real", value, current_indent)
|
41
|
+
when BigDecimal
|
42
|
+
tag("real", value.to_s('F'), current_indent)
|
39
43
|
end
|
40
44
|
end
|
41
45
|
|
@@ -62,8 +66,8 @@ module NokogiriPList
|
|
62
66
|
|
63
67
|
end
|
64
68
|
|
65
|
-
[String, Symbol, Integer, Float, Date, Time, Hash, Array, TrueClass, FalseClass].each do |klass|
|
66
69
|
|
70
|
+
[String, Symbol, Integer, Float, BigDecimal, Date, Time, Hash, Array, TrueClass, FalseClass].each do |klass|
|
67
71
|
klass.class_eval do
|
68
72
|
|
69
73
|
def to_plist_xml(current_indent = 0)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: nokogiri-plist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.5.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Casey Howard
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-08
|
13
|
+
date: 2011-09-08 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|