publish_my_data 0.0.29 → 0.0.30

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.
Files changed (82) hide show
  1. data/app/controllers/concerns/publish_my_data/data_download.rb +22 -0
  2. data/app/controllers/concerns/publish_my_data/resource_rendering.rb +40 -0
  3. data/app/controllers/concerns/publish_my_data/sparql_processing.rb +81 -0
  4. data/app/controllers/publish_my_data/datasets_controller.rb +5 -23
  5. data/app/controllers/publish_my_data/information_resources_controller.rb +26 -4
  6. data/app/controllers/publish_my_data/queries_controller.rb +1 -1
  7. data/app/controllers/publish_my_data/resources_controller.rb +5 -9
  8. data/app/controllers/publish_my_data/sparql_controller.rb +1 -1
  9. data/app/controllers/publish_my_data/vocabularies_controller.rb +18 -0
  10. data/app/models/concerns/publish_my_data/all_features.rb +79 -0
  11. data/app/models/concerns/publish_my_data/basic_features.rb +21 -0
  12. data/app/models/concerns/publish_my_data/dataset_powers.rb +130 -0
  13. data/{lib → app/models/concerns}/publish_my_data/defined_by_ontology.rb +5 -0
  14. data/app/models/publish_my_data/concept.rb +2 -2
  15. data/app/models/publish_my_data/concept_scheme.rb +31 -3
  16. data/app/models/publish_my_data/dataset.rb +2 -128
  17. data/app/models/publish_my_data/example_resource.rb +21 -0
  18. data/app/models/publish_my_data/ontology.rb +35 -6
  19. data/app/models/publish_my_data/ontology_class.rb +3 -5
  20. data/app/models/publish_my_data/property.rb +3 -5
  21. data/app/models/publish_my_data/rdf_type.rb +1 -2
  22. data/app/models/publish_my_data/resource.rb +25 -96
  23. data/app/models/publish_my_data/theme.rb +1 -3
  24. data/app/models/publish_my_data/third_party/concept_scheme.rb +30 -0
  25. data/app/models/publish_my_data/third_party/ontology.rb +30 -0
  26. data/app/models/publish_my_data/vocabulary.rb +22 -0
  27. data/app/views/publish_my_data/classes/show.html.erb +3 -0
  28. data/app/views/publish_my_data/concept_schemes/_concepts.html.erb +18 -3
  29. data/app/views/publish_my_data/concept_schemes/show.html.erb +3 -1
  30. data/app/views/publish_my_data/concepts/show.html.erb +3 -3
  31. data/app/views/publish_my_data/datasets/show.html.erb +2 -2
  32. data/app/views/publish_my_data/ontologies/show.html.erb +6 -6
  33. data/app/views/publish_my_data/properties/show.html.erb +3 -3
  34. data/app/views/publish_my_data/resources/_summaries.html.erb +18 -0
  35. data/app/views/publish_my_data/resources/show.html.erb +3 -3
  36. data/config/routes.rb +8 -4
  37. data/lib/publish_my_data.rb +14 -5
  38. data/lib/publish_my_data/engine.rb +3 -0
  39. data/lib/publish_my_data/version.rb +1 -1
  40. data/spec/controllers/publish_my_data/datasets_controller_spec.rb +3 -3
  41. data/spec/controllers/publish_my_data/information_resources_controller_spec.rb +158 -104
  42. data/spec/controllers/publish_my_data/resources_controller_spec.rb +0 -71
  43. data/spec/controllers/publish_my_data/vocabularies_controller_spec.rb +14 -0
  44. data/spec/dummy/config/environments/development.rb +1 -1
  45. data/spec/dummy/config/environments/test.rb +1 -1
  46. data/spec/dummy/log/test.log +208075 -0
  47. data/spec/factories/concept_scheme_factories.rb +17 -13
  48. data/spec/factories/dataset_factories.rb +2 -0
  49. data/spec/factories/example_resource_factories.rb +9 -0
  50. data/spec/factories/ontology_factories.rb +17 -12
  51. data/spec/factories/property_factories.rb +1 -1
  52. data/spec/factories/resource_factories.rb +10 -0
  53. data/spec/features/running_a_sparql_query_spec.rb +2 -2
  54. data/spec/features/viewing_resources_spec.rb +96 -0
  55. data/spec/{renderers → lib}/publish_my_data/renderers_spec.rb +0 -0
  56. data/spec/models/publish_my_data/concept_scheme_spec.rb +20 -0
  57. data/spec/models/publish_my_data/dataset_spec.rb +113 -11
  58. data/spec/models/publish_my_data/example_resource_spec.rb +18 -0
  59. data/spec/models/publish_my_data/ontology_spec.rb +20 -0
  60. data/spec/models/publish_my_data/resource_spec.rb +63 -0
  61. data/spec/models/publish_my_data/third_party_concept_scheme_spec.rb +16 -0
  62. data/spec/models/publish_my_data/third_party_ontology_spec.rb +16 -0
  63. data/spec/spec_helper.rb +2 -1
  64. data/spec/support/all_features.rb +26 -0
  65. data/spec/support/data_download.rb +60 -0
  66. data/spec/support/vocabularies.rb +150 -0
  67. metadata +53 -33
  68. data/app/views/publish_my_data/ontologies/_classes.html.erb +0 -3
  69. data/app/views/publish_my_data/ontologies/_properties.html.erb +0 -3
  70. data/config/initializers/zz_factories.rb +0 -7
  71. data/lib/publish_my_data/concerns.rb +0 -4
  72. data/lib/publish_my_data/concerns/controllers/resource.rb +0 -23
  73. data/lib/publish_my_data/concerns/controllers/sparql.rb +0 -86
  74. data/lib/publish_my_data/concerns/models/resource.rb +0 -14
  75. data/lib/publish_my_data/render_params.rb +0 -7
  76. data/lib/publish_my_data/render_params/concept_render_params.rb +0 -18
  77. data/lib/publish_my_data/render_params/concept_scheme_render_params.rb +0 -31
  78. data/lib/publish_my_data/render_params/dataset_render_params.rb +0 -32
  79. data/lib/publish_my_data/render_params/ontology_class_render_params.rb +0 -18
  80. data/lib/publish_my_data/render_params/ontology_render_params.rb +0 -41
  81. data/lib/publish_my_data/render_params/property_render_params.rb +0 -18
  82. data/lib/publish_my_data/render_params/resource_render_params.rb +0 -17
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe PublishMyData::ExampleResource do
4
+ let(:example_resource) { FactoryGirl.create(:example_resource) }
5
+
6
+ describe '#as_ttl' do
7
+ before do
8
+ example_resource.write_predicate('http://example.com/foo', 'foo')
9
+ example_resource.write_predicate('http://example.com/bar', 'bar')
10
+ end
11
+ it 'should return the turtle representation of the example resource' do
12
+ example_resource.as_ttl.should == """
13
+ <http://pmdtest.dev/data/trousers/measurement1> <http://example.com/bar> \"bar\";
14
+ <http://example.com/foo> \"foo\" .
15
+ """
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+
3
+ describe PublishMyData::Ontology do
4
+ let(:ontology) { FactoryGirl.create(:ontology) }
5
+
6
+ it_behaves_like PublishMyData::AllFeatures do
7
+ let(:resource) { ontology }
8
+ end
9
+
10
+ it_behaves_like 'an in-house vocabulary' do
11
+ let(:vocabulary) { ontology }
12
+ let(:vocabulary_resource) { ontology.classes.first }
13
+ end
14
+
15
+ describe '#local?' do
16
+ it 'should be true' do
17
+ ontology.local?.should be_true
18
+ end
19
+ end
20
+ end
@@ -19,5 +19,68 @@ module PublishMyData
19
19
 
