microformats2 2.0.0.pre3 → 2.0.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,6 +18,7 @@ Implemented:
18
18
  * [parsing implied properties](http://microformats.org/wiki/microformats-2-parsing#parsing_for_implied_properties)
19
19
  * nested properties
20
20
  * nested microformat with associated property
21
+ * dynamic creation of properties
21
22
 
22
23
  Not Implemented:
23
24
 
@@ -32,7 +33,7 @@ Not Implemented:
32
33
 
33
34
  ## Current Version
34
35
 
35
- 2.0.0.pre2
36
+ 2.0.0.pre4
36
37
 
37
38
 
38
39
  ## Requirements
@@ -75,7 +76,9 @@ collection.cards.first.names.first.to_s #=> "Jessica Lynn Suttles"
75
76
  ## Authors
76
77
 
77
78
  * Jessica Lynn Suttles / [@jlsuttles](https://github.com/jlsuttles)
78
-
79
+ * Shane Becker / [@veganstraightedge](https://github.com/veganstraightedge)
80
+ * Chris Stringer / [@jcstringer](https://github.com/jcstringer)
81
+ * Michael Mitchell / [@variousred](https://github.com/variousred)
79
82
 
80
83
  ## Contributions
81
84
 
@@ -1,9 +1,6 @@
1
1
  module Microformats2
2
2
  module Property
3
3
  class DateTime < Foundation
4
- def to_s
5
- @to_s ||= value_class_pattern || element_value || text_value
6
- end
7
4
 
8
5
  def value
9
6
  ::DateTime.parse(to_s)
@@ -2,7 +2,7 @@ module Microformats2
2
2
  module Property
3
3
  class Embedded < Foundation
4
4
  def to_s
5
- @to_s ||= @element.inner_html.strip
5
+ @to_s ||= string_value || @element.inner_html.strip
6
6
  end
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module Microformats2
2
- VERSION = "2.0.0.pre3"
2
+ VERSION = "2.0.0.pre4"
3
3
  end
@@ -83,6 +83,10 @@ describe Microformats2::Collection do
83
83
  @collection.first.add_property("p-foo", value)
84
84
  @collection.first.to_json.should include(value)
85
85
  end
86
+ it "supports Embedded" do
87
+ @collection.first.add_property("e-foo", value)
88
+ @collection.first.foo.to_s.should == value
89
+ end
86
90
  it "raises a InvalidPropertyPrefix error if the prefix is invalid" do
87
91
  expect {
88
92
  @collection.first.add_property("xxx-foo", value)
metadata CHANGED
@@ -1,178 +1,168 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: microformats2
3
- version: !ruby/object:Gem::Version
4
- hash: 3405954395
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0.pre4
5
5
  prerelease: 6
6
- segments:
7
- - 2
8
- - 0
9
- - 0
10
- - pre
11
- - 3
12
- version: 2.0.0.pre3
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Jessica Lynn Suttles
16
9
  autorequire:
17
10
  bindir: bin
18
11
  cert_chain: []
19
-
20
- date: 2013-03-26 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
12
+ date: 2013-04-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: nokogiri
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
26
17
  none: false
27
- requirements:
18
+ requirements:
28
19
  - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 15
31
- segments:
32
- - 1
33
- - 5
34
- - 6
20
+ - !ruby/object:Gem::Version
35
21
  version: 1.5.6
36
22
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: json
40
23
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.6
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
42
33
  none: false
43
- requirements:
34
+ requirements:
44
35
  - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 7
47
- segments:
48
- - 1
49
- - 7
50
- - 6
36
+ - !ruby/object:Gem::Version
51
37
  version: 1.7.6
52
38
  type: :runtime
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: activesupport
56
39
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.7.6
46
+ - !ruby/object:Gem::Dependency
47
+ name: activesupport
48
+ requirement: !ruby/object:Gem::Requirement
58
49
  none: false
59
- requirements:
50
+ requirements:
60
51
  - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 21
63
- segments:
64
- - 3
65
- - 2
66
- - 13
52
+ - !ruby/object:Gem::Version
67
53
  version: 3.2.13
68
54
  type: :runtime
69
- version_requirements: *id003
70
- - !ruby/object:Gem::Dependency
71
- name: rake
72
55
  prerelease: false
73
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
74
57
  none: false
75
- requirements:
58
+ requirements:
76
59
  - - ~>
77
- - !ruby/object:Gem::Version
78
- hash: 79
79
- segments:
80
- - 10
81
- - 0
82
- - 0
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.13
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
83
69
  version: 10.0.0
84
70
  type: :development
85
- version_requirements: *id004
86
- - !ruby/object:Gem::Dependency
87
- name: rspec
88
71
  prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
90
73
  none: false
91
- requirements:
74
+ requirements:
92
75
  - - ~>
93
- - !ruby/object:Gem::Version
94
- hash: 35
95
- segments:
96
- - 2
97
- - 11
98
- - 0
76
+ - !ruby/object:Gem::Version
77
+ version: 10.0.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
99
85
  version: 2.11.0
100
86
  type: :development
101
- version_requirements: *id005
102
- - !ruby/object:Gem::Dependency
103
- name: guard-rspec
104
87
  prerelease: false
105
- requirement: &id006 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
106
89
  none: false
107
- requirements:
90
+ requirements:
108
91
  - - ~>
109
- - !ruby/object:Gem::Version
110
- hash: 11
111
- segments:
112
- - 2
113
- - 1
114
- - 0
92
+ - !ruby/object:Gem::Version
93
+ version: 2.11.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: guard-rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
115
101
  version: 2.1.0
116
102
  type: :development
117
- version_requirements: *id006
118
- - !ruby/object:Gem::Dependency
119
- name: rb-fsevent
120
103
  prerelease: false
121
- requirement: &id007 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
122
105
  none: false
123
- requirements:
106
+ requirements:
124
107
  - - ~>
125
- - !ruby/object:Gem::Version
126
- hash: 57
127
- segments:
128
- - 0
129
- - 9
130
- - 1
108
+ - !ruby/object:Gem::Version
109
+ version: 2.1.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: rb-fsevent
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
131
117
  version: 0.9.1
132
118
  type: :development
133
- version_requirements: *id007
134
- - !ruby/object:Gem::Dependency
135
- name: simplecov
136
119
  prerelease: false
137
- requirement: &id008 !ruby/object:Gem::Requirement
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 0.9.1
126
+ - !ruby/object:Gem::Dependency
127
+ name: simplecov
128
+ requirement: !ruby/object:Gem::Requirement
138
129
  none: false
139
- requirements:
130
+ requirements:
140
131
  - - ~>
141
- - !ruby/object:Gem::Version
142
- hash: 1
143
- segments:
144
- - 0
145
- - 7
146
- - 1
132
+ - !ruby/object:Gem::Version
147
133
  version: 0.7.1
148
134
  type: :development
149
- version_requirements: *id008
150
- - !ruby/object:Gem::Dependency
151
- name: debugger
152
135
  prerelease: false
153
- requirement: &id009 !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
154
137
  none: false
155
- requirements:
138
+ requirements:
156
139
  - - ~>
157
- - !ruby/object:Gem::Version
158
- hash: 29
159
- segments:
160
- - 1
161
- - 2
162
- - 1
140
+ - !ruby/object:Gem::Version
141
+ version: 0.7.1
142
+ - !ruby/object:Gem::Dependency
143
+ name: debugger
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
163
149
  version: 1.2.1
164
150
  type: :development
165
- version_requirements: *id009
166
- description: parses HTML for microformats and return a collection of dynamically defined Ruby objects
167
- email:
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 1.2.1
158
+ description: parses HTML for microformats and return a collection of dynamically defined
159
+ Ruby objects
160
+ email:
168
161
  - jlsuttles@gmail.com
169
162
  executables: []
170
-
171
163
  extensions: []
172
-
173
164
  extra_rdoc_files: []
174
-
175
- files:
165
+ files:
176
166
  - .gitignore
177
167
  - .rspec
178
168
  - .travis.yml
@@ -371,40 +361,32 @@ files:
371
361
  - spec/support/lib/microformats2/simple.js
372
362
  homepage: https://github.com/G5/microformats2
373
363
  licenses: []
374
-
375
364
  post_install_message:
376
365
  rdoc_options: []
377
-
378
- require_paths:
366
+ require_paths:
379
367
  - lib
380
- required_ruby_version: !ruby/object:Gem::Requirement
368
+ required_ruby_version: !ruby/object:Gem::Requirement
381
369
  none: false
382
- requirements:
383
- - - ">="
384
- - !ruby/object:Gem::Version
385
- hash: 3
386
- segments:
370
+ requirements:
371
+ - - ! '>='
372
+ - !ruby/object:Gem::Version
373
+ version: '0'
374
+ segments:
387
375
  - 0
388
- version: "0"
389
- required_rubygems_version: !ruby/object:Gem::Requirement
376
+ hash: 2813270681629112276
377
+ required_rubygems_version: !ruby/object:Gem::Requirement
390
378
  none: false
391
- requirements:
392
- - - ">"
393
- - !ruby/object:Gem::Version
394
- hash: 25
395
- segments:
396
- - 1
397
- - 3
398
- - 1
379
+ requirements:
380
+ - - ! '>'
381
+ - !ruby/object:Gem::Version
399
382
  version: 1.3.1
400
383
  requirements: []
401
-
402
384
  rubyforge_project:
403
- rubygems_version: 1.8.25
385
+ rubygems_version: 1.8.24
404
386
  signing_key:
405
387
  specification_version: 3
406
388
  summary: microformats2 parser
407
- test_files:
389
+ test_files:
408
390
  - spec/lib/microformats2/collection_spec.rb
409
391
  - spec/lib/microformats2/implied_property/name_spec.rb
410
392
  - spec/lib/microformats2/implied_property/photo_spec.rb