rdf-fcrepo4 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef8de0378de085ddc701f50d21f5201abb62b334
4
- data.tar.gz: 7c8392220fa00563aca40ef515f408fd700ad7cb
3
+ metadata.gz: 27bd2b013bde2cf71845f9024c1b0717901a7434
4
+ data.tar.gz: 9f1331b3f07bb795a2485f207c56216b65b52103
5
5
  SHA512:
6
- metadata.gz: b2ebd0b8edcdd20f3ce429af3c51c4ed16896aeec4db3e9a0c79daa7b1bc345cd38acb8ace9dcdb0b175d48a2f8e004bce87febcbe7fde1159ceedcc5f7499c7
7
- data.tar.gz: 5c4184fa1776616f0476f6b21f944ad0cc040676b773d1c6f21149f5b1c85eec32c764a13eb27b881e1a12f44da69ec270bb47bb30981cb957728dd321a9b06d
6
+ metadata.gz: 321ee2e9e6ed75efc27fed2d86f5c95582f6432d3bfbc56f24f1fbf7fe5d2d7d65bdd4654ecd7b6fb854e358138f5460ae8d67b45ad1028ee3c7cd211f2a0a96
7
+ data.tar.gz: 8c178790cf993beac60ed19ab3776ebdc71c5db63beae552185e4298076eca8462432d33d37e9291d9cb1f0469ed6141e56c008e570951782a9ab483a1fd28c4
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ # DEPRECATED
2
+
3
+ This gem is deprecated; rdf-vocab gem (https://github.com/ruby-rdf/rdf-vocab, included in the linkeddata gem) now contains RDF::Vocab::Fcrepo4. You can find the helper method to strip Fedora triples from an RDF::Graph object in the triannon gem in lib/oa_graph_helper.rb.
4
+
1
5
  # rdf-fcrepo4
2
6
 
3
7
  [![Build Status](https://travis-ci.org/sul-dlss/rdf-fcrepo4.svg)](https://travis-ci.org/sul-dlss/rdf-fcrepo4)
@@ -12,7 +16,7 @@ Also contains helper method to strip Fedora triples from an RDF::Graph object.
12
16
  Add this line to your application's Gemfile:
13
17
 
14
18
  ```ruby
15
- gem 'rdf-fcrepo4'
19
+ gem 'rdf-vocab' # (was rdf-fcrepo4)
16
20
  ```
17
21
 
18
22
  And then execute:
@@ -21,19 +25,14 @@ And then execute:
21
25
 
22
26
  Or install it yourself as:
23
27
 
24
- $ gem install rdf-fcrepo4
28
+ $ gem install rdf-vocab # (was rdf-fcrepo4)
25
29
 
26
30
  ## Usage
27
31
 
28
- include rdf
29
- include rdf/fcrepo4
30
-
31
- RDF::FCRepo4.Object #=> RDF::URI("http://fedora.info/definitions/v4/rest-api#object")
32
+ require 'rdf/vocab'
33
+
34
+ RDF::Vocab::Fcrepo4.Object #=> RDF::URI("http://fedora.info/definitions/v4/rest-api#object")
32
35
 
33
- ## Contributing
36
+ # DEPRECATED
34
37
 
35
- 1. Fork it ( https://github.com/[my-github-username]/rdf-fcrepo4/fork )
36
- 2. Create your feature branch (`git checkout -b my-new-feature`)
37
- 3. Commit your changes (`git commit -am 'Add some feature'`)
38
- 4. Push to the branch (`git push origin my-new-feature`)
39
- 5. Create a new Pull Request
38
+ This gem is deprecated; rdf-vocab gem (https://github.com/ruby-rdf/rdf-vocab, included in the linkeddata gem) now contains RDF::Vocab::Fcrepo4. You can find the helper method to strip Fedora triples from an RDF::Graph object in the triannon gem in lib/oa_graph_helper.rb.
@@ -1,11 +1,14 @@
1
1
  require 'rdf'
2
+ require 'deprecation'
2
3
 
3
4
  # mixin methods
4
5
  module RDF
5
6
  class FCRepo4 < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository")
7
+ extend Deprecation
6
8
 
7
9
  # returns graph without any fedora-specific triples
8
10
  def self.remove_fedora_triples graph
11
+ Deprecation.warn RDF::FCRepo4, "RDF::FCRepo4.remove_fedora_triples is deprecated. See oa_graph_helper in triannon gem."
9
12
  if graph && graph.is_a?(RDF::Graph) && graph.count > 0
10
13
  no_fedora_graph = RDF::Graph.new
11
14
  fedora_props = RDF::FCRepo4.properties.map {|p| p.to_s}
@@ -14,12 +17,12 @@ module RDF
14
17
  modeshape_ns = "http://www.jcp.org/jcr"
15
18
  # this is the old way, but just in case ...
16
19
  fedora_describable = "http://purl.org/dc/elements/1.1/describable"
17
- graph.each { |stmt|
18
- no_fedora_graph << stmt unless fedora_props.include?(stmt.predicate.to_s) ||
20
+ graph.each { |stmt|
21
+ no_fedora_graph << stmt unless fedora_props.include?(stmt.predicate.to_s) ||
19
22
  fedora_props.include?(stmt.object.to_s) ||
20
23
  fedora_props.include?(stmt.subject.to_s) ||
21
24
  stmt.predicate.to_s.match(fedora_ns) ||
22
- stmt.predicate.to_s.match(modeshape_ns) ||
25
+ stmt.predicate.to_s.match(modeshape_ns) ||
23
26
  stmt.subject.to_s.match(fedora_ns) ||
24
27
  stmt.object.to_s.match(fedora_ns) ||
25
28
  stmt.object.to_s.match(modeshape_ns) ||
@@ -31,4 +34,4 @@ module RDF
31
34
  end
32
35
  end
33
36
  end
34
- end
37
+ end
@@ -1 +1 @@
1
- VERSION = "0.0.6"
1
+ VERSION = "0.1.0"
@@ -2,7 +2,16 @@
2
2
  # This file generated automatically using vocab-fetch from http://fedora.info/definitions/v4/repository#
3
3
  require 'rdf'
4
4
  module RDF
5
- class FCRepo4 < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository#")
5
+ # deprecate FCRepo4
6
+ def self.const_missing(const_name)
7
+ super unless const_name == :FCRepo4
8
+ warn "DEPRECATION WARNING: the class RDF::FCRepo4 is deprecated. Use RDF::Vocab::Fcrepo4 from https://github.com/ruby-rdf/rdf-vocab instead."
9
+ FCRepo4Deprecated
10
+ end
11
+
12
+ # @deprecated: this class is deprecated in favor of RDF::Vocab::Fcrepo4
13
+ # from rdf-vocab gem
14
+ class FCRepo4Deprecated < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository#")
6
15
 
7
16
  # Class definitions
8
17
  term :AnnotatedResource,
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = VERSION
9
9
  spec.authors = ["Naomi Dushay"]
10
10
  spec.email = ["ndushay@stanford.edu"]
11
- spec.summary = %q{Fedora Commons Repository Version 4 vocabulary for RDF.rb and helper methods}
12
- spec.homepage = ""
11
+ spec.summary = %q{This gem deprecated in favor of rdf-vocab; helper method is in triannon gem}
12
+ spec.homepage = "https://github.com/sul-dlss/rdf-fcrepo4"
13
13
  spec.license = "Apache 2"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency 'rdf'
21
+ spec.add_dependency 'deprecation'
21
22
 
22
23
  spec.add_development_dependency "bundler", "~> 1.6"
23
24
  spec.add_development_dependency "rake", "~> 10.0"
24
25
  spec.add_development_dependency "rspec", "~> 3.0"
25
26
  spec.add_development_dependency "rdf-turtle" # used to load testing fixtures
26
-
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-fcrepo4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: deprecation
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -103,7 +117,7 @@ files:
103
117
  - spec/fixtures/open_anno_ldp_container.ttl
104
118
  - spec/helper_spec.rb
105
119
  - spec/spec_helper.rb
106
- homepage: ''
120
+ homepage: https://github.com/sul-dlss/rdf-fcrepo4
107
121
  licenses:
108
122
  - Apache 2
109
123
  metadata: {}
@@ -123,10 +137,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
137
  version: '0'
124
138
  requirements: []
125
139
  rubyforge_project:
126
- rubygems_version: 2.2.0
140
+ rubygems_version: 2.4.3
127
141
  signing_key:
128
142
  specification_version: 4
129
- summary: Fedora Commons Repository Version 4 vocabulary for RDF.rb and helper methods
143
+ summary: This gem deprecated in favor of rdf-vocab; helper method is in triannon gem
130
144
  test_files:
131
145
  - spec/fixtures/anno_body_ldp_container.ttl
132
146
  - spec/fixtures/open_anno_ldp_container.ttl