20
20
  end
21
21
 
22
+ describe '.find' do
23
+ context 'for a local resource' do
24
+ let(:opts) { {local: true} }
25
+
26
+ context 'of type Ontology' do
27
+ let(:ontology) { FactoryGirl.create(:ontology) }
28
+
29
+ it 'should return an Ontology given its URI' do
30
+ Resource.find(ontology.uri, opts).should be_a(PublishMyData::Ontology)
31
+ end
32
+ end
33
+
34
+ context 'of type ConceptScheme' do
35
+ let(:concept_scheme) { FactoryGirl.create(:concept_scheme) }
36
+
37
+ it 'should return a ConceptScheme' do
38
+ Resource.find(concept_scheme.uri, opts).should be_a(PublishMyData::ConceptScheme)
39
+ end
40
+ end
41
+ end
42
+
43
+ context 'given an external concept scheme' do
44
+ let(:concept_scheme) { FactoryGirl.create(:external_concept_scheme) }
45
+
46
+ it 'should return a ThirdParty::ConceptScheme' do
47
+ Resource.find(concept_scheme.uri).should be_a(PublishMyData::ThirdParty::ConceptScheme)
48
+ end
49
+ end
50
+
51
+ context 'given an external ontology' do
52
+ let(:ontology) { FactoryGirl.create(:external_ontology) }
53
+ let(:domain) { 'http://pmde.test' }
54
+
55
+ it 'should return a ThirdParty::Ontology' do
56
+ Resource.find(ontology.uri).should be_a(PublishMyData::ThirdParty::Ontology)
57
+ end
58
+
59
+ context 'with an ontology class' do
60
+ let(:ontology_class) { ontology.classes.first }
61
+
62
+ it 'should return an OntologyClass given its URI' do
63
+ Resource.find(ontology_class.uri).should be_a(PublishMyData::OntologyClass)
64
+ end
65
+ end
66
+
67
+ context 'with an ontology property' do
68
+ let(:property) { ontology.properties.first }
69
+
70
+ it 'should return a Property given its URI' do
71
+ Resource.find(property.uri).should be_a(PublishMyData::Property)
72
+ end
73
+ end
74
+ end
75
+
76
+ context 'given a resource of unknown type' do
77
+ let(:resource) { FactoryGirl.create(:information_resource) }
78
+ let(:domain) { 'http://pmde.test' }
79
+
80
+ it 'should return a Resource' do
81
+ Resource.find(resource.uri).should be_a(PublishMyData::Resource)
82
+ end
83
+ end
84
+ end
22
85
  end
23
86
  end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe PublishMyData::ThirdParty::ConceptScheme do
4
+ let(:concept_scheme) { FactoryGirl.create(:external_concept_scheme) }
5
+
6
+ it_behaves_like 'an external vocabulary' do
7
+ let(:vocabulary) { concept_scheme }
8
+ let(:vocabulary_resource) { concept_scheme.concepts.first }
9
+ end
10
+
11
+ describe '#local?' do
12
+ it 'should be false' do
13
+ concept_scheme.local?.should be_false
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe PublishMyData::ThirdParty::Ontology do
4
+ let(:ontology) { FactoryGirl.create(:external_ontology) }
5
+
6
+ it_behaves_like 'an external vocabulary' do
7
+ let(:vocabulary) { ontology }
8
+ let(:vocabulary_resource) { ontology.classes.first }
9
+ end
10
+
11
+ describe '#local?' do
12
+ it 'should be false' do
13
+ ontology.local?.should be_false
14
+ end
15
+ end
16
+ end
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,8 @@ require 'active_support/core_ext/numeric/bytes'
9
9
 
10
10
  # Requires supporting ruby files with custom matchers and macros, etc,
11
11
  # in spec/support/ and its subdirectories.
12
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
12
+ # NB: Relative to the dummy app!
13
+ Dir[Rails.root.join("../support/*.rb")].each {|f| require f}
13
14
 
14
15
  RSpec.configure do |config|
15
16
 
@@ -0,0 +1,26 @@
1
+ shared_examples_for PublishMyData::AllFeatures do
2
+ describe '#deprecated?' do
3
+ it 'should be false' do
4
+ resource.deprecated?.should be_false
5
+ end
6
+
7
+ context 'when the dataset has been deprecated' do
8
+ before { resource.rdf_type = [resource.rdf_type, resource.class.get_deprecated_rdf_type] }
9
+
10
+ it 'should be true' do
11
+ resource.deprecated?.should be_true
12
+ end
13
+ end
14
+ end
15
+
16
+ describe '#in_domain?' do
17
+ it 'should return true if the resource URI is in the given domain' do
18
+ host = URI(resource.uri).host
19
+ resource.in_domain?(host).should be_true
20
+ end
21
+
22
+ it 'should return false if the resource URI is not in the given domain' do
23
+ resource.in_domain?('http://google.com').should be_false
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,60 @@
1
+ shared_examples 'a controller with a dump action' do
2
+ describe "#dump" do
3
+
4
+ before do
5
+ s3 = AWS::S3.new
6
+ bucket = s3.buckets[PublishMyData.downloads_s3_bucket]
7
+ bucket.clear! # wipe the bucket
8
+ end
9
+
10
+ context "where the given slug exists" do
11
+ context "when a download exists on s3" do
12
+ before do
13
+ # make some downloads.
14
+ s3 = AWS::S3.new
15
+ bucket = s3.buckets[PublishMyData.downloads_s3_bucket]
16
+ @object = bucket.objects.create(resource.download_prefix, 'data')
17
+ @object.acl = :public_read
18
+ end
19
+
20
+ it "should redirect to the latest download that exists for the resource" do
21
+ get :dump, :id => resource.slug, :use_route => :publish_my_data
22
+ response.should be_redirect
23
+ response.should redirect_to(@object.public_url.to_s)
24
+ end
25
+ end
26
+
27
+ context "when a download exists on s3 for a previous day" do
28
+ before do
29
+ # make some downloads.
30
+ s3 = AWS::S3.new
31
+ bucket = s3.buckets[PublishMyData.downloads_s3_bucket]
32
+
33
+ resource.modified = resource.modified - 1.day # temp. set the modified date so a new backup prefix is generated
34
+ @object = bucket.objects.create(resource.download_prefix, 'data')
35
+ resource.modified = resource.modified + 1.day # and now set it back again!
36
+ @object.acl = :public_read
37
+ end
38
+
39
+ it "should 404" do
40
+ get :dump, :id => resource.slug, :use_route => :publish_my_data
41
+ response.should be_not_found
42
+ end
43
+ end
44
+
45
+ context "when a download doesn't exist on s3" do
46
+ it "should 404" do
47
+ get :dump, :id => resource.slug, :use_route => :publish_my_data
48
+ response.should be_not_found
49
+ end
50
+ end
51
+ end
52
+
53
+ context "when a resource with that slug doesn't exist" do
54
+ it "should 404" do
55
+ get :dump, :id => "i-dont-exist", :use_route => :publish_my_data
56
+ response.should be_not_found
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,150 @@
1
+ shared_examples 'an in-house vocabulary' do
2
+ shared_examples 'contains data from both data and metadata graphs' do
3
+ it 'should contain data about an associated resource in the data graph' do
4
+ dump.should include(vocabulary_resource.uri.to_s)
5
+ end
6
+
7
+ it 'should contain data from the metadata graph' do
8
+ dump.should include(vocabulary.label)
9
+ end
10
+ end
11
+
12
+ describe '#to_rdf' do
13
+ include_examples 'contains data from both data and metadata graphs' do
14
+ let(:dump) { vocabulary.to_rdf }
15
+ end
16
+
17
+ it 'should return valid rdf' do
18
+ RDF::Reader.for(:rdf).new(vocabulary.to_rdf) do |reader|
19
+ reader.readable?.should be_true
20
+ end
21
+ end
22
+ end
23
+
24
+ describe '#to_ttl' do
25
+ include_examples 'contains data from both data and metadata graphs' do
26
+ let(:dump) { vocabulary.to_ttl }
27
+ end
28
+
29
+ it 'should return valid turtle' do
30
+ RDF::Reader.for(:ttl).new(vocabulary.to_ttl) do |reader|
31
+ reader.readable?.should be_true
32
+ end
33
+ end
34
+ end
35
+
36
+ describe '#to_nt' do
37
+ include_examples 'contains data from both data and metadata graphs' do
38
+ let(:dump) { vocabulary.to_nt }
39
+ end
40
+
41
+ it 'should return valid n-triples' do
42
+ RDF::Reader.for(:ntriples).new(vocabulary.to_nt) do |reader|
43
+ reader.readable?.should be_true
44
+ end
45
+ end
46
+ end
47
+
48
+ describe '#to_json' do
49
+ include_examples 'contains data from both data and metadata graphs' do
50
+ let(:dump) { vocabulary.to_json }
51
+ end
52
+
53
+ it 'should return valid json' do
54
+ JSON.parse(vocabulary.to_json).should be_true
55
+ end
56
+ end
57
+ end
58
+
59
+ shared_examples 'an external vocabulary' do
60
+ shared_examples 'contains data from the data graph only' do
61
+ it 'should contain data from the data graph' do
62
+ dump.should include(vocabulary_resource.uri.to_s)
63
+ end
64
+
65
+ it 'should not contain data from the metadata graph' do
66
+ dump.should_not include(vocabulary.label)
67
+ end
68
+ end
69
+
70
+ describe '#to_rdf' do
71
+ include_examples 'contains data from the data graph only' do
72
+ let(:dump) { vocabulary.to_rdf }
73
+ end
74
+
75
+ it 'should return valid rdf' do
76
+ RDF::Reader.for(:rdf).new(vocabulary.to_rdf) do |reader|
77
+ reader.readable?.should be_true
78
+ end
79
+ end
80
+ end
81
+
82
+ describe '#to_ttl' do
83
+ include_examples 'contains data from the data graph only' do
84
+ let(:dump) { vocabulary.to_ttl }
85
+ end
86
+
87
+ it 'should return valid turtle' do
88
+ RDF::Reader.for(:ttl).new(vocabulary.to_ttl) do |reader|
89
+ reader.readable?.should be_true
90
+ end
91
+ end
92
+ end
93
+
94
+ describe '#to_nt' do
95
+ include_examples 'contains data from the data graph only' do
96
+ let(:dump) { vocabulary.to_nt }
97
+ end
98
+
99
+ it 'should return valid n-triples' do
100
+ RDF::Reader.for(:ntriples).new(vocabulary.to_nt) do |reader|
101
+ reader.readable?.should be_true
102
+ end
103
+ end
104
+ end
105
+
106
+ describe '#to_json' do
107
+ include_examples 'contains data from the data graph only' do
108
+ let(:dump) { vocabulary.to_json }
109
+ end
110
+
111
+ it 'should return valid json' do
112
+ JSON.parse(vocabulary.to_json).should be_true
113
+ end
114
+ end
115
+
116
+ context 'with metadata triples in the data graph' do
117
+ let!(:data_resource) do
118
+ r = PublishMyData::Ontology.new(vocabulary.uri, vocabulary.data_graph_uri)
119
+ r.title = 'Awesome Title, by Bob'
120
+ r.label = 'Awesome Title, by Bob'
121
+ r.comment = 'Awesome external vocabulary'
122
+ r.description = 'Awesome external vocabulary. Lorem Ipsum etc.'
123
+ r.publisher = 'http://example.com/people#Bob'
124
+ r.license = 'http://example.com/licenses#AwesomeLicence'
125
+ r.contact_email = 'mailto:bob@example.com'
126
+ r.save!
127
+ r
128
+ end
129
+
130
+ describe '#label' do
131
+ it 'should come from the metadata graph' do
132
+ vocabulary.label.should == vocabulary.read_attribute(:label)
133
+ end
134
+ end
135
+
136
+ describe '#tags' do
137
+ it 'should come from the metadata graph' do
138
+ vocabulary.tags.should == vocabulary.read_attribute(:tags)
139
+ end
140
+ end
141
+
142
+ ['comment', 'description', 'publisher', 'license', 'contact_email'].each do |field_name|
143
+ describe "##{field_name}" do
144
+ it 'should come from the data graph' do
145
+ vocabulary.send(field_name).should == data_resource.send(field_name)
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publish_my_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.30
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,11 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-07-16 00:00:00.000000000 Z
16
+ date: 2013-08-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
20
- requirement: &70112141472920 !ruby/object:Gem::Requirement
20
+ requirement: &70216212925300 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
23
  - - ~>
@@ -25,10 +25,10 @@ dependencies:
25
25
  version: '3.2'
26
26
  type: :runtime
27
27
  prerelease: false
28
- version_requirements: *70112141472920
28
+ version_requirements: *70216212925300
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: tripod
31
- requirement: &70112141483460 !ruby/object:Gem::Requirement
31
+ requirement: &70216212924640 !ruby/object:Gem::Requirement
32
32
  none: false
33
33
  requirements:
34
34
  - - ~>
@@ -36,10 +36,10 @@ dependencies:
36
36
  version: 0.7.19
37
37
  type: :runtime
38
38
  prerelease: false
39
- version_requirements: *70112141483460
39
+ version_requirements: *70216212924640
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rdf
42
- requirement: &70112141508140 !ruby/object:Gem::Requirement
42
+ requirement: &70216212924120 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ~>
@@ -47,10 +47,10 @@ dependencies:
47
47
  version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
- version_requirements: *70112141508140
50
+ version_requirements: *70216212924120
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: aws-sdk
53
- requirement: &70112137405400 !ruby/object:Gem::Requirement
53
+ requirement: &70216212923700 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
56
  - - ! '>='
@@ -58,10 +58,10 @@ dependencies:
58
58
  version: '0'
59
59
  type: :runtime
60
60
  prerelease: false
61
- version_requirements: *70112137405400
61
+ version_requirements: *70216212923700
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: kaminari
64
- requirement: &70112137413840 !ruby/object:Gem::Requirement
64
+ requirement: &70216212923120 !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ! '>='
@@ -69,10 +69,10 @@ dependencies:
69
69
  version: '0'
70
70
  type: :runtime
71
71
  prerelease: false
72
- version_requirements: *70112137413840
72
+ version_requirements: *70216212923120
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: rdiscount
75
- requirement: &70112145230240 !ruby/object:Gem::Requirement
75
+ requirement: &70216212922660 !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
78
78
  - - ! '>='
@@ -80,7 +80,7 @@ dependencies:
80
80
  version: '0'
81
81
  type: :runtime
82
82
  prerelease: false
83
- version_requirements: *70112145230240
83
+ version_requirements: *70216212922660
84
84
  description: The PublishMyData Rails Engine. Create rails apps with Linked Data functionality.
85
85
  email:
86
86
  - ric@swirrl.com
@@ -90,6 +90,9 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - app/assets/javascripts/publish_my_data.js
92
92
  - app/assets/stylesheets/publish_my_data.css
93
+ - app/controllers/concerns/publish_my_data/data_download.rb
94
+ - app/controllers/concerns/publish_my_data/resource_rendering.rb
95
+ - app/controllers/concerns/publish_my_data/sparql_processing.rb
93
96
  - app/controllers/publish_my_data/application_controller.rb
94
97
  - app/controllers/publish_my_data/datasets_controller.rb
95
98
  - app/controllers/publish_my_data/errors_controller.rb
@@ -98,20 +101,30 @@ files:
98
101
  - app/controllers/publish_my_data/resources_controller.rb
99
102
  - app/controllers/publish_my_data/sparql_controller.rb
100
103
  - app/controllers/publish_my_data/themes_controller.rb
104
+ - app/controllers/publish_my_data/vocabularies_controller.rb
101
105
  - app/helpers/publish_my_data/application_helper.rb
102
106
  - app/helpers/publish_my_data/resources_helper.rb
103
107
  - app/helpers/publish_my_data/sparql_helper.rb
108
+ - app/models/concerns/publish_my_data/all_features.rb
109
+ - app/models/concerns/publish_my_data/basic_features.rb
110
+ - app/models/concerns/publish_my_data/dataset_powers.rb
111
+ - app/models/concerns/publish_my_data/defined_by_ontology.rb
104
112
  - app/models/publish_my_data/concept.rb
105
113
  - app/models/publish_my_data/concept_scheme.rb
106
114
  - app/models/publish_my_data/dataset.rb
115
+ - app/models/publish_my_data/example_resource.rb
107
116
  - app/models/publish_my_data/ontology.rb
108
117
  - app/models/publish_my_data/ontology_class.rb
109
118
  - app/models/publish_my_data/property.rb
110
119
  - app/models/publish_my_data/rdf_type.rb
111
120
  - app/models/publish_my_data/resource.rb
112
121
  - app/models/publish_my_data/theme.rb
122
+ - app/models/publish_my_data/third_party/concept_scheme.rb
123
+ - app/models/publish_my_data/third_party/ontology.rb
124
+ - app/models/publish_my_data/vocabulary.rb
113
125
  - app/views/layouts/publish_my_data/application.html.erb
114
126
  - app/views/layouts/publish_my_data/error.html.erb
127
+ - app/views/publish_my_data/classes/show.html.erb
115
128
  - app/views/publish_my_data/concept_schemes/_concepts.html.erb
116
129
  - app/views/publish_my_data/concept_schemes/show.html.erb
117
130
  - app/views/publish_my_data/concepts/show.html.erb
@@ -121,13 +134,12 @@ files:
121
134
  - app/views/publish_my_data/errors/response_too_large.html.erb
122
135
  - app/views/publish_my_data/errors/timeout.html.erb
123
136
  - app/views/publish_my_data/errors/uncaught.html.erb
124
- - app/views/publish_my_data/ontologies/_classes.html.erb
125
- - app/views/publish_my_data/ontologies/_properties.html.erb
126
137
  - app/views/publish_my_data/ontologies/show.html.erb
127
138
  - app/views/publish_my_data/properties/show.html.erb
128
139
  - app/views/publish_my_data/resources/_predicates_table.html.erb
129
140
  - app/views/publish_my_data/resources/_predicates_table_head.html.erb
130
141
  - app/views/publish_my_data/resources/_resource_formats.html.erb
142
+ - app/views/publish_my_data/resources/_summaries.html.erb
131
143
  - app/views/publish_my_data/resources/_uri_and_label.html.erb
132
144
  - app/views/publish_my_data/resources/index.html.erb
133
145
  - app/views/publish_my_data/resources/show.html.erb
@@ -147,23 +159,9 @@ files:
147
159
  - config/initializers/00_tripod.rb
148
160
  - config/initializers/10_vocabularies.rb
149
161
  - config/initializers/20_s3_setup.rb
150
- - config/initializers/zz_factories.rb
151
162
  - config/routes.rb
152
- - lib/publish_my_data/concerns/controllers/resource.rb
153
- - lib/publish_my_data/concerns/controllers/sparql.rb
154
- - lib/publish_my_data/concerns/models/resource.rb
155
- - lib/publish_my_data/concerns.rb
156
- - lib/publish_my_data/defined_by_ontology.rb
157
163
  - lib/publish_my_data/engine.rb
158
164
  - lib/publish_my_data/paginator.rb
159
- - lib/publish_my_data/render_params/concept_render_params.rb
160
- - lib/publish_my_data/render_params/concept_scheme_render_params.rb
161
- - lib/publish_my_data/render_params/dataset_render_params.rb
162
- - lib/publish_my_data/render_params/ontology_class_render_params.rb
163
- - lib/publish_my_data/render_params/ontology_render_params.rb
164
- - lib/publish_my_data/render_params/property_render_params.rb
165
- - lib/publish_my_data/render_params/resource_render_params.rb
166
- - lib/publish_my_data/render_params.rb
167
165
  - lib/publish_my_data/renderers.rb
168
166
  - lib/publish_my_data/sparql_query.rb
169
167
  - lib/publish_my_data/sparql_query_result.rb
@@ -178,6 +176,7 @@ files:
178
176
  - spec/controllers/publish_my_data/resources_controller_spec.rb
179
177
  - spec/controllers/publish_my_data/sparql_controller_spec.rb
180
178
  - spec/controllers/publish_my_data/themes_controller_spec.rb
179
+ - spec/controllers/publish_my_data/vocabularies_controller_spec.rb
181
180
  - spec/dummy/app/assets/javascripts/application.js
182
181
  - spec/dummy/app/assets/stylesheets/application.css
183
182
  - spec/dummy/app/controllers/application_controller.rb
@@ -210,6 +209,7 @@ files:
210
209
  - spec/factories/00_theme_factories.rb
211
210
  - spec/factories/concept_scheme_factories.rb
212
211
  - spec/factories/dataset_factories.rb
