ld4l-open_annotation_rdf 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -6
  3. data/Gemfile +3 -0
  4. data/README.md +5 -0
  5. data/ld4l-open_annotation_rdf.gemspec +4 -8
  6. data/lib/ld4l/open_annotation_rdf.rb +1 -26
  7. data/lib/ld4l/open_annotation_rdf/annotation.rb +28 -30
  8. data/lib/ld4l/open_annotation_rdf/annotation_generic_body.rb +12 -0
  9. data/lib/ld4l/open_annotation_rdf/comment_annotation.rb +3 -6
  10. data/lib/ld4l/open_annotation_rdf/comment_body.rb +4 -4
  11. data/lib/ld4l/open_annotation_rdf/semantic_tag_annotation.rb +3 -6
  12. data/lib/ld4l/open_annotation_rdf/semantic_tag_body.rb +3 -3
  13. data/lib/ld4l/open_annotation_rdf/tag_annotation.rb +3 -5
  14. data/lib/ld4l/open_annotation_rdf/tag_body.rb +7 -7
  15. data/lib/ld4l/open_annotation_rdf/version.rb +1 -1
  16. data/spec/ld4l/open_annotation_rdf/annotation_spec.rb +79 -70
  17. data/spec/ld4l/open_annotation_rdf/comment_annotation_spec.rb +46 -40
  18. data/spec/ld4l/open_annotation_rdf/comment_body_spec.rb +46 -43
  19. data/spec/ld4l/open_annotation_rdf/configuration_spec.rb +5 -5
  20. data/spec/ld4l/open_annotation_rdf/semantic_tag_annotation_spec.rb +46 -42
  21. data/spec/ld4l/open_annotation_rdf/semantic_tag_body_spec.rb +24 -31
  22. data/spec/ld4l/open_annotation_rdf/tag_annotation_spec.rb +46 -42
  23. data/spec/ld4l/open_annotation_rdf/tag_body_spec.rb +28 -35
  24. data/spec/ld4l/open_annotation_rdf_spec.rb +1 -1
  25. data/spec/spec_helper.rb +1 -2
  26. metadata +13 -69
  27. data/lib/ld4l/open_annotation_rdf/vocab/cnt.rb +0 -6
  28. data/lib/ld4l/open_annotation_rdf/vocab/dctypes.rb +0 -5
  29. data/lib/ld4l/open_annotation_rdf/vocab/oa.rb +0 -23
@@ -10,7 +10,7 @@ describe "LD4L::OpenAnnotationRDF" do
10
10
  config.unique_tags = false
11
11
  end
12
12
  class DummyAnnotation < LD4L::OpenAnnotationRDF::Annotation
13
- configure :type => RDFVocabularies::OA.Annotation, :base_uri => LD4L::OpenAnnotationRDF.configuration.base_uri, :repository => :default
13
+ configure :type => RDF::Vocab::OA.Annotation, :base_uri => LD4L::OpenAnnotationRDF.configuration.base_uri, :repository => :default
14
14
  end
15
15
  end
16
16
  after do
data/spec/spec_helper.rb CHANGED
@@ -5,7 +5,7 @@ require 'bundler/setup'
5
5
  Bundler.setup
6
6
 
7
7
  require 'ld4l/open_annotation_rdf'
8
- require 'pry'
8
+ require 'pry' unless ENV["CI"]
9
9
 
10
10
  Dir['./spec/support/**/*.rb'].each { |f| require f }
11
11
 
@@ -20,5 +20,4 @@ RSpec.configure do |config|
20
20
  config.formatter = :progress
21
21
  end
22
22
 
23
- # TODO Need to use allow, receive, and_return instead of creating the repository here to avoid bleed over between tests.
24
23
  ActiveTriples::Repositories.add_repository :default, RDF::Repository.new
metadata CHANGED
@@ -1,57 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ld4l-open_annotation_rdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - E. Lynette Rayle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-14 00:00:00.000000000 Z
11
+ date: 2016-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.99.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.99.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: active-triples
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.5'
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '0.6'
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: 0.8.2
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '0.5'
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '0.6'
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: 0.8.2
53
- - !ruby/object:Gem::Dependency
54
- name: active_triples-local_name
55
29
  requirement: !ruby/object:Gem::Requirement
56
30
  requirements:
57
31
  - - ">="
@@ -65,27 +39,13 @@ dependencies:
65
39
  - !ruby/object:Gem::Version
66
40
  version: '0'
67
41
  - !ruby/object:Gem::Dependency
68
- name: ld4l-foaf_rdf
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '0.0'
74
- type: :runtime
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '0.0'
81
- - !ruby/object:Gem::Dependency
82
- name: pry
42
+ name: active_triples-local_name
83
43
  requirement: !ruby/object:Gem::Requirement
84
44
  requirements:
85
45
  - - ">="
86
46
  - !ruby/object:Gem::Version
87
47
  version: '0'
88
- type: :development
48
+ type: :runtime
89
49
  prerelease: false
90
50
  version_requirements: !ruby/object:Gem::Requirement
91
51
  requirements:
@@ -93,13 +53,13 @@ dependencies:
93
53
  - !ruby/object:Gem::Version
94
54
  version: '0'
95
55
  - !ruby/object:Gem::Dependency
96
- name: pry-byebug
56
+ name: ld4l-foaf_rdf
97
57
  requirement: !ruby/object:Gem::Requirement
98
58
  requirements:
99
59
  - - ">="
100
60
  - !ruby/object:Gem::Version
101
61
  version: '0'
102
- type: :development
62
+ type: :runtime
103
63
  prerelease: false
104
64
  version_requirements: !ruby/object:Gem::Requirement
105
65
  requirements:
@@ -148,20 +108,6 @@ dependencies:
148
108
  - - ">="
149
109
  - !ruby/object:Gem::Version
150
110
  version: '0'
151
- - !ruby/object:Gem::Dependency
152
- name: guard-rspec
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- type: :development
159
- prerelease: false
160
- version_requirements: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- version: '0'
165
111
  - !ruby/object:Gem::Dependency
166
112
  name: webmock
167
113
  requirement: !ruby/object:Gem::Requirement
@@ -197,6 +143,7 @@ files:
197
143
  - ld4l-open_annotation_rdf.gemspec
198
144
  - lib/ld4l/open_annotation_rdf.rb
199
145
  - lib/ld4l/open_annotation_rdf/annotation.rb
146
+ - lib/ld4l/open_annotation_rdf/annotation_generic_body.rb
200
147
  - lib/ld4l/open_annotation_rdf/comment_annotation.rb
201
148
  - lib/ld4l/open_annotation_rdf/comment_body.rb
202
149
  - lib/ld4l/open_annotation_rdf/configuration.rb
@@ -205,9 +152,6 @@ files:
205
152
  - lib/ld4l/open_annotation_rdf/tag_annotation.rb
206
153
  - lib/ld4l/open_annotation_rdf/tag_body.rb
207
154
  - lib/ld4l/open_annotation_rdf/version.rb
208
- - lib/ld4l/open_annotation_rdf/vocab/cnt.rb
209
- - lib/ld4l/open_annotation_rdf/vocab/dctypes.rb
210
- - lib/ld4l/open_annotation_rdf/vocab/oa.rb
211
155
  - spec/ld4l/open_annotation_rdf/annotation_spec.rb
212
156
  - spec/ld4l/open_annotation_rdf/comment_annotation_spec.rb
213
157
  - spec/ld4l/open_annotation_rdf/comment_body_spec.rb
@@ -230,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
174
  requirements:
231
175
  - - ">="
232
176
  - !ruby/object:Gem::Version
233
- version: 1.9.3
177
+ version: '2.1'
234
178
  required_rubygems_version: !ruby/object:Gem::Requirement
235
179
  requirements:
236
180
  - - ">="
@@ -238,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
182
  version: '0'
239
183
  requirements: []
240
184
  rubyforge_project:
241
- rubygems_version: 2.4.5
185
+ rubygems_version: 2.4.6
242
186
  signing_key:
243
187
  specification_version: 4
244
188
  summary: OpenAnnotation RDF models.
@@ -1,6 +0,0 @@
1
- module RDFVocabularies
2
- class CNT < RDF::Vocabulary("http://www.w3.org/2011/content#")
3
- property :chars
4
- property :ContentAsText
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- module RDFVocabularies
2
- class DCTYPES < RDF::Vocabulary("http://purl.org/dc/dcmitype/")
3
- term :Text
4
- end
5
- end
@@ -1,23 +0,0 @@
1
- module RDFVocabularies
2
- class OA < RDF::Vocabulary("http://www.w3.org/ns/oa#")
3
-
4
- # Class definitions
5
- term :Annotation
6
- term :Motivation
7
- term :Tag
8
- term :SemanticTag
9
-
10
- # Property definitions
11
- property :hasBody
12
- property :hasTarget
13
- property :annotatedBy # relationship identifying the agent responsible for creating the Annotation
14
- property :annotatedAt # the time at which the Annotation was created
15
- property :motivatedBy # relationship for Motivation
16
-
17
- # Instances of :Motivation class used as the object of predicate :motivatedBy
18
- property :commenting # an instance for OA:Motivation (ex. <anAnnotationURI> <ao:motivatedBy> <oa:commenting>)
19
- property :tagging # an instance for OA:Motivation (ex. <anAnnotationURI> <ao:motivatedBy> <oa:tagging>)
20
- property :describing # an instance for OA:Motivation (ex. <anAnnotationURI> <ao:motivatedBy> <oa:describing>)
21
- property :classifying # an instance for OA:Motivation (ex. <anAnnotationURI> <ao:motivatedBy> <oa:classifying>)
22
- end
23
- end