infod 0.0.3.3 → 0.0.3.4

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.
@@ -1,25 +1,15 @@
1
1
  #watch __FILE__
2
2
  class R
3
3
  =begin
4
- www) http://data.whats-your.name
5
4
 
6
- local) cd schema
7
- curl http://data.whats-your.name/schema/schema.txt.gz | zcat > schema/schema.txt
8
- x-www-browser http://localhost/schema
5
+ curl http://data.whats-your.name/schema/schema.txt.gz | zcat > schema/schema.txt
6
+ http://localhost/schema
9
7
 
10
8
  rebuild)
11
- 1) fetch
12
- ) RDF schema pointer document
13
- curl http://prefix.cc/popular/all.file.txt > prefix.txt
14
- ) RDF usage data
15
- curl http://data.whats-your.name/schema/gromgull.gz | zcat > properties.txt
16
- 2) massage
9
+ curl http://data.whats-your.name/schema/gromgull.gz | zcat > properties.txt
17
10
  irb> R.cacheSchemas
18
11
  .. R.indexSchemas
19
12
 
20
- schema missing? publish and add to prefix.cc,
21
- see also ideas at http://www.w3.org/2013/04/vocabs/
22
-
23
13
  =end
24
14
 
25
15
  UsageWeight = 'http://schema.whats-your.name/usageFrequency'
@@ -74,9 +64,7 @@ class R
74
64
 
75
65
  def R.schemaDocs
76
66
  @schemaDocs ||=
77
- (source = R['http://prefix.cc/popular/all.file.txt']
78
- mirror = R['/prefix.txt']
79
- (mirror.e ? mirror : source). # select schema-pointers doc
67
+ (open('http://prefix.cc/popular/all.file.txt'). # schemae
80
68
  read.split(/\n/).grep(/^[^#]/). # each uncommented line
81
69
  map{|t| t.split(/\t/)[1].R }. # into a Resource
82
70
  concat SchemasRDFa) # schema list
@@ -138,7 +138,7 @@ class R
138
138
  d.values.map{|r|
139
139
  [(r.map{|k,v|
140
140
  ["<",(k=='uri' ? '' : k),"> ", # predicate
141
- (v.class==Array ? v:[v]).map{|v|# each object
141
+ v.justArray.map{|v|# each object
142
142
  v.respond_to?(:uri) ? '<'+(v.uri||'')+'>' : # object-URI
143
143
  v.to_s. # object-content
144
144
  gsub(/<\/*(br|p|div)[^>]*>/,"\n"). # add linebreaks
@@ -1,7 +1,7 @@
1
1
  #watch __FILE__
2
2
 
3
3
  class Time
4
- def html e=nil,g=nil; H({_: :time, datetime: iso8601, c: to_s}) end
4
+ def html e=nil; H({_: :time, datetime: iso8601, c: to_s}) end
5
5
  end
6
6
 
7
7
  class Object
@@ -95,18 +95,4 @@ class R
95
95
  end
96
96
  }}
97
97
 
98
- # tripleStream -> tripleStream
99
- def dateNorm *f
100
- send(*f){|s,p,o|
101
- yield *({'CreationDate' => true,
102
- 'Date' => true,
103
- RSS+'pubDate' => true,
104
- Date => true,
105
- Purl+'dc/elements/1.1/date' => true,
106
- Atom+'published' => true,
107
- Atom+'updated' => true
108
- }[p] ?
109
- [s,Date,Time.parse(o).utc.iso8601] : [s,p,o])}
110
- end
111
-
112
98
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.3
4
+ version: 0.0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "<carmen@whats-your.name>"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rack
14
+ name: linkeddata
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: thin
28
+ name: mail
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: thin
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description: www-server
56
84
  email: _@whats-your.name
57
85
  executables:
@@ -65,7 +93,10 @@ files:
65
93
  - infod/500.rb
66
94
  - infod/GET.rb
67
95
  - infod/HTTP.rb
96
+ - infod/MIME.rb
68
97
  - infod/POST.rb
98
+ - infod/SPARQL.rb
99
+ - infod/WebID.rb
69
100
  - infod/audio.rb
70
101
  - infod/blog.rb
71
102
  - infod/cal.rb
@@ -90,7 +121,6 @@ files:
90
121
  - infod/mail.rb
91
122
  - infod/man.rb
92
123
  - infod/microblog.rb
93
- - infod/mime.rb
94
124
  - infod/names.rb
95
125
  - infod/rdf.rb
96
126
  - infod/schema.rb