212
+ - spec/factories/example_resource_factories.rb
213
213
  - spec/factories/ontology_factories.rb
214
214
  - spec/factories/property_factories.rb
215
215
  - spec/factories/resource_factories.rb
@@ -219,11 +219,20 @@ files:
219
219
  - spec/features/viewing_a_def_spec.rb
220
220
  - spec/features/viewing_a_doc_spec.rb
221
221
  - spec/features/viewing_resource_not_in_our_domain_spec.rb
222
+ - spec/features/viewing_resources_spec.rb
223
+ - spec/lib/publish_my_data/renderers_spec.rb
222
224
  - spec/lib/publish_my_data/sparql_query_spec.rb
225
+ - spec/models/publish_my_data/concept_scheme_spec.rb
223
226
  - spec/models/publish_my_data/dataset_spec.rb
227
+ - spec/models/publish_my_data/example_resource_spec.rb
228
+ - spec/models/publish_my_data/ontology_spec.rb
224
229
  - spec/models/publish_my_data/resource_spec.rb
225
- - spec/renderers/publish_my_data/renderers_spec.rb
230
+ - spec/models/publish_my_data/third_party_concept_scheme_spec.rb
231
+ - spec/models/publish_my_data/third_party_ontology_spec.rb
226
232
  - spec/spec_helper.rb
233
+ - spec/support/all_features.rb
234
+ - spec/support/data_download.rb
235
+ - spec/support/vocabularies.rb
227
236
  homepage: http://github.com/Swirrl/publish_my_data
228
237
  licenses: []
229
238
  post_install_message:
@@ -238,7 +247,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
247
  version: '0'
239
248
  segments:
240
249
  - 0
241
- hash: -3112249071899351957
250
+ hash: 3755761626571352511
242
251
  required_rubygems_version: !ruby/object:Gem::Requirement
243
252
  none: false
244
253
  requirements:
@@ -257,6 +266,7 @@ test_files:
257
266
  - spec/controllers/publish_my_data/resources_controller_spec.rb
258
267
  - spec/controllers/publish_my_data/sparql_controller_spec.rb
259
268
  - spec/controllers/publish_my_data/themes_controller_spec.rb
269
+ - spec/controllers/publish_my_data/vocabularies_controller_spec.rb
260
270
  - spec/dummy/app/assets/javascripts/application.js
261
271
  - spec/dummy/app/assets/stylesheets/application.css
262
272
  - spec/dummy/app/controllers/application_controller.rb
@@ -289,6 +299,7 @@ test_files:
289
299
  - spec/factories/00_theme_factories.rb
290
300
  - spec/factories/concept_scheme_factories.rb
291
301
  - spec/factories/dataset_factories.rb
302
+ - spec/factories/example_resource_factories.rb
292
303
  - spec/factories/ontology_factories.rb
293
304
  - spec/factories/property_factories.rb
294
305
  - spec/factories/resource_factories.rb
@@ -298,8 +309,17 @@ test_files:
298
309
  - spec/features/viewing_a_def_spec.rb
299
310
  - spec/features/viewing_a_doc_spec.rb
300
311
  - spec/features/viewing_resource_not_in_our_domain_spec.rb
312
+ - spec/features/viewing_resources_spec.rb
313
+ - spec/lib/publish_my_data/renderers_spec.rb
301
314
  - spec/lib/publish_my_data/sparql_query_spec.rb
315
+ - spec/models/publish_my_data/concept_scheme_spec.rb
302
316
  - spec/models/publish_my_data/dataset_spec.rb
317
+ - spec/models/publish_my_data/example_resource_spec.rb
318
+ - spec/models/publish_my_data/ontology_spec.rb
303
319
  - spec/models/publish_my_data/resource_spec.rb
304
- - spec/renderers/publish_my_data/renderers_spec.rb
320
+ - spec/models/publish_my_data/third_party_concept_scheme_spec.rb
321
+ - spec/models/publish_my_data/third_party_ontology_spec.rb
305
322
  - spec/spec_helper.rb
323
+ - spec/support/all_features.rb
324
+ - spec/support/data_download.rb
325
+ - spec/support/vocabularies.rb