xoxo 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/.ruby +2 -2
  2. data/HISTORY.rdoc +9 -0
  3. data/QED.rdoc +97 -0
  4. metadata +8 -6
data/.ruby CHANGED
@@ -38,11 +38,11 @@ revision: 0
38
38
  created: '2006-01-01'
39
39
  summary: XOXO Parser and Generator
40
40
  title: XOXO
41
- version: 1.2.0
41
+ version: 1.2.1
42
42
  name: xoxo
43
43
  description: ! "XOXO is a Ruby XOXO parser and generator. It provides a Ruby API \nsimilar
44
44
  to Marshal and YAML (though more specific) to load and dump\nXOXO[http://microformats.org/wiki/xoxo],
45
- an simple, open outline\nformat written in standard XHTML and suitable for embedding
45
+ a simple, open outline\nformat written in standard XHTML and suitable for embedding
46
46
  in\n(X)HTML, Atom, RSS, and arbitrary XML."
47
47
  organization: rubyworks
48
48
  date: '2011-10-26'
@@ -1,5 +1,14 @@
1
1
  = RELEASE HISTORY
2
2
 
3
+ == 1.2.1 | 2011-10-27
4
+
5
+ Add missing QED.rdoc file, so it will show up in YARD docs.
6
+
7
+ Changes:
8
+
9
+ * Add QED.rdoc to gem.
10
+
11
+
3
12
  == 1.2.0 | 2011-10-26
4
13
 
5
14
  Converting Hashes with 'url' for a key are treated completely as `a` tags.
@@ -0,0 +1,97 @@
1
+ = to_xoxo
2
+
3
+ Any object can be serialized as an XOXO document easily with the #to_xoxo
4
+ method.
5
+
6
+ == String
7
+
8
+ "This is an example".to_xoxo
9
+
10
+ serializes to:
11
+
12
+ <ol class="xoxo">
13
+ <li>This is an example</li>
14
+ </ol>
15
+
16
+ == Array
17
+
18
+ ["one", "two", "three"].to_xoxo
19
+
20
+ serializes to:
21
+
22
+ <ol class="xoxo">
23
+ <li>one</li>
24
+ <li>two</li>
25
+ <li>three</li>
26
+ </ol>
27
+
28
+ == Hash
29
+
30
+ {"one"=>1, "two"=>2, "three"=>3}.to_xoxo
31
+
32
+ With some implementations of Ruby Hash order is not preserved. So,
33
+
34
+ @_.assert.include?('<ol class="xoxo">')
35
+ @_.assert.include?('<dt>one</dt><dd>1</dd>')
36
+ @_.assert.include?('<dt>two</dt><dd>2</dd>')
37
+ @_.assert.include?('<dt>three</dt><dd>3</dd>')
38
+
39
+ It would otherwise look like this:
40
+
41
+ <ol class="xoxo">
42
+ <li>
43
+ <dl>
44
+ <dt>a</dt><dd>1</dd>
45
+ <dt>b</dt><dd>2</dd>
46
+ <dt>c</dt><dd>3</dd>
47
+ </dl>
48
+ </li>
49
+ </ol>
50
+
51
+ == Struct
52
+
53
+ c = Struct.new(:a, :b, :c)
54
+ s = c.new(1,2,3)
55
+
56
+ s.to_xoxo
57
+
58
+ With some implementations of Ruby Stuct order is not preserved. So,
59
+
60
+ @_.assert.include?('<ol class="xoxo">')
61
+ @_.assert.include?('<dt>a</dt><dd>1</dd>')
62
+ @_.assert.include?('<dt>b</dt><dd>2</dd>')
63
+ @_.assert.include?('<dt>c</dt><dd>3</dd>')
64
+
65
+ It would otherwise look like this:
66
+
67
+ <ol class="xoxo">
68
+ <li>
69
+ <dl>
70
+ <dt>a</dt><dd>1</dd>
71
+ <dt>b</dt><dd>2</dd>
72
+ <dt>c</dt><dd>3</dd>
73
+ </dl>
74
+ </li>
75
+ </ol>
76
+
77
+ == Object
78
+
79
+ class C
80
+ def initialize(a,b,c)
81
+ @a, @b, @c = a, b, c
82
+ end
83
+ end
84
+
85
+ c = C.new(1,2,3)
86
+
87
+ c.to_xoxo
88
+
89
+ Instance attributes are not stored in order. So
90
+
91
+ @_.assert.include?('<ol class="xoxo">')
92
+ @_.assert.include?('<dt>a</dt><dd>1</dd>')
93
+ @_.assert.include?('<dt>b</dt><dd>2</dd>')
94
+ @_.assert.include?('<dt>c</dt><dd>3</dd>')
95
+
96
+
97
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xoxo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-10-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: detroit
17
- requirement: &10737640 !ruby/object:Gem::Requirement
17
+ requirement: &22110100 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *10737640
25
+ version_requirements: *22110100
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: qed
28
- requirement: &10726380 !ruby/object:Gem::Requirement
28
+ requirement: &22103800 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *10726380
36
+ version_requirements: *22103800
37
37
  description: ! "XOXO is a Ruby XOXO parser and generator. It provides a Ruby API \nsimilar
38
38
  to Marshal and YAML (though more specific) to load and dump\nXOXO[http://microformats.org/wiki/xoxo],
39
- an simple, open outline\nformat written in standard XHTML and suitable for embedding
39
+ a simple, open outline\nformat written in standard XHTML and suitable for embedding
40
40
  in\n(X)HTML, Atom, RSS, and arbitrary XML."
41
41
  email:
42
42
  - transfire@gmail.com
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files:
47
47
  - HISTORY.rdoc
48
48
  - README.rdoc
49
+ - QED.rdoc
49
50
  - COPYING.rdoc
50
51
  files:
51
52
  - .ruby
@@ -56,6 +57,7 @@ files:
56
57
  - test/test_xoxo.rb
57
58
  - HISTORY.rdoc
58
59
  - README.rdoc
60
+ - QED.rdoc
59
61
  - COPYING.rdoc
60
62
  homepage: http://rubyworks.github.com/xoxo
61
63
  licenses: