triannon-client 0.2.0.pre.0.rc1 → 0.2.1.pre.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.env_example +1 -0
  3. data/bin/console +7 -1
  4. data/lib/triannon-client/configuration.rb +3 -0
  5. data/lib/triannon-client/triannon_client.rb +27 -11
  6. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/n-quads_.yml +78 -78
  7. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/n-triples_.yml +78 -78
  8. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/rdf_json_.yml +78 -78
  9. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/rdf_n3_.yml +78 -78
  10. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/trig_.yml +78 -78
  11. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/trix_.yml +78 -78
  12. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/turtle_.yml +78 -78
  13. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/x-ld_json_.yml +78 -78
  14. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/x-trig_.yml +78 -78
  15. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/n3_.yml +78 -78
  16. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/rdf_n3_.yml +78 -78
  17. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/rdf_turtle_.yml +78 -78
  18. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/x-nquads_.yml +78 -78
  19. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/ld_json_.yml +51 -51
  20. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/rdf_xml_.yml +46 -46
  21. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/x-turtle_.yml +45 -45
  22. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_text/turtle_.yml +45 -45
  23. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/ld_json_.yml +29 -29
  24. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/n-quads_.yml +29 -29
  25. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/n-triples_.yml +29 -29
  26. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/rdf_json_.yml +29 -29
  27. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/rdf_n3_.yml +29 -29
  28. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/rdf_xml_.yml +29 -29
  29. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/trig_.yml +29 -29
  30. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/trix_.yml +29 -29
  31. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/turtle_.yml +29 -29
  32. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/x-ld_json_.yml +29 -29
  33. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/x-trig_.yml +29 -29
  34. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_application/x-turtle_.yml +29 -29
  35. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_text/n3_.yml +29 -29
  36. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_text/rdf_n3_.yml +29 -29
  37. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_text/rdf_turtle_.yml +29 -29
  38. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_text/turtle_.yml +29 -29
  39. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_content_type_text/x-nquads_.yml +29 -29
  40. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/checks_the_annotation_ID.yml +29 -29
  41. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/logs_exceptions.yml +29 -29
  42. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/raises_an_argument_error_with_a_nil_ID.yml +29 -29
  43. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/raises_an_argument_error_with_an_empty_string_ID.yml +29 -29
  44. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/raises_an_argument_error_with_an_integer_ID.yml +29 -29
  45. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/requests_an_open_annotation_by_ID_accepting_a_default_JSON-LD_content.yml +29 -29
  46. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/returns_an_EMPTY_RDF_graph_for_a_500_server_response.yml +29 -29
  47. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/returns_an_EMPTY_RDF_graph_with_a_valid_ID_for_NO_annotation_on_the_server.yml +85 -498
  48. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/returns_an_RDF_graph_with_a_valid_ID_for_an_annotation_on_the_server.yml +51 -51
  49. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_iiif_annotation/requests_an_open_annotation_by_ID_using_a_IIIF_profile.yml +29 -273
  50. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_iiif_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml +45 -45
  51. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_oa_annotation/requests_an_open_annotation_by_ID_using_an_OA_profile.yml +29 -2473
  52. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_oa_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml +51 -51
  53. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/deletes_an_open_annotation_that_exists.yml +39 -38
  54. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/fails_to_delete_an_open_annotation_that_does_NOT_exist.yml +10 -10
  55. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_false_for_a_500_response_to_a_DELETE_request.yml +5 -5
  56. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_true_for_a_200_response_to_a_DELETE_request.yml +5 -5
  57. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_true_for_a_202_response_to_a_DELETE_request.yml +5 -5
  58. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_true_for_a_204_response_to_a_DELETE_request.yml +5 -5
  59. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/validates_the_annotation_ID.yml +5 -5
  60. data/spec/fixtures/vcr_cassettes/TriannonClient/_get_annotations/returns_an_RDF_Graph.yml +17 -17
  61. data/spec/fixtures/vcr_cassettes/TriannonClient/_get_annotations/returns_an_RDF_Graph_that_contains_an_AnnotationList.yml +17 -17
  62. data/spec/fixtures/vcr_cassettes/TriannonClient/_get_annotations/returns_an_annotation_list_with_an_annotation_created_by_a_prior_POST.yml +49 -49
  63. data/spec/fixtures/vcr_cassettes/TriannonClient/_post_annotation/does_not_raise_an_error_when_submitting_a_valid_open_annotation.yml +29 -29
  64. data/spec/fixtures/vcr_cassettes/TriannonClient/_post_annotation/returns_a_RestClient_Response_object.yml +29 -29
  65. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_id/returns_a_String_ID_from_the_RDF_URI_of_an_annotation.yml +29 -29
  66. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_id/returns_a_String_ID_that_is_not_empty.yml +29 -29
  67. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_uri/returns_an_RDF_URI_from_an_RDF_Graph_of_an_annotation.yml +29 -29
  68. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_uri/returns_an_RDF_URI_that_is_a_valid_URI.yml +39 -38
  69. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/accepts_a_RestClient_Response_instance.yml +41 -41
  70. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/raises_ArgumentError_when_given_an_empty_String.yml +29 -29
  71. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/raises_ArgumentError_when_given_nil.yml +29 -29
  72. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/returns_an_RDF_Graph.yml +29 -29
  73. data/spec/lib/triannon-client/configuration_spec.rb +18 -2
  74. data/spec/lib/triannon-client/triannon_client_spec.rb +14 -6
  75. data/triannon-client.gemspec +3 -4
  76. metadata +10 -76
  77. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/n-quads_.yml +0 -4088
  78. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/n-triples_.yml +0 -4088
  79. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/rdf_json_.yml +0 -4088
  80. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/rdf_n3_.yml +0 -4088
  81. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/trig_.yml +0 -4088
  82. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/trix_.yml +0 -4088
  83. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/turtle_.yml +0 -4088
  84. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/x-ld_json_.yml +0 -4088
  85. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_application/x-trig_.yml +0 -4088
  86. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_text/n3_.yml +0 -4088
  87. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_text/rdf_n3_.yml +0 -4088
  88. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_text/rdf_turtle_.yml +0 -4088
  89. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/gets_an_open_annotation_by_ID_with_content_type_text/x-nquads_.yml +0 -4088
  90. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_accepting_JSON-LD_content.yml +0 -2502
  91. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_accepting_a_default_JSON-LD_content.yml +0 -2502
  92. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_using_a_default_JSON-LD_content.yml +0 -2502
  93. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_optional_content_type_parameter.yml +0 -2502
  94. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_content_type/requests_an_open_annotation_by_ID_with_turtle_content_type_parameter.yml +0 -2502
  95. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/checks_the_annotation_ID.yml +0 -2561
  96. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/logs_exceptions.yml +0 -2502
  97. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/raises_an_argument_error_with_a_nil_ID.yml +0 -2502
  98. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/raises_an_argument_error_with_an_empty_string_ID.yml +0 -2502
  99. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/raises_an_argument_error_with_an_integer_ID.yml +0 -2502
  100. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/returns_an_EMPTY_RDF_graph_for_a_500_server_response.yml +0 -2502
  101. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/returns_an_EMPTY_RDF_graph_with_a_valid_ID_for_NO_annotation_on_the_server.yml +0 -3623
  102. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/with_no_content_type/returns_an_RDF_graph_with_a_valid_ID_for_an_annotation_on_the_server.yml +0 -4946
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0c1db12b26befc300bf3361898e2b563aa30665
4
- data.tar.gz: 74d9163686393f4d6e9e94b9794c436763d89f4c
3
+ metadata.gz: 64baf0880e619822adf71b93b2ef24197a8ee772
4
+ data.tar.gz: 826b1412236b17ba3eb8f65f5872be5c46868c5f
5
5
  SHA512:
6
- metadata.gz: 6b401b1b4607a4ca99d4bd05c7330fd92696b5e846f6f9a69cdb4b7acda23a4bd019311926769edb1d1f3ba5e0b40da04b50198fd5d601c50e28aa0276da55a0
7
- data.tar.gz: 5757bdfcc9b73fba5bea1ec3d069bd46d352a303e0129bb7b077c2f189f7b051c4a8d2d1cf11b621864004dbf3a1f745a78186fc9da70b3934be6e9757b1ca99
6
+ metadata.gz: d5873aab94f57d567830adbdee094b681b0796dc5b455d98910f6ffd1b58ddba29c63e25c364ef9be7ac1217b70822b15410b5ed25f67d78369bdd7bd184283d
7
+ data.tar.gz: 3769b652af9c9f98c12e5122362edc3b5f4a2ede8d2bf523935fd8a4254f906698d9342626695be0da4994606ec7203aa1da8570c1a27c333b24191728e81eb9
data/.env_example CHANGED
@@ -14,4 +14,5 @@ export TRIANNON_LOG_FILE='log/triannon_client.log'
14
14
  export TRIANNON_HOST='http://localhost:3000'
15
15
  export TRIANNON_USER=''
16
16
  export TRIANNON_PASS=''
17
+ export TRIANNON_CONTAINER='/annotations/'
17
18
 
data/bin/console CHANGED
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'triannon-client'
3
3
  CONFIG = TriannonClient.configuration
4
- binding.pry
5
4
 
5
+ tc = TriannonClient::TriannonClient.new
6
+ oa_jsonld = '{"@context":"http://iiif.io/api/presentation/2/context.json","@graph":[{"@id":"_:g70349699654640","@type":["dctypes:Text","cnt:ContentAsText"],"chars":"I love this!","format":"text/plain","language":"en"},{"@type":"oa:Annotation","motivation":"oa:commenting","on":"http://purl.stanford.edu/kq131cs7229","resource":"_:g70349699654640"}]}'
7
+ g = RDF::Graph.new
8
+ format = RDF::Format.for(:jsonld)
9
+ format.reader.new(oa_jsonld) {|r| r.each_statement {|s| g << s }}
10
+
11
+ binding.pry
@@ -9,6 +9,7 @@ module TriannonClient
9
9
  attr_accessor :host
10
10
  attr_accessor :user
11
11
  attr_accessor :pass
12
+ attr_accessor :container
12
13
 
13
14
  def initialize
14
15
  @debug = env_boolean('DEBUG')
@@ -16,6 +17,8 @@ module TriannonClient
16
17
  @host = ENV['TRIANNON_HOST'] || 'http://localhost:3000'
17
18
  @user = ENV['TRIANNON_USER'] || ''
18
19
  @pass = ENV['TRIANNON_PASS'] || ''
20
+ @container = ENV['TRIANNON_CONTAINER'] || ''
21
+ @container += '/' unless(@container.empty? || @container.end_with?('/'))
19
22
 
20
23
  # logger
21
24
  log_file = ENV['TRIANNON_LOG_FILE'] || 'triannon_client.log'
@@ -14,17 +14,33 @@ module TriannonClient
14
14
 
15
15
  attr_reader :config
16
16
  attr_accessor :site
17
-
18
- def initialize
17
+ attr_accessor :container
18
+
19
+ # Initialize a new triannon client
20
+ # All params are optional, the defaults are set in
21
+ # the ::TriannonClient.configuration
22
+ # @param host [String] HTTP URI for triannon server
23
+ # @param user [String] Authorized username for access to triannon server
24
+ # @param pass [String] Authorized password for access to triannon server
25
+ # @param container [String] The container path on the triannon server
26
+ def initialize(host=nil, user=nil, pass=nil, container=nil)
19
27
  # Configure triannon-app service
20
28
  @config = ::TriannonClient.configuration
29
+ host ||= @config.host
30
+ host.chomp!('/') if host.end_with?('/')
31
+ user ||= @config.user
32
+ pass ||= @config.pass
21
33
  @site = RestClient::Resource.new(
22
- @config.host,
23
- user: @config.user,
24
- password: @config.pass,
34
+ host,
35
+ user: user,
36
+ password: pass,
25
37
  open_timeout: 5,
26
38
  read_timeout: 30
27
39
  )
40
+ container ||= @config.container
41
+ container = "/#{container}" unless container.start_with?('/')
42
+ container = "#{container}/" unless container.end_with?('/')
43
+ @container = @site[container]
28
44
  end
29
45
 
30
46
  # Delete an annotation
@@ -33,7 +49,7 @@ module TriannonClient
33
49
  def delete_annotation(id)
34
50
  check_id(id)
35
51
  begin
36
- response = @site["/annotations/#{id}"].delete
52
+ response = @container[id].delete
37
53
  # HTTP DELETE response codes: A successful response SHOULD be
38
54
  # 200 (OK) if the response includes an entity describing the status,
39
55
  # 202 (Accepted) if the action has not yet been enacted, or
@@ -60,7 +76,7 @@ module TriannonClient
60
76
  begin
61
77
  tries += 1
62
78
  # TODO: add Accept content type, somehow?
63
- response = @site["/annotations/"].post post_data, :content_type => JSONLD_TYPE, :accept => JSONLD_TYPE
79
+ response = @container.post post_data, :content_type => JSONLD_TYPE, :accept => JSONLD_TYPE
64
80
  rescue => e
65
81
  sleep 1*tries
66
82
  retry if tries < 3
@@ -77,7 +93,7 @@ module TriannonClient
77
93
  def get_annotations(content_type=JSONLD_TYPE)
78
94
  check_content_type(content_type)
79
95
  begin
80
- response = @site['/annotations'].get({:accept => content_type})
96
+ response = @container.get({:accept => content_type})
81
97
  # TODO: switch yard for different response.code?
82
98
  # TODO: log a failure for a response.code == 404
83
99
  response2graph(response)
@@ -95,9 +111,8 @@ module TriannonClient
95
111
  def get_annotation(id, content_type=JSONLD_TYPE)
96
112
  check_id(id)
97
113
  check_content_type(content_type)
98
- uri = "/annotations/#{id}"
99
114
  begin
100
- response = @site[uri].get({:accept => content_type})
115
+ response = @container[id].get({:accept => content_type})
101
116
  # TODO: switch yard for different response.code?
102
117
  response2graph(response)
103
118
  rescue => e
@@ -158,7 +173,8 @@ module TriannonClient
158
173
  # @response id [String|nil] An ID for an annotation
159
174
  def annotation_id(uri)
160
175
  raise ArgumentError, 'uri is not an RDF::URI' unless uri.instance_of? RDF::URI
161
- uri.path.split('/').last
176
+ path = uri.path.split(@config.container).last
177
+ CGI::escape(path)
162
178
  end
163
179
 
164
180
 
@@ -31,31 +31,31 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/ld+json; charset=utf-8
33
33
  Etag:
34
- - W/"f113b0552ba9dbec937aeba328b64bb1"
34
+ - W/"d68cff86be7aef4deec8006ad5076c44"
35
35
  Cache-Control:
36
36
  - max-age=0, private, must-revalidate
37
37
  X-Request-Id:
38
- - 11e54218-2a3d-4b0f-8897-942728ada5da
38
+ - 5688b104-f246-4d87-81bd-693b9a5a9546
39
39
  X-Runtime:
40
- - '2.558069'
40
+ - '1.399552'
41
41
  Server:
42
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
42
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
43
43
  Date:
44
- - Tue, 05 May 2015 19:18:18 GMT
44
+ - Mon, 11 May 2015 21:29:00 GMT
45
45
  Content-Length:
46
- - '431'
46
+ - '443'
47
47
  Connection:
48
48
  - Keep-Alive
49
49
  Set-Cookie:
50
- - _internal_session=dW9OVzkrMjZ2U2FSdWZmbXY3UnFIKzBDanVUTzBqN0JxR0tnOVdRUjExMk9pZEx5Rnp1SCtPYXczczYxaTdBMDR6M2tMTTNhT0VwM251RW9NakNXU1RKd3QzUktETllaRlRUeGxMZmVTc1RBcFNlbEhiT3hvWThUbUFhakZJYU1lbnZyekIrOTBSN2xtYlJUMUozeCthVEs4T3lzT1k1K1pib1pxajUxYTh0TURhb0NMVWN6KzVNejVLOW9BZEVOMDFVZXZRNVNqVDc4aHZ2MG9PMW4ydXhQQ2NPNWZJNk5xc0ZPM3BzYzA5ST0tLXFaOFh6MkJDSWgyZ3o3VzRoN0EvZkE9PQ%3D%3D--d9f7edfc721e0d55f30eea241672fd520c12ef69;
50
+ - _internal_session=cS8xNzNDNGNHU2F5bGx6MkxBT29kRldncGFTczZnM0dVSktienRpNzdlS0FwaE8rWGxhcjZmZURHaW90Vk1BUGhOelBSVzFOWlVYMG1UeWw3WHQ5V0tNaHV1bXVmZ1BvRzJnUlhiSFRUYXBBNVhzNVRjNmNPUkxiVjhJV2VieUNPaFFQZXNkbGJabkVqS054akFZTHF1TzhZdjlzK09Renp4eGhMTTd5bElMdWJrQytOL2JFM1NheWlHbE9ieHZpS0pkMVpTRlp6YUxLOEFvOTlOMzlLVC9TOTVsRlFNWm00UUoyV2xmdUVzOTdHZ3F0ZVIwWjcvOUVxMkRhb0t1TS0tUm1NQzRSUW82dldRc1FXSlNwb01IQT09--9acba87f6f72215920830d76e19036387fd212d8;
51
51
  path=/; HttpOnly
52
52
  - request_method=POST; path=/
53
53
  body:
54
54
  encoding: UTF-8
55
- string: '{"@context":"http://www.w3.org/ns/oa-context-20130208.json","@graph":[{"@id":"_:g70090571180100","@type":["dctypes:Text","cnt:ContentAsText"],"chars":"I
56
- love this!","format":"text/plain","language":"en"},{"@id":"http://your.triannon-server.com/annotations/875190ee-1fa4-4298-916b-147d1cbce91f","@type":"oa:Annotation","hasBody":"_:g70090571180100","hasTarget":"http://purl.stanford.edu/kq131cs7229","motivatedBy":"oa:commenting"}]}'
55
+ string: '{"@context":"http://www.w3.org/ns/oa-context-20130208.json","@graph":[{"@id":"_:g69902324239280","@type":["dctypes:Text","cnt:ContentAsText"],"chars":"I
56
+ love this!","format":"text/plain","language":"en"},{"@id":"http://your.triannon-server.com/annotations/a1/3e/2a/18/a13e2a18-8699-4b31-8d27-73370263b321","@type":"oa:Annotation","hasBody":"_:g69902324239280","hasTarget":"http://purl.stanford.edu/kq131cs7229","motivatedBy":"oa:commenting"}]}'
57
57
  http_version:
58
- recorded_at: Tue, 05 May 2015 19:18:18 GMT
58
+ recorded_at: Mon, 11 May 2015 21:29:00 GMT
59
59
  - request:
60
60
  method: get
61
61
  uri: http://www.w3.org/ns/oa-context-20130208.json
@@ -75,7 +75,7 @@ http_interactions:
75
75
  message: Temporary Redirect
76
76
  headers:
77
77
  Date:
78
- - Tue, 05 May 2015 19:18:18 GMT
78
+ - Mon, 11 May 2015 21:29:00 GMT
79
79
  Server:
80
80
  - Apache/2
81
81
  Location:
@@ -83,7 +83,7 @@ http_interactions:
83
83
  Cache-Control:
84
84
  - max-age=21600
85
85
  Expires:
86
- - Wed, 06 May 2015 01:18:18 GMT
86
+ - Tue, 12 May 2015 03:29:00 GMT
87
87
  Content-Length:
88
88
  - '240'
89
89
  Content-Type:
@@ -99,7 +99,7 @@ http_interactions:
99
99
  <p>The document has moved <a href="http://www.w3.org/ns/oa.jsonld">here</a>.</p>
100
100
  </body></html>
101
101
  http_version:
102
- recorded_at: Tue, 05 May 2015 19:18:18 GMT
102
+ recorded_at: Mon, 11 May 2015 21:29:00 GMT
103
103
  - request:
104
104
  method: get
105
105
  uri: http://www.w3.org/ns/oa.jsonld
@@ -121,7 +121,7 @@ http_interactions:
121
121
  message: OK
122
122
  headers:
123
123
  Date:
124
- - Tue, 05 May 2015 19:18:18 GMT
124
+ - Mon, 11 May 2015 21:29:00 GMT
125
125
  Server:
126
126
  - Apache/2
127
127
  Last-Modified:
@@ -135,7 +135,7 @@ http_interactions:
135
135
  Cache-Control:
136
136
  - max-age=21600
137
137
  Expires:
138
- - Wed, 06 May 2015 01:18:18 GMT
138
+ - Tue, 12 May 2015 03:29:00 GMT
139
139
  P3p:
140
140
  - policyref="http://www.w3.org/2014/08/p3p.xml"
141
141
  Access-Control-Allow-Origin:
@@ -1253,7 +1253,7 @@ http_interactions:
1253
1253
 
1254
1254
 
1255
1255
  http_version:
1256
- recorded_at: Tue, 05 May 2015 19:18:18 GMT
1256
+ recorded_at: Mon, 11 May 2015 21:29:01 GMT
1257
1257
  - request:
1258
1258
  method: get
1259
1259
  uri: http://www.w3.org/ns/oa-context-20130208.json
@@ -1273,7 +1273,7 @@ http_interactions:
1273
1273
  message: Temporary Redirect
1274
1274
  headers:
1275
1275
  Date:
1276
- - Tue, 05 May 2015 19:18:19 GMT
1276
+ - Mon, 11 May 2015 21:29:01 GMT
1277
1277
  Server:
1278
1278
  - Apache/2
1279
1279
  Location:
@@ -1281,7 +1281,7 @@ http_interactions:
1281
1281
  Cache-Control:
1282
1282
  - max-age=21600
1283
1283
  Expires:
1284
- - Wed, 06 May 2015 01:18:19 GMT
1284
+ - Tue, 12 May 2015 03:29:01 GMT
1285
1285
  Content-Length:
1286
1286
  - '240'
1287
1287
  Content-Type:
@@ -1297,7 +1297,7 @@ http_interactions:
1297
1297
  <p>The document has moved <a href="http://www.w3.org/ns/oa.jsonld">here</a>.</p>
1298
1298
  </body></html>
1299
1299
  http_version:
1300
- recorded_at: Tue, 05 May 2015 19:18:19 GMT
1300
+ recorded_at: Mon, 11 May 2015 21:29:01 GMT
1301
1301
  - request:
1302
1302
  method: get
1303
1303
  uri: http://www.w3.org/ns/oa.jsonld
@@ -1319,7 +1319,7 @@ http_interactions:
1319
1319
  message: OK
1320
1320
  headers:
1321
1321
  Date:
1322
- - Tue, 05 May 2015 19:18:19 GMT
1322
+ - Mon, 11 May 2015 21:29:06 GMT
1323
1323
  Server:
1324
1324
  - Apache/2
1325
1325
  Last-Modified:
@@ -1333,7 +1333,7 @@ http_interactions:
1333
1333
  Cache-Control:
1334
1334
  - max-age=21600
1335
1335
  Expires:
1336
- - Wed, 06 May 2015 01:18:19 GMT
1336
+ - Tue, 12 May 2015 03:29:06 GMT
1337
1337
  P3p:
1338
1338
  - policyref="http://www.w3.org/2014/08/p3p.xml"
1339
1339
  Access-Control-Allow-Origin:
@@ -2451,10 +2451,10 @@ http_interactions:
2451
2451
 
2452
2452
 
2453
2453
  http_version:
2454
- recorded_at: Tue, 05 May 2015 19:18:19 GMT
2454
+ recorded_at: Mon, 11 May 2015 21:29:06 GMT
2455
2455
  - request:
2456
2456
  method: get
2457
- uri: http://localhost:3000/annotations/875190ee-1fa4-4298-916b-147d1cbce91f
2457
+ uri: http://localhost:3000/annotations/a1%2F3e%2F2a%2F18%2Fa13e2a18-8699-4b31-8d27-73370263b321
2458
2458
  body:
2459
2459
  encoding: US-ASCII
2460
2460
  string: ''
@@ -2473,15 +2473,15 @@ http_interactions:
2473
2473
  Content-Type:
2474
2474
  - text/html; charset=utf-8
2475
2475
  Content-Length:
2476
- - '129110'
2476
+ - '129098'
2477
2477
  X-Request-Id:
2478
- - a015b04f-7a5f-4651-9f13-d51723dd92e4
2478
+ - a1943cb3-d29f-4922-a72c-573b25dad16b
2479
2479
  X-Runtime:
2480
- - '0.239855'
2480
+ - '0.260660'
2481
2481
  Server:
2482
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
2482
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
2483
2483
  Date:
2484
- - Tue, 05 May 2015 19:18:19 GMT
2484
+ - Mon, 11 May 2015 21:29:06 GMT
2485
2485
  Connection:
2486
2486
  - Keep-Alive
2487
2487
  body:
@@ -2540,11 +2540,11 @@ http_interactions:
2540
2540
  \ <td>\n <pre class=\"line_numbers\">\n<span>19</span>\n<span>20</span>\n<span>21</span>\n<span>22</span>\n<span>23</span>\n<span>24</span>\n
2541
2541
  \ </pre>\n </td>\n<td width=\"100%\">\n<pre>\n<div
2542
2542
  class=\"line\"> def show\n</div><div class=\"line\"> # TODO: json.set!
2543
- &quot;@context&quot;, Triannon::JsonldContext::OA_DATED_CONTEXT_URL - would
2544
- this work?\n</div><div class=\"line active\"> respond_to do |format|\n</div><div
2545
- class=\"line\"> format.jsonld {\n</div><div class=\"line\"> context_url
2546
- = context_url_from_accept ? context_url_from_accept : context_url_from_link\n</div><div
2547
- class=\"line\"> if context_url &amp;&amp; context_url == Triannon::JsonldContext::IIIF_CONTEXT_URL\n</div>\n</pre>\n</td>\n
2543
+ &quot;@context&quot;, OA::Graph::OA_DATED_CONTEXT_URL - would this work?\n</div><div
2544
+ class=\"line active\"> respond_to do |format|\n</div><div class=\"line\">
2545
+ \ format.jsonld {\n</div><div class=\"line\"> context_url =
2546
+ context_url_from_accept ? context_url_from_accept : context_url_from_link\n</div><div
2547
+ class=\"line\"> if context_url &amp;&amp; context_url == OA::Graph::IIIF_CONTEXT_URL\n</div>\n</pre>\n</td>\n
2548
2548
  \ </tr>\n </table>\n </div>\n </div>\n <div class=\"source
2549
2549
  hidden\" id=\"frame-source-2\">\n <div class=\"info\">\n Extracted
2550
2550
  source (around line <strong>#4</strong>):\n </div>\n <div class=\"data\">\n
@@ -3370,9 +3370,9 @@ http_interactions:
3370
3370
  \ <td>\n <pre class=\"line_numbers\">\n<span>16</span>\n<span>17</span>\n<span>18</span>\n<span>19</span>\n<span>20</span>\n<span>21</span>\n
3371
3371
  \ </pre>\n </td>\n<td width=\"100%\">\n<pre>\n<div
3372
3372
  class=\"line\"> def call(env)\n</div><div class=\"line\"> start_time
3373
- = Time.now\n</div><div class=\"line active\"> status, headers, body =
3374
- @app.call(env)\n</div><div class=\"line\"> request_time = Time.now -
3375
- start_time\n</div><div class=\"line\">\n</div><div class=\"line\"> if
3373
+ = clock_time\n</div><div class=\"line active\"> status, headers, body
3374
+ = @app.call(env)\n</div><div class=\"line\"> request_time = clock_time
3375
+ - start_time\n</div><div class=\"line\">\n</div><div class=\"line\"> if
3376
3376
  !headers.has_key?(@header_name)\n</div>\n</pre>\n</td>\n </tr>\n
3377
3377
  \ </table>\n </div>\n </div>\n <div class=\"source hidden\"
3378
3378
  id=\"frame-source-82\">\n <div class=\"info\">\n Extracted source
@@ -3491,9 +3491,9 @@ http_interactions:
3491
3491
  class=\"line\"> rescue HTTPStatus::Error =&gt; ex\n</div>\n</pre>\n</td>\n
3492
3492
  \ </tr>\n </table>\n </div>\n </div>\n <div class=\"source
3493
3493
  hidden\" id=\"frame-source-93\">\n <div class=\"info\">\n Extracted
3494
- source (around line <strong>#295</strong>):\n </div>\n <div class=\"data\">\n
3494
+ source (around line <strong>#294</strong>):\n </div>\n <div class=\"data\">\n
3495
3495
  \ <table cellpadding=\"0\" cellspacing=\"0\" class=\"lines\">\n <tr>\n
3496
- \ <td>\n <pre class=\"line_numbers\">\n<span>293</span>\n<span>294</span>\n<span>295</span>\n<span>296</span>\n<span>297</span>\n<span>298</span>\n
3496
+ \ <td>\n <pre class=\"line_numbers\">\n<span>292</span>\n<span>293</span>\n<span>294</span>\n<span>295</span>\n<span>296</span>\n<span>297</span>\n
3497
3497
  \ </pre>\n </td>\n<td width=\"100%\">\n<pre>\n<div
3498
3498
  class=\"line\"> end\n</div><div class=\"line\"> call_callback(:AcceptCallback,
3499
3499
  sock)\n</div><div class=\"line active\"> block ? block.call(sock)
@@ -3595,17 +3595,17 @@ http_interactions:
3595
3595
  data-frame-id=\"49\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in
3596
3596
  `serve&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"50\" href=\"#\">actionpack
3597
3597
  (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call&#39;</a><br><a
3598
- class=\"trace-frames\" data-frame-id=\"51\" href=\"#\">rack (1.6.0) lib/rack/etag.rb:24:in
3598
+ class=\"trace-frames\" data-frame-id=\"51\" href=\"#\">rack (1.6.1) lib/rack/etag.rb:24:in
3599
3599
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"52\" href=\"#\">rack
3600
- (1.6.0) lib/rack/conditionalget.rb:25:in `call&#39;</a><br><a class=\"trace-frames\"
3601
- data-frame-id=\"53\" href=\"#\">rack (1.6.0) lib/rack/head.rb:13:in `call&#39;</a><br><a
3600
+ (1.6.1) lib/rack/conditionalget.rb:25:in `call&#39;</a><br><a class=\"trace-frames\"
3601
+ data-frame-id=\"53\" href=\"#\">rack (1.6.1) lib/rack/head.rb:13:in `call&#39;</a><br><a
3602
3602
  class=\"trace-frames\" data-frame-id=\"54\" href=\"#\">actionpack (4.2.0)
3603
3603
  lib/action_dispatch/middleware/params_parser.rb:27:in `call&#39;</a><br><a
3604
3604
  class=\"trace-frames\" data-frame-id=\"55\" href=\"#\">actionpack (4.2.0)
3605
3605
  lib/action_dispatch/middleware/flash.rb:260:in `call&#39;</a><br><a class=\"trace-frames\"
3606
- data-frame-id=\"56\" href=\"#\">rack (1.6.0) lib/rack/session/abstract/id.rb:225:in
3606
+ data-frame-id=\"56\" href=\"#\">rack (1.6.1) lib/rack/session/abstract/id.rb:225:in
3607
3607
  `context&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"57\" href=\"#\">rack
3608
- (1.6.0) lib/rack/session/abstract/id.rb:220:in `call&#39;</a><br><a class=\"trace-frames\"
3608
+ (1.6.1) lib/rack/session/abstract/id.rb:220:in `call&#39;</a><br><a class=\"trace-frames\"
3609
3609
  data-frame-id=\"58\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in
3610
3610
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"59\" href=\"#\">activerecord
3611
3611
  (4.2.0) lib/active_record/query_cache.rb:36:in `call&#39;</a><br><a class=\"trace-frames\"
@@ -3642,25 +3642,25 @@ http_interactions:
3642
3642
  class=\"trace-frames\" data-frame-id=\"78\" href=\"#\">railties (4.2.0) lib/rails/rack/logger.rb:20:in
3643
3643
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"79\" href=\"#\">actionpack
3644
3644
  (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call&#39;</a><br><a
3645
- class=\"trace-frames\" data-frame-id=\"80\" href=\"#\">rack (1.6.0) lib/rack/methodoverride.rb:22:in
3645
+ class=\"trace-frames\" data-frame-id=\"80\" href=\"#\">rack (1.6.1) lib/rack/methodoverride.rb:22:in
3646
3646
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"81\" href=\"#\">rack
3647
- (1.6.0) lib/rack/runtime.rb:18:in `call&#39;</a><br><a class=\"trace-frames\"
3647
+ (1.6.1) lib/rack/runtime.rb:18:in `call&#39;</a><br><a class=\"trace-frames\"
3648
3648
  data-frame-id=\"82\" href=\"#\">activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in
3649
3649
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"83\" href=\"#\">rack
3650
- (1.6.0) lib/rack/lock.rb:17:in `call&#39;</a><br><a class=\"trace-frames\"
3650
+ (1.6.1) lib/rack/lock.rb:17:in `call&#39;</a><br><a class=\"trace-frames\"
3651
3651
  data-frame-id=\"84\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in
3652
3652
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"85\" href=\"#\">rack
3653
- (1.6.0) lib/rack/sendfile.rb:113:in `call&#39;</a><br><a class=\"trace-frames\"
3653
+ (1.6.1) lib/rack/sendfile.rb:113:in `call&#39;</a><br><a class=\"trace-frames\"
3654
3654
  data-frame-id=\"86\" href=\"#\">railties (4.2.0) lib/rails/engine.rb:518:in
3655
3655
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"87\" href=\"#\">railties
3656
3656
  (4.2.0) lib/rails/application.rb:164:in `call&#39;</a><br><a class=\"trace-frames\"
3657
- data-frame-id=\"88\" href=\"#\">rack (1.6.0) lib/rack/lock.rb:17:in `call&#39;</a><br><a
3658
- class=\"trace-frames\" data-frame-id=\"89\" href=\"#\">rack (1.6.0) lib/rack/content_length.rb:15:in
3657
+ data-frame-id=\"88\" href=\"#\">rack (1.6.1) lib/rack/lock.rb:17:in `call&#39;</a><br><a
3658
+ class=\"trace-frames\" data-frame-id=\"89\" href=\"#\">rack (1.6.1) lib/rack/content_length.rb:15:in
3659
3659
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"90\" href=\"#\">rack
3660
- (1.6.0) lib/rack/handler/webrick.rb:89:in `service&#39;</a><br><a class=\"trace-frames\"
3661
- data-frame-id=\"91\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
3662
- `service&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"92\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
3663
- `run&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"93\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in
3660
+ (1.6.1) lib/rack/handler/webrick.rb:89:in `service&#39;</a><br><a class=\"trace-frames\"
3661
+ data-frame-id=\"91\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in
3662
+ `service&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"92\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in
3663
+ `run&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"93\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in
3664
3664
  `block in start_thread&#39;</a><br></code></pre>\n </div>\n <div id=\"Full-Trace\"
3665
3665
  style=\"display: block;\">\n <pre><code><a class=\"trace-frames\" data-frame-id=\"0\"
3666
3666
  href=\"#\">actionpack (4.2.0) lib/action_controller/metal/mime_responds.rb:218:in
@@ -3750,17 +3750,17 @@ http_interactions:
3750
3750
  data-frame-id=\"49\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in
3751
3751
  `serve&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"50\" href=\"#\">actionpack
3752
3752
  (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call&#39;</a><br><a
3753
- class=\"trace-frames\" data-frame-id=\"51\" href=\"#\">rack (1.6.0) lib/rack/etag.rb:24:in
3753
+ class=\"trace-frames\" data-frame-id=\"51\" href=\"#\">rack (1.6.1) lib/rack/etag.rb:24:in
3754
3754
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"52\" href=\"#\">rack
3755
- (1.6.0) lib/rack/conditionalget.rb:25:in `call&#39;</a><br><a class=\"trace-frames\"
3756
- data-frame-id=\"53\" href=\"#\">rack (1.6.0) lib/rack/head.rb:13:in `call&#39;</a><br><a
3755
+ (1.6.1) lib/rack/conditionalget.rb:25:in `call&#39;</a><br><a class=\"trace-frames\"
3756
+ data-frame-id=\"53\" href=\"#\">rack (1.6.1) lib/rack/head.rb:13:in `call&#39;</a><br><a
3757
3757
  class=\"trace-frames\" data-frame-id=\"54\" href=\"#\">actionpack (4.2.0)
3758
3758
  lib/action_dispatch/middleware/params_parser.rb:27:in `call&#39;</a><br><a
3759
3759
  class=\"trace-frames\" data-frame-id=\"55\" href=\"#\">actionpack (4.2.0)
3760
3760
  lib/action_dispatch/middleware/flash.rb:260:in `call&#39;</a><br><a class=\"trace-frames\"
3761
- data-frame-id=\"56\" href=\"#\">rack (1.6.0) lib/rack/session/abstract/id.rb:225:in
3761
+ data-frame-id=\"56\" href=\"#\">rack (1.6.1) lib/rack/session/abstract/id.rb:225:in
3762
3762
  `context&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"57\" href=\"#\">rack
3763
- (1.6.0) lib/rack/session/abstract/id.rb:220:in `call&#39;</a><br><a class=\"trace-frames\"
3763
+ (1.6.1) lib/rack/session/abstract/id.rb:220:in `call&#39;</a><br><a class=\"trace-frames\"
3764
3764
  data-frame-id=\"58\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in
3765
3765
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"59\" href=\"#\">activerecord
3766
3766
  (4.2.0) lib/active_record/query_cache.rb:36:in `call&#39;</a><br><a class=\"trace-frames\"
@@ -3797,25 +3797,25 @@ http_interactions:
3797
3797
  class=\"trace-frames\" data-frame-id=\"78\" href=\"#\">railties (4.2.0) lib/rails/rack/logger.rb:20:in
3798
3798
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"79\" href=\"#\">actionpack
3799
3799
  (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call&#39;</a><br><a
3800
- class=\"trace-frames\" data-frame-id=\"80\" href=\"#\">rack (1.6.0) lib/rack/methodoverride.rb:22:in
3800
+ class=\"trace-frames\" data-frame-id=\"80\" href=\"#\">rack (1.6.1) lib/rack/methodoverride.rb:22:in
3801
3801
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"81\" href=\"#\">rack
3802
- (1.6.0) lib/rack/runtime.rb:18:in `call&#39;</a><br><a class=\"trace-frames\"
3802
+ (1.6.1) lib/rack/runtime.rb:18:in `call&#39;</a><br><a class=\"trace-frames\"
3803
3803
  data-frame-id=\"82\" href=\"#\">activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in
3804
3804
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"83\" href=\"#\">rack
3805
- (1.6.0) lib/rack/lock.rb:17:in `call&#39;</a><br><a class=\"trace-frames\"
3805
+ (1.6.1) lib/rack/lock.rb:17:in `call&#39;</a><br><a class=\"trace-frames\"
3806
3806
  data-frame-id=\"84\" href=\"#\">actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in
3807
3807
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"85\" href=\"#\">rack
3808
- (1.6.0) lib/rack/sendfile.rb:113:in `call&#39;</a><br><a class=\"trace-frames\"
3808
+ (1.6.1) lib/rack/sendfile.rb:113:in `call&#39;</a><br><a class=\"trace-frames\"
3809
3809
  data-frame-id=\"86\" href=\"#\">railties (4.2.0) lib/rails/engine.rb:518:in
3810
3810
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"87\" href=\"#\">railties
3811
3811
  (4.2.0) lib/rails/application.rb:164:in `call&#39;</a><br><a class=\"trace-frames\"
3812
- data-frame-id=\"88\" href=\"#\">rack (1.6.0) lib/rack/lock.rb:17:in `call&#39;</a><br><a
3813
- class=\"trace-frames\" data-frame-id=\"89\" href=\"#\">rack (1.6.0) lib/rack/content_length.rb:15:in
3812
+ data-frame-id=\"88\" href=\"#\">rack (1.6.1) lib/rack/lock.rb:17:in `call&#39;</a><br><a
3813
+ class=\"trace-frames\" data-frame-id=\"89\" href=\"#\">rack (1.6.1) lib/rack/content_length.rb:15:in
3814
3814
  `call&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"90\" href=\"#\">rack
3815
- (1.6.0) lib/rack/handler/webrick.rb:89:in `service&#39;</a><br><a class=\"trace-frames\"
3816
- data-frame-id=\"91\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
3817
- `service&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"92\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
3818
- `run&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"93\" href=\"#\">/home/dlweber/.rbenv/versions/2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in
3815
+ (1.6.1) lib/rack/handler/webrick.rb:89:in `service&#39;</a><br><a class=\"trace-frames\"
3816
+ data-frame-id=\"91\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in
3817
+ `service&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"92\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in
3818
+ `run&#39;</a><br><a class=\"trace-frames\" data-frame-id=\"93\" href=\"#\">/home/dlweber/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in
3819
3819
  `block in start_thread&#39;</a><br></code></pre>\n </div>\n\n <script
3820
3820
  type=\"text/javascript\">\n var traceFrames = document.getElementsByClassName('trace-frames');\n
3821
3821
  \ var selectedFrame, currentSource = document.getElementById('frame-source-0');\n\n
@@ -3830,7 +3830,7 @@ http_interactions:
3830
3830
  && el) {\n currentSource.className += \" hidden\";\n el.className
3831
3831
  = el.className.replace(\" hidden\", \"\");\n currentSource = el;\n
3832
3832
  \ }\n }\n }\n </script>\n</div>\n\n \n\n<h2 style=\"margin-top:
3833
- 30px\">Request</h2>\n<p><b>Parameters</b>:</p> <pre>{&quot;id&quot;=&gt;&quot;875190ee-1fa4-4298-916b-147d1cbce91f&quot;}</pre>\n\n<div
3833
+ 30px\">Request</h2>\n<p><b>Parameters</b>:</p> <pre>{&quot;id&quot;=&gt;&quot;a1/3e/2a/18/a13e2a18-8699-4b31-8d27-73370263b321&quot;}</pre>\n\n<div
3834
3834
  class=\"details\">\n <div class=\"summary\"><a href=\"#\" onclick=\"return
3835
3835
  toggleSessionDump()\">Toggle session dump</a></div>\n <div id=\"session_dump\"
3836
3836
  style=\"display:none\"><pre></pre></div>\n</div>\n\n<div class=\"details\">\n
@@ -3840,7 +3840,7 @@ http_interactions:
3840
3840
  &quot;gzip, deflate&quot;\nREMOTE_ADDR: &quot;127.0.0.1&quot;\nREMOTE_HOST:
3841
3841
  &quot;127.0.0.1&quot;\nSERVER_NAME: &quot;localhost&quot;\nSERVER_PROTOCOL:
3842
3842
  &quot;HTTP/1.1&quot;</pre></div>\n</div>\n\n<h2 style=\"margin-top: 30px\">Response</h2>\n<p><b>Headers</b>:</p>
3843
- <pre>None</pre>\n\n</div>\n\n\n</body>\n</html>\n<div id=\"console\"\n data-remote-path='console/repl_sessions/1a7a538504d83f501305bd1f1084ade1'\n
3843
+ <pre>None</pre>\n\n</div>\n\n\n</body>\n</html>\n<div id=\"console\"\n data-remote-path='console/repl_sessions/061e2934eb8a6170f448deb3b6bca596'\n
3844
3844
  \ data-initial-prompt='>> '>\n</div>\n\n\n<script type=\"text/javascript\">\n(function()
3845
3845
  {\n // DOM helpers\nfunction hasClass(el, className) {\n var regex = new
3846
3846
  RegExp('(?:^|\\\\s)' + className + '(?!\\\\S)', 'g');\n return el.className.match(regex);\n}\n\nfunction
@@ -4037,10 +4037,10 @@ http_interactions:
4037
4037
  \ resizerElement.addEventListener('mouseup', recordConsoleElementHeight);\n
4038
4038
  \ });\n});\n\n}).call(this);\n</script>\n\n"
4039
4039
  http_version:
4040
- recorded_at: Tue, 05 May 2015 19:18:19 GMT
4040
+ recorded_at: Mon, 11 May 2015 21:29:06 GMT
4041
4041
  - request:
4042
4042
  method: delete
4043
- uri: http://localhost:3000/annotations/875190ee-1fa4-4298-916b-147d1cbce91f
4043
+ uri: http://localhost:3000/annotations/a1%2F3e%2F2a%2F18%2Fa13e2a18-8699-4b31-8d27-73370263b321
4044
4044
  body:
4045
4045
  encoding: US-ASCII
4046
4046
  string: ''
@@ -4067,22 +4067,22 @@ http_interactions:
4067
4067
  Cache-Control:
4068
4068
  - no-cache
4069
4069
  X-Request-Id:
4070
- - a6725083-cc4b-4d8e-a011-ac01436273e8
4070
+ - 6a1aa379-7bb1-4dd0-9b7a-d564a1d17836
4071
4071
  X-Runtime:
4072
- - '0.136989'
4072
+ - '0.154914'
4073
4073
  Server:
4074
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
4074
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
4075
4075
  Date:
4076
- - Tue, 05 May 2015 19:18:19 GMT
4076
+ - Mon, 11 May 2015 21:29:07 GMT
4077
4077
  Connection:
4078
4078
  - Keep-Alive
4079
4079
  Set-Cookie:
4080
- - _internal_session=cy92dGdWT2UzSmtoV1lZemJ1VklJQlpvOWI3bkdTck04QVNET1RwQlFFNnU0Y2Y1ZWRwcHRIdjhrd1NUNTBWbTh6NzdVU1BxSnhnZi9Sai94Q1dnV1h5eXU5VlMvcDZBbkFTUHFJNUNXRmNBUmQvQ0NBaTRGR0hQM1ZUK0UzT3VCR0dNdkpQd25QMzBhb0NmWGxWbElsdXovcUVaM0JJSUlSa1lLa0JEem5lQlpPbEhFMW5lMkM1RFJUekVhOHpkLS1YaGRzYy9tN2ZUSXJ1bWN5WGlHdDlBPT0%3D--abde334931a246b9e7e397bce62e25dead791ea5;
4080
+ - _internal_session=dTlmTnN0ZjJhazAzczZEcE4xbE8zdDdXZW9BWTRYUVNSREhIVVRLMndCYXUwMXZ3eHo5Vmt4eHhSWDZwVEFZdFBDcmNqRHE0S25DQVVXQ2FYK0Y5ZkdsVEFWNHJTSFh5UDBQRnc0Szl0RkpQMjdNdVJYbU1zRlNITEtFT0lsVnU4Y0ozYi96RW91aGVmekgrdkp1djNLQ1Uyc1hLVEJKT2hRZjJ2c2xFekc0VHR0RVZDbGJDWCtobUF4UDVHVlo2LS1pb3g4Y3FMN2pTRDZNa3Qrc2FodjJnPT0%3D--16fb07014f8d32728898607bf17e2921b52545b4;
4081
4081
  path=/; HttpOnly
4082
4082
  - request_method=DELETE; path=/
4083
4083
  body:
4084
4084
  encoding: UTF-8
4085
4085
  string: ''
4086
4086
  http_version:
4087
- recorded_at: Tue, 05 May 2015 19:18:19 GMT
4087
+ recorded_at: Mon, 11 May 2015 21:29:07 GMT
4088
4088
  recorded_with: VCR 2.9.3