triannon 0.1.0 → 0.2.0
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f1dc35cca4a3483f2cf722ab165da8c0b6fb38c
|
4
|
+
data.tar.gz: 956ca6ac61d830d938420687efe744aa0156ddf2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ddab1a5203861a6ed730111295c3587c8043627263f9d52a4ed59ca1d7904050e2d77508be117ff9708ab5634334e7d9e35df9a0045d9021af707ef79c808e9
|
7
|
+
data.tar.gz: 811ec9c95c928d34ef9420331a4266357f1ba21ba58de1117f21e2947334ea9ae039a785f145224ea74dd3d0147eb532f94a22f2a481aa17384cd676fff1039b
|
data/README.md
CHANGED
@@ -34,9 +34,15 @@ $ rails g triannon:install
|
|
34
34
|
|
35
35
|
Edit the `config/triannon.yml` file:
|
36
36
|
|
37
|
-
* `ldp_url:` Points to the root annotations container
|
37
|
+
* `ldp_url:` Points to the root annotations container on your LDP server
|
38
38
|
* `triannon_base_url:` Used as the base url for all annotations hosted by your Triannon server. Identifiers from the LDP server will be appended to this base-url.
|
39
39
|
|
40
|
+
Generate the root annotations container on the LDP server
|
41
|
+
|
42
|
+
```console
|
43
|
+
$ rake triannon:create_root_container
|
44
|
+
```
|
45
|
+
|
40
46
|
## Running the application in development
|
41
47
|
|
42
48
|
There is a bundled rake task for running the test app:
|
@@ -47,6 +53,12 @@ $ rake jetty:download
|
|
47
53
|
$ rake jetty:unzip
|
48
54
|
$ rake engine_cart:generate # (first run only)
|
49
55
|
|
56
|
+
# Configure config/triannon.yml as specified above
|
57
|
+
$ vi config/triannon.yml
|
58
|
+
|
59
|
+
# Generate root annotations container
|
60
|
+
$ rake triannon:create_root_container
|
61
|
+
|
50
62
|
# Run the test app
|
51
63
|
$ rake triannon:server
|
52
64
|
```
|
@@ -9,7 +9,7 @@ module Triannon
|
|
9
9
|
conn = Faraday.new :url => Triannon.config[:ldp_url]
|
10
10
|
resp = conn.head
|
11
11
|
unless resp.status == 404 || resp.status == 410
|
12
|
-
|
12
|
+
puts "Root annotation resource already exists."
|
13
13
|
return false
|
14
14
|
end
|
15
15
|
|
@@ -23,10 +23,10 @@ module Triannon
|
|
23
23
|
end
|
24
24
|
|
25
25
|
if resp.status == 201
|
26
|
-
|
26
|
+
puts "Created root annotation container #{Triannon.config[:ldp_url]}"
|
27
27
|
return true
|
28
28
|
else
|
29
|
-
|
29
|
+
puts "Unable to create root annotation container #{Triannon.config[:ldp_url]}"
|
30
30
|
return false
|
31
31
|
# TODO raise an exception if we get here?
|
32
32
|
end
|
@@ -1,6 +1,11 @@
|
|
1
|
+
require_relative '../../app/services/triannon/root_annotation_creator'
|
2
|
+
|
1
3
|
namespace :triannon do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
#
|
4
|
+
desc "Create the root annotation container"
|
5
|
+
task :create_root_container do
|
6
|
+
unless File.exists? Triannon.triannon_file
|
7
|
+
puts "Triannon config file missing: #{Triannon.triannon_file}"
|
8
|
+
end
|
9
|
+
Triannon::RootAnnotationCreator.create
|
10
|
+
end
|
6
11
|
end
|
data/lib/triannon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: triannon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -267,7 +267,6 @@ files:
|
|
267
267
|
- app/views/triannon/annotations/new.html.erb
|
268
268
|
- app/views/triannon/annotations/show.html.erb
|
269
269
|
- config/initializers/mime_types.rb
|
270
|
-
- config/initializers/root_annotation_container.rb
|
271
270
|
- config/routes.rb
|
272
271
|
- config/triannon.yml
|
273
272
|
- lib/generators/triannon/install_generator.rb
|