rss-dcterms 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +1 -1
- data/README.markdown +1 -1
- data/lib/rss/dcterms/1.0.rb +5 -5
- data/lib/rss/dcterms/2.0.rb +3 -3
- data/lib/rss/dcterms/atom.rb +4 -4
- data/lib/rss/dcterms/property.rb +14 -14
- data/lib/rss/dcterms/version.rb +2 -2
- data/lib/rss/dcterms.rb +1 -1
- data/lib/rss/maker/dcterms.rb +21 -21
- data/rss-dcterms.gemspec +6 -3
- metadata +77 -44
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5d766e395814b8766d588e4d410c2652049ca33871168754494ecb7c22be4b1d
|
4
|
+
data.tar.gz: 4b7f4f0626e055bca838e9739f59226b1788c46f066eaaee97355e5b34083650
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4cf54152d2dcc66a292eb14e4255fa2285152325779c53c344ea36f77aacd207dad4cc4722df9af6b82099fe8e50339a45aa102ba369df29868a19abde2b9a6c
|
7
|
+
data.tar.gz: 122a11703c808a862ac39e4be635b9a8df9027a095a141f8648766ebfce2a57b5fcdc57df234a0db5157b83ed64f9039e84530376cb80c137d18d0c5bfebe1c8
|
data/LICENSE
CHANGED
data/README.markdown
CHANGED
data/lib/rss/dcterms/1.0.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'rss/1.0'
|
2
2
|
|
3
3
|
module RSS
|
4
|
-
RDF.install_ns(
|
4
|
+
RDF.install_ns(DCTerms::PREFIX, DCTerms::URI)
|
5
5
|
|
6
6
|
class RDF
|
7
|
-
class Channel; include
|
8
|
-
class Image; include
|
9
|
-
class Item; include
|
10
|
-
class Textinput; include
|
7
|
+
class Channel; include DCTerms::PropertyModel; end
|
8
|
+
class Image; include DCTerms::PropertyModel; end
|
9
|
+
class Item; include DCTerms::PropertyModel; end
|
10
|
+
class Textinput; include DCTerms::PropertyModel; end
|
11
11
|
end
|
12
12
|
end
|
data/lib/rss/dcterms/2.0.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'rss/2.0'
|
2
2
|
|
3
3
|
module RSS
|
4
|
-
Rss.install_ns(
|
4
|
+
Rss.install_ns(DCTerms::PREFIX, DCTerms::URI)
|
5
5
|
|
6
6
|
class Rss
|
7
7
|
class Channel
|
8
|
-
include
|
9
|
-
class Item; include
|
8
|
+
include DCTerms::PropertyModel
|
9
|
+
class Item; include DCTerms::PropertyModel; end
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/rss/dcterms/atom.rb
CHANGED
@@ -2,15 +2,15 @@ require 'rss/atom'
|
|
2
2
|
|
3
3
|
module RSS
|
4
4
|
module Atom
|
5
|
-
Feed.install_ns(
|
5
|
+
Feed.install_ns(DCTerms::PREFIX, DCTerms::URI)
|
6
6
|
|
7
7
|
class Feed
|
8
|
-
include
|
9
|
-
class Entry; include
|
8
|
+
include DCTerms::PropertyModel
|
9
|
+
class Entry; include DCTerms::PropertyModel; end
|
10
10
|
end
|
11
11
|
|
12
12
|
class Entry
|
13
|
-
include
|
13
|
+
include DCTerms::PropertyModel
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/rss/dcterms/property.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module RSS
|
2
|
-
module
|
2
|
+
module DCTerms
|
3
3
|
module BasePropertyModel
|
4
4
|
def append_features(klass)
|
5
5
|
super
|
@@ -9,7 +9,7 @@ module RSS
|
|
9
9
|
plural = plural_name || "#{name}s"
|
10
10
|
full_name = "#{PREFIX}_#{name}"
|
11
11
|
full_plural_name = "#{PREFIX}_#{plural}"
|
12
|
-
klass_name = "
|
12
|
+
klass_name = "DCTerms#{Utils.to_class_name(name)}"
|
13
13
|
klass.install_must_call_validator(PREFIX, URI)
|
14
14
|
klass.install_have_children_element(name, URI, "*",
|
15
15
|
full_name, full_plural_name)
|
@@ -117,15 +117,15 @@ module RSS
|
|
117
117
|
}
|
118
118
|
|
119
119
|
DATE_ELEMENTS = {
|
120
|
-
"date"
|
121
|
-
"available"
|
122
|
-
"created"
|
123
|
-
"dateAccepted"
|
120
|
+
"date" => "w3cdtf",
|
121
|
+
"available" => "w3cdtf",
|
122
|
+
"created" => "w3cdtf",
|
123
|
+
"dateAccepted" => "w3cdtf",
|
124
124
|
"dateCopyrighted" => "w3cdtf",
|
125
|
-
"dateSubmitted"
|
126
|
-
"issued"
|
127
|
-
"modified"
|
128
|
-
"valid"
|
125
|
+
"dateSubmitted" => "w3cdtf",
|
126
|
+
"issued" => "w3cdtf",
|
127
|
+
"modified" => "w3cdtf",
|
128
|
+
"valid" => "w3cdtf"
|
129
129
|
}
|
130
130
|
|
131
131
|
ELEMENT_NAME_INFOS = PropertyModel::TEXT_ELEMENTS.to_a
|
@@ -137,7 +137,7 @@ module RSS
|
|
137
137
|
|
138
138
|
ELEMENTS.each do |name, plural_name|
|
139
139
|
module_eval(<<-EOC, *get_file_and_line_from_caller(0))
|
140
|
-
class
|
140
|
+
class DCTerms#{Utils.to_class_name(name)} < Element
|
141
141
|
include RSS10
|
142
142
|
|
143
143
|
content_setup
|
@@ -184,7 +184,7 @@ module RSS
|
|
184
184
|
DATE_ELEMENTS.each do |name, type|
|
185
185
|
tag_name = "#{PREFIX}:#{name}"
|
186
186
|
module_eval(<<-EOC, *get_file_and_line_from_caller(0))
|
187
|
-
class
|
187
|
+
class DCTerms#{Utils.to_class_name(name)} < Element
|
188
188
|
remove_method(:content=)
|
189
189
|
remove_method(:value=)
|
190
190
|
|
@@ -196,11 +196,11 @@ module RSS
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
-
|
199
|
+
DCTerms::PropertyModel::ELEMENTS.each do |name|
|
200
200
|
class_name = Utils.to_class_name(name)
|
201
201
|
BaseListener.install_class_name(URI, name, class_name)
|
202
202
|
end
|
203
203
|
|
204
|
-
|
204
|
+
DCTerms::PropertyModel::ELEMENTS.collect! {|name| "#{PREFIX}_#{name}"}
|
205
205
|
end
|
206
206
|
end
|
data/lib/rss/dcterms/version.rb
CHANGED
data/lib/rss/dcterms.rb
CHANGED
data/lib/rss/maker/dcterms.rb
CHANGED
@@ -3,17 +3,17 @@ require 'rss/maker'
|
|
3
3
|
|
4
4
|
module RSS
|
5
5
|
module Maker
|
6
|
-
module
|
6
|
+
module DCTerms
|
7
7
|
module PropertyModel
|
8
8
|
class << self
|
9
9
|
def append_features(klass)
|
10
10
|
super
|
11
11
|
|
12
|
-
::RSS::
|
12
|
+
::RSS::DCTerms::PropertyModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
|
13
13
|
plural_name ||= "#{name}s"
|
14
|
-
full_name = "#{RSS::
|
15
|
-
full_plural_name = "#{RSS::
|
16
|
-
plural_klass_name = "
|
14
|
+
full_name = "#{RSS::DCTerms::PREFIX}_#{name}"
|
15
|
+
full_plural_name = "#{RSS::DCTerms::PREFIX}_#{plural_name}"
|
16
|
+
plural_klass_name = "DCTerms#{Utils.to_class_name(plural_name)}"
|
17
17
|
klass.def_classed_elements full_name, 'value', plural_klass_name,
|
18
18
|
full_plural_name, name
|
19
19
|
klass.module_eval(<<-EOC)
|
@@ -31,11 +31,11 @@ module RSS
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def install_dcterms_core(klass)
|
34
|
-
::RSS::
|
34
|
+
::RSS::DCTerms::PropertyModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
|
35
35
|
plural_name ||= "#{name}s"
|
36
36
|
klass_name = Utils.to_class_name(name)
|
37
|
-
full_klass_name = "
|
38
|
-
plural_klass_name = "
|
37
|
+
full_klass_name = "DCTerms#{klass_name}"
|
38
|
+
plural_klass_name = "DCTerms#{Utils.to_class_name(plural_name)}"
|
39
39
|
klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
|
40
40
|
class #{plural_klass_name} < #{plural_klass_name}Base
|
41
41
|
class #{full_klass_name} < #{full_klass_name}Base
|
@@ -47,13 +47,13 @@ EOC
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
::RSS::
|
50
|
+
::RSS::DCTerms::PropertyModel::ELEMENT_NAME_INFOS.each do |name, plural_name|
|
51
51
|
plural_name ||= "#{name}s"
|
52
|
-
full_name = "#{RSS::
|
53
|
-
full_plural_name = "#{RSS::
|
52
|
+
full_name = "#{RSS::DCTerms::PREFIX}_#{name}"
|
53
|
+
full_plural_name = "#{RSS::DCTerms::PREFIX}_#{plural_name}"
|
54
54
|
klass_name = Utils.to_class_name(name)
|
55
|
-
full_klass_name = "
|
56
|
-
plural_klass_name = "
|
55
|
+
full_klass_name = "DCTerms#{klass_name}"
|
56
|
+
plural_klass_name = "DCTerms#{Utils.to_class_name(plural_name)}"
|
57
57
|
module_eval(<<-EOC, __FILE__, __LINE__ + 1)
|
58
58
|
class #{plural_klass_name}Base < Base
|
59
59
|
def_array_element #{name.dump}, #{full_plural_name.dump},
|
@@ -84,35 +84,35 @@ EOC
|
|
84
84
|
end
|
85
85
|
|
86
86
|
class ChannelBase
|
87
|
-
include
|
87
|
+
include DCTerms::PropertyModel
|
88
88
|
end
|
89
89
|
|
90
|
-
class ImageBase; include
|
90
|
+
class ImageBase; include DCTerms::PropertyModel; end
|
91
91
|
class ItemsBase
|
92
92
|
class ItemBase
|
93
|
-
include
|
93
|
+
include DCTerms::PropertyModel
|
94
94
|
end
|
95
95
|
end
|
96
|
-
class TextinputBase; include
|
96
|
+
class TextinputBase; include DCTerms::PropertyModel; end
|
97
97
|
|
98
98
|
makers.each do |maker|
|
99
99
|
maker.module_eval(<<-EOC, __FILE__, __LINE__ + 1)
|
100
100
|
class Channel
|
101
|
-
|
101
|
+
DCTerms::PropertyModel.install_dcterms_core self
|
102
102
|
end
|
103
103
|
|
104
104
|
class Image
|
105
|
-
|
105
|
+
DCTerms::PropertyModel.install_dcterms_core self
|
106
106
|
end
|
107
107
|
|
108
108
|
class Items
|
109
109
|
class Item
|
110
|
-
|
110
|
+
DCTerms::PropertyModel.install_dcterms_core self
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
114
114
|
class Textinput
|
115
|
-
|
115
|
+
DCTerms::PropertyModel.install_dcterms_core self
|
116
116
|
end
|
117
117
|
EOC
|
118
118
|
end
|
data/rss-dcterms.gemspec
CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/rss/dcterms/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["KITAITI Makoto"]
|
6
6
|
gem.email = ["KitaitiMakoto@gmail.com"]
|
7
|
-
gem.description = %q{
|
8
|
-
gem.summary = %q{
|
7
|
+
gem.description = %q{Enables standard bundled RSS library parse and make feeds including DCMI(Dublin Core Metadata Initiative) Metadata Terms}
|
8
|
+
gem.summary = %q{DCTerms support for standard bundled RSS library}
|
9
9
|
gem.homepage = "http://rss-ext.rubyforge.org/"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
@@ -13,8 +13,11 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = "rss-dcterms"
|
15
15
|
gem.require_paths = ["lib"]
|
16
|
-
gem.version = RSS::
|
16
|
+
gem.version = RSS::DCTerms::VERSION
|
17
17
|
|
18
|
+
gem.add_runtime_dependency 'rss'
|
19
|
+
|
20
|
+
gem.add_development_dependency 'rake'
|
18
21
|
gem.add_development_dependency 'test-unit'
|
19
22
|
gem.add_development_dependency 'pry'
|
20
23
|
gem.add_development_dependency 'pry-doc'
|
metadata
CHANGED
@@ -1,72 +1,114 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rss-dcterms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- KITAITI Makoto
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2024-10-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rss
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
14
41
|
- !ruby/object:Gem::Dependency
|
15
42
|
name: test-unit
|
16
|
-
requirement:
|
17
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
18
44
|
requirements:
|
19
|
-
- -
|
45
|
+
- - ">="
|
20
46
|
- !ruby/object:Gem::Version
|
21
47
|
version: '0'
|
22
48
|
type: :development
|
23
49
|
prerelease: false
|
24
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
25
55
|
- !ruby/object:Gem::Dependency
|
26
56
|
name: pry
|
27
|
-
requirement:
|
28
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
29
58
|
requirements:
|
30
|
-
- -
|
59
|
+
- - ">="
|
31
60
|
- !ruby/object:Gem::Version
|
32
61
|
version: '0'
|
33
62
|
type: :development
|
34
63
|
prerelease: false
|
35
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
36
69
|
- !ruby/object:Gem::Dependency
|
37
70
|
name: pry-doc
|
38
|
-
requirement:
|
39
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
40
72
|
requirements:
|
41
|
-
- -
|
73
|
+
- - ">="
|
42
74
|
- !ruby/object:Gem::Version
|
43
75
|
version: '0'
|
44
76
|
type: :development
|
45
77
|
prerelease: false
|
46
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
47
83
|
- !ruby/object:Gem::Dependency
|
48
84
|
name: yard
|
49
|
-
requirement:
|
50
|
-
none: false
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
51
86
|
requirements:
|
52
|
-
- -
|
87
|
+
- - ">="
|
53
88
|
- !ruby/object:Gem::Version
|
54
89
|
version: '0'
|
55
90
|
type: :development
|
56
91
|
prerelease: false
|
57
|
-
version_requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
58
97
|
- !ruby/object:Gem::Dependency
|
59
98
|
name: redcarpet
|
60
|
-
requirement:
|
61
|
-
none: false
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
62
100
|
requirements:
|
63
|
-
- -
|
101
|
+
- - ">="
|
64
102
|
- !ruby/object:Gem::Version
|
65
103
|
version: '0'
|
66
104
|
type: :development
|
67
105
|
prerelease: false
|
68
|
-
version_requirements:
|
69
|
-
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Enables standard bundled RSS library parse and make feeds including DCMI(Dublin
|
70
112
|
Core Metadata Initiative) Metadata Terms
|
71
113
|
email:
|
72
114
|
- KitaitiMakoto@gmail.com
|
@@ -74,8 +116,8 @@ executables: []
|
|
74
116
|
extensions: []
|
75
117
|
extra_rdoc_files: []
|
76
118
|
files:
|
77
|
-
- .gemtest
|
78
|
-
- .gitignore
|
119
|
+
- ".gemtest"
|
120
|
+
- ".gitignore"
|
79
121
|
- Gemfile
|
80
122
|
- LICENSE
|
81
123
|
- README.markdown
|
@@ -91,33 +133,24 @@ files:
|
|
91
133
|
- setup.rb
|
92
134
|
homepage: http://rss-ext.rubyforge.org/
|
93
135
|
licenses: []
|
94
|
-
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
95
138
|
rdoc_options: []
|
96
139
|
require_paths:
|
97
140
|
- lib
|
98
141
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
142
|
requirements:
|
101
|
-
- -
|
143
|
+
- - ">="
|
102
144
|
- !ruby/object:Gem::Version
|
103
145
|
version: '0'
|
104
|
-
segments:
|
105
|
-
- 0
|
106
|
-
hash: 1661997683346475596
|
107
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
147
|
requirements:
|
110
|
-
- -
|
148
|
+
- - ">="
|
111
149
|
- !ruby/object:Gem::Version
|
112
150
|
version: '0'
|
113
|
-
segments:
|
114
|
-
- 0
|
115
|
-
hash: 1661997683346475596
|
116
151
|
requirements: []
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
summary: DCTERMS support for standard bundled RSS library
|
152
|
+
rubygems_version: 3.5.18
|
153
|
+
signing_key:
|
154
|
+
specification_version: 4
|
155
|
+
summary: DCTerms support for standard bundled RSS library
|
122
156
|
test_files: []
|
123
|
-
has_rdoc:
|