triannon-client 0.4.2 → 0.5.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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.env_example +16 -2
  3. data/.rspec +1 -0
  4. data/README.md +49 -18
  5. data/Rakefile +15 -2
  6. data/lib/triannon-client.rb +12 -6
  7. data/lib/triannon-client/configuration.rb +26 -14
  8. data/lib/triannon-client/triannon_client.rb +139 -44
  9. 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 → CRUD/create_annotation.yml} +192 -132
  10. data/spec/fixtures/vcr_cassettes/TriannonClientAUTH/with_authentication/behaves_like_authenticate/-_authenticate_returns_true.yml +343 -0
  11. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/POST_401_response_retries_and_logs_RestClient_Exception_message.yml +170 -0
  12. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/POST_403_response_does_not_retry_and_logs_RestClient_Exception_message.yml +170 -0
  13. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/POST_500_response_does_not_retry_and_logs_RestClient_Exception_message.yml +170 -0
  14. data/spec/fixtures/vcr_cassettes/{TriannonClient/_get_annotations/returns_an_annotation_list_with_an_annotation_created_by_a_prior_POST.yml → TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/does_not_raise_an_error_when_submitting_a_valid_open_annotation.yml} +203 -319
  15. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/logs_RuntimeError_message.yml +170 -0
  16. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/_post_annotation/with_authentication/behaves_like_create_annotations/returns_a_RestClient_Response_object.yml +170 -0
  17. data/spec/fixtures/vcr_cassettes/{TriannonClient/_post_annotation → TriannonClientCREATE/_post_annotation/without_authentication/behaves_like_create_annotations}/does_not_raise_an_error_when_submitting_a_valid_open_annotation.yml +29 -27
  18. data/spec/fixtures/vcr_cassettes/TriannonClientCREATE/clear_annotations.yml +590 -0
  19. data/spec/fixtures/vcr_cassettes/TriannonClientDELETE/_delete_annotation/with_authentication/behaves_like_delete_annotations/returns_TRUE_when_deleting_an_annotation_that_does_NOT_exist.yml +349 -0
  20. data/spec/fixtures/vcr_cassettes/TriannonClientDELETE/_delete_annotation/with_authentication/behaves_like_delete_annotations/returns_TRUE_when_deleting_an_annotation_that_exists.yml +332 -0
  21. data/spec/fixtures/vcr_cassettes/TriannonClientDELETE/_delete_annotation/with_authentication/behaves_like_delete_annotations/validates_the_annotation_ID.yml +288 -0
  22. data/spec/fixtures/vcr_cassettes/{TriannonClient/_delete_annotation/returns_TRUE_when_deleting_an_open_annotation_that_does_NOT_exist.yml → TriannonClientDELETE/_delete_annotation/without_authentication/behaves_like_delete_annotations/returns_TRUE_when_deleting_an_annotation_that_does_NOT_exist.yml} +13 -9
  23. data/spec/fixtures/vcr_cassettes/TriannonClientDELETE/_delete_annotation/without_authentication/behaves_like_delete_annotations/returns_TRUE_when_deleting_an_annotation_that_exists.yml +127 -0
  24. data/spec/fixtures/vcr_cassettes/{TriannonClient/_delete_annotation → TriannonClientDELETE/_delete_annotation/without_authentication/behaves_like_delete_annotations}/validates_the_annotation_ID.yml +7 -5
  25. data/spec/fixtures/vcr_cassettes/TriannonClientDELETE/clear_annotations.yml +594 -0
  26. data/spec/fixtures/vcr_cassettes/{TriannonClient → TriannonClientREAD/GET}/_get_annotations/returns_an_RDF_Graph.yml +30 -23
  27. data/spec/fixtures/vcr_cassettes/{TriannonClient → TriannonClientREAD/GET}/_get_annotations/returns_an_RDF_Graph_that_contains_an_AnnotationList.yml +30 -23
  28. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/_get_annotations/returns_an_annotation_list_with_an_annotation_created_by_a_prior_POST.yml +302 -0
  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/n-quads_.yml → TriannonClientREAD/GET/_get_iiif_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml} +25 -78
  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/n-triples_.yml → TriannonClientREAD/GET/_get_oa_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml} +25 -78
  31. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/_response2graph/accepts_a_RestClient_Response_instance.yml +2399 -0
  32. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/csvm_json_.yml +1231 -0
  33. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/n-quads_.yml +1231 -0
  34. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/n-triples_.yml +1231 -0
  35. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/rdf_json_.yml +1231 -0
  36. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/rdf_n3_.yml +1231 -0
  37. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/trig_.yml +1231 -0
  38. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/trix_.yml +1231 -0
  39. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/turtle_.yml +1231 -0
  40. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/x-ld_json_.yml +1231 -0
  41. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_application/x-trig_.yml +1231 -0
  42. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/csv_.yml +1231 -0
  43. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/n3_.yml +1231 -0
  44. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/plain_.yml +1231 -0
  45. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/rdf_n3_.yml +1231 -0
  46. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/rdf_turtle_.yml +1231 -0
  47. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/tab-separated-values_.yml +1231 -0
  48. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/cannot_get_an_open_annotation_by_ID_with_content_type_text/x-nquads_.yml +1231 -0
  49. 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 → TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/gets_an_open_annotation_by_ID_with_content_type_application}/ld_json_.yml +25 -78
  50. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/gets_an_open_annotation_by_ID_with_content_type_application/rdf_xml_.yml +68 -0
  51. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/gets_an_open_annotation_by_ID_with_content_type_application/x-turtle_.yml +69 -0
  52. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_custom_content_type/gets_an_open_annotation_by_ID_with_content_type_text/turtle_.yml +69 -0
  53. data/spec/fixtures/vcr_cassettes/{TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type → TriannonClientREAD/GET/annotation_by_ID/using_default_content_type}/checks_the_annotation_ID.yml +25 -78
  54. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/GET/annotation_by_ID/using_default_content_type/returns_an_EMPTY_RDF_graph_with_a_valid_ID_for_NO_annotation_on_the_server.yml +186 -0
  55. 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 → TriannonClientREAD/GET/annotation_by_ID/using_default_content_type/returns_an_RDF_graph_with_a_valid_ID_for_an_annotation_on_the_server.yml} +25 -78
  56. data/spec/fixtures/vcr_cassettes/TriannonClientREAD/clear_annotations.yml +648 -0
  57. 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 → TriannonClientREAD/create_annotation.yml} +192 -131
  58. data/spec/lib/triannon-client/configuration_spec.rb +83 -27
  59. data/spec/lib/triannon-client/triannon_client_auth_spec.rb +61 -0
  60. data/spec/lib/triannon-client/triannon_client_class_spec.rb +104 -0
  61. data/spec/lib/triannon-client/triannon_client_create_spec.rb +119 -0
  62. data/spec/lib/triannon-client/triannon_client_delete_spec.rb +117 -0
  63. data/spec/lib/triannon-client/triannon_client_read_spec.rb +342 -0
  64. data/spec/spec_helper.rb +140 -4
  65. data/triannon-client.gemspec +1 -1
  66. metadata +112 -153
  67. 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 +0 -3995
  68. 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 +0 -3995
  69. 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 +0 -3995
  70. 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 +0 -3995
  71. 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 +0 -3995
  72. 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 +0 -3995
  73. 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 +0 -3995
  74. 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 +0 -3995
  75. 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 +0 -3995
  76. 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 +0 -3995
  77. 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 +0 -3995
  78. 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 +0 -3995
  79. 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 +0 -3995
  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/ld_json_.yml +0 -4946
  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_text/turtle_.yml +0 -2566
  82. 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 +0 -2502
  83. 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 +0 -2502
  84. 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 +0 -2502
  85. 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 +0 -2502
  86. 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 +0 -2502
  87. 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 +0 -2502
  88. 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 +0 -2502
  89. 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 +0 -2502
  90. 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 +0 -2502
  91. 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 +0 -2502
  92. 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 +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_content_type_text/turtle_.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_content_type_text/x-nquads_.yml +0 -2502
  95. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/logs_exceptions.yml +0 -2502
  96. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/raises_an_argument_error_with_a_nil_ID.yml +0 -2502
  97. 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 +0 -2502
  98. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_annotation/without_content_type/raises_an_argument_error_with_an_integer_ID.yml +0 -2502
  99. 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 +0 -2502
  100. 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 +0 -2502
  101. 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 +0 -2561
  102. 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 +0 -4946
  103. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_iiif_annotation/requests_an_open_annotation_by_ID_using_a_IIIF_profile.yml +0 -2502
  104. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_iiif_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml +0 -2746
  105. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_oa_annotation/requests_an_open_annotation_by_ID_using_an_OA_profile.yml +0 -2502
  106. data/spec/fixtures/vcr_cassettes/TriannonClient/GET_annotation_by_ID_/_get_oa_annotation/returns_an_RDF_Graph_of_an_open_annotation.yml +0 -4946
  107. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/does_not_log_exceptions_for_missing_annotations_404_responses_.yml +0 -64
  108. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/does_not_log_exceptions_for_missing_annotations_410_responses_.yml +0 -64
  109. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/logs_exceptions.yml +0 -64
  110. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_FALSE_for_a_500_response_to_a_DELETE_request.yml +0 -64
  111. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_for_a_200_response_to_a_DELETE_request.yml +0 -64
  112. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_for_a_202_response_to_a_DELETE_request.yml +0 -64
  113. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_for_a_204_response_to_a_DELETE_request.yml +0 -64
  114. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_for_a_404_response_to_a_DELETE_request.yml +0 -64
  115. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_for_a_410_response_to_a_DELETE_request.yml +0 -64
  116. data/spec/fixtures/vcr_cassettes/TriannonClient/_delete_annotation/returns_TRUE_when_deleting_an_open_annotation_that_exists.yml +0 -2549
  117. data/spec/fixtures/vcr_cassettes/TriannonClient/_post_annotation/logs_exceptions.yml +0 -5355
  118. data/spec/fixtures/vcr_cassettes/TriannonClient/_post_annotation/logs_exceptions_for_RestClient_Exception.yml +0 -5355
  119. data/spec/fixtures/vcr_cassettes/TriannonClient/_post_annotation/returns_a_RestClient_Response_object.yml +0 -2502
  120. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_id/returns_a_String_ID_from_the_RDF_URI_of_an_annotation.yml +0 -2502
  121. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_id/returns_a_String_ID_that_is_not_empty.yml +0 -2502
  122. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_uris/returns_an_RDF_URI_that_is_a_valid_URI.yml +0 -2551
  123. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_annotation_uris/returns_an_array_of_RDF_URI_from_an_RDF_Graph_of_an_annotation.yml +0 -2502
  124. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/accepts_a_RestClient_Response_instance.yml +0 -4898
  125. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/raises_ArgumentError_when_given_an_empty_String.yml +0 -2502
  126. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/raises_ArgumentError_when_given_nil.yml +0 -2502
  127. data/spec/fixtures/vcr_cassettes/TriannonClient/response_processing_utilities/_response2graph/returns_an_RDF_Graph.yml +0 -2502
  128. data/spec/lib/triannon-client/triannon_client_spec.rb +0 -546
@@ -2,7 +2,174 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://localhost:3000/annotations/foo/
5
+ uri: http://localhost:3000/auth/client_identity
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"clientId":"clientA","clientSecret":"secretA"}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '47'
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: 'OK '
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"7522e22c4d9acf18fe993ca8dcbb4f76"
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ X-Request-Id:
38
+ - 747b6740-5a0d-4075-9593-101fc4c48ad7
39
+ X-Runtime:
40
+ - '0.161758'
41
+ Server:
42
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
43
+ Date:
44
+ - Mon, 03 Aug 2015 22:12:07 GMT
45
+ Content-Length:
46
+ - '186'
47
+ Connection:
48
+ - Keep-Alive
49
+ Set-Cookie:
50
+ - _internal_session=Q0RLeFpFWE11MUdHa2t2QTNleW4xbnhGbmNZR2l3L01oR3l4ZkhZZjhLc1orbURaL1lxcWtGOHJqcUZ3eXFwYmxoM1B4K0cvVmgzcHRESzNtRGZEZ2gybEJPQVcyaDNvVkVvc2VTZUVuc0xwQ0UzNnBjbWcvK2UvVkZXdUkvcVFJTlVKTFU5aEZxaGRNdEw1VEdDdzY1TGRRMEN2RE5oTkFxNVJLVGhoamRvVFdMUW1TRWlFZW92Q1Q5NlJxZElHWjZWR084V3lQTG52eWc3SkZTRDRZWERJaWNHbERKVk1od2RmRlFHaDNONW9HeDVNbE9EaWdKSnAwUFIxbWdzMTU4UzNiamZkTHN2WWE2NzRuR0ozVmxGaEdlOVArSko0bmxQVXEvNlVIVUhBTXoxdzEzUGNnbEVFbEE3YWVxZFF2WmZYdllibDVPcGwxV2UzbGJHRzArbGFXQkQ5bEFNN1hNK1Y0czVNZEFTRjRpeEVqNlhsRE1OdmdoaU4xTmVsaDR5WDRiQmtPY0l0SURMSGVtVGM1UVZRWEdKdVdxNnhiSmZkTmlMT3B3Rmc3SnB5RVRqYnkxNnJyWnB0a2lYU1J5Y3F4c2JGN1BXL01RZGppdVlPM0JXWnFPSDE0UmdreGJKdnljakdvNTg9LS0xYS9hNUxLZnBiTzZrS00veklRd0l3PT0%3D--27a45b9c952e86f7a306eef04d46e3fba80af6c0;
51
+ path=/; HttpOnly
52
+ - request_method=POST; path=/
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"authorizationCode":"VEZPMWtMWjNkcjg1b3YwK1R3Tk5aREdNRkdUaVA3K0RQNUNuNFU5SmdSSnlFRythVmNpUzZzTDFFMVZreTRqWS0tK0h2dyt4UlRySjNBRURxK0s0UnBKUT09--467ad7441452b931bf76f1713169b6e4aed3811e"}'
56
+ http_version:
57
+ recorded_at: Mon, 03 Aug 2015 22:12:07 GMT
58
+ - request:
59
+ method: post
60
+ uri: http://localhost:3000/auth/login?code=VEZPMWtMWjNkcjg1b3YwK1R3Tk5aREdNRkdUaVA3K0RQNUNuNFU5SmdSSnlFRythVmNpUzZzTDFFMVZreTRqWS0tK0h2dyt4UlRySjNBRURxK0s0UnBKUT09--467ad7441452b931bf76f1713169b6e4aed3811e
61
+ body:
62
+ encoding: UTF-8
63
+ string: '{"userId":"","workgroups":"org:wg-A, org:wg-B"}'
64
+ headers:
65
+ Accept:
66
+ - application/json
67
+ Accept-Encoding:
68
+ - gzip, deflate
69
+ Content-Type:
70
+ - application/json
71
+ Cookie:
72
+ - _internal_session=Q0RLeFpFWE11MUdHa2t2QTNleW4xbnhGbmNZR2l3L01oR3l4ZkhZZjhLc1orbURaL1lxcWtGOHJqcUZ3eXFwYmxoM1B4K0cvVmgzcHRESzNtRGZEZ2gybEJPQVcyaDNvVkVvc2VTZUVuc0xwQ0UzNnBjbWcvK2UvVkZXdUkvcVFJTlVKTFU5aEZxaGRNdEw1VEdDdzY1TGRRMEN2RE5oTkFxNVJLVGhoamRvVFdMUW1TRWlFZW92Q1Q5NlJxZElHWjZWR084V3lQTG52eWc3SkZTRDRZWERJaWNHbERKVk1od2RmRlFHaDNONW9HeDVNbE9EaWdKSnAwUFIxbWdzMTU4UzNiamZkTHN2WWE2NzRuR0ozVmxGaEdlOVArSko0bmxQVXEvNlVIVUhBTXoxdzEzUGNnbEVFbEE3YWVxZFF2WmZYdllibDVPcGwxV2UzbGJHRzArbGFXQkQ5bEFNN1hNK1Y0czVNZEFTRjRpeEVqNlhsRE1OdmdoaU4xTmVsaDR5WDRiQmtPY0l0SURMSGVtVGM1UVZRWEdKdVdxNnhiSmZkTmlMT3B3Rmc3SnB5RVRqYnkxNnJyWnB0a2lYU1J5Y3F4c2JGN1BXL01RZGppdVlPM0JXWnFPSDE0UmdreGJKdnljakdvNTg9LS0xYS9hNUxLZnBiTzZrS00veklRd0l3PT0%3D--27a45b9c952e86f7a306eef04d46e3fba80af6c0;
73
+ request_method=POST
74
+ Content-Length:
75
+ - '47'
76
+ User-Agent:
77
+ - Ruby
78
+ response:
79
+ status:
80
+ code: 200
81
+ message: 'OK '
82
+ headers:
83
+ X-Frame-Options:
84
+ - SAMEORIGIN
85
+ X-Xss-Protection:
86
+ - 1; mode=block
87
+ X-Content-Type-Options:
88
+ - nosniff
89
+ Content-Type:
90
+ - text/plain; charset=utf-8
91
+ Cache-Control:
92
+ - no-cache
93
+ X-Request-Id:
94
+ - 5b90d4fa-7844-4f6b-93b0-31396e75a7fb
95
+ X-Runtime:
96
+ - '0.164400'
97
+ Server:
98
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
99
+ Date:
100
+ - Mon, 03 Aug 2015 22:12:07 GMT
101
+ Content-Length:
102
+ - '0'
103
+ Connection:
104
+ - Keep-Alive
105
+ Set-Cookie:
106
+ - _internal_session=Q1NTK3JyUnBZcGw0VURDRHBTc3lwUkZwVnRRcExZcER3MUdKMHcvMWhObVhyeHZWMjdZRzFFMkNlckgvRXFLclpyaWJLVUZ6S3dZbHRUcUJOZCtKaUtSUE44THBFaC9iZ3NPbnNsLzUxUDYxQ2JOaUhYUW9wNmM4MEsvcVlRMytJOXRWMGZLOGgvT2hWemVMT04zYzZka3kvbmIvdFVzMENjaUhlcTBIWFdGVVNEU0UxaytCV3J6WjF4cGJXVyt0a3Q5U3dIc3d3NGhhMDFaWnJlKzNIL1NoQXFYZ2tITlRvYU5GVmlDNmxOZGo5WDAwdzJ3STlaeDF3K0V0VVdxVFFHd0x5bWFRRHlaTHQ4QzlDVndWVEJUWmc2VlZLVTBGUWNMWXkyTExqdFUzSHkvTlVyc05mTEpMNGxJZlMvYUxyYU1yRFRacW93RkVMRnRiL1JPVGdMTDZOTUl1MWtDQkpuSmZzenBQc3dLQVJhNDJnREJqNDdDZ09JSFFtamVrVVFxc2lFTG0xL3RyemVLRU82eC8zOTh0emxkeU1halcxT0RBeEZKZTYreXNWNitPblh5OE95MlJrRXZURWtoTG1nbEdka0FMWmJxS2NaMS91eVA1SWxtbU1KMWVkNHZjcEhvSkxRbDNmSEI4QnltTjA0bVd3dzdFaTZ4VTRwYjB6Yk9wVTc1S3NIZGQrKzNoYTRoVHZXWCtrM2V2OTRMSHl1bEZiTVhaN2Q4cHZ5citpRnBvU3M1TCtPNDJHdVlPLS04d25lZUlDRmlNbkxqeGlVMk1EMEdnPT0%3D--7030a3335faa5c8a0b88693c5a8f6ef418d0e5b6;
107
+ path=/; HttpOnly
108
+ - login_user=; path=/
109
+ body:
110
+ encoding: UTF-8
111
+ string: ''
112
+ http_version:
113
+ recorded_at: Mon, 03 Aug 2015 22:12:07 GMT
114
+ - request:
115
+ method: get
116
+ uri: http://localhost:3000/auth/access_token?code=VEZPMWtMWjNkcjg1b3YwK1R3Tk5aREdNRkdUaVA3K0RQNUNuNFU5SmdSSnlFRythVmNpUzZzTDFFMVZreTRqWS0tK0h2dyt4UlRySjNBRURxK0s0UnBKUT09--467ad7441452b931bf76f1713169b6e4aed3811e
117
+ body:
118
+ encoding: US-ASCII
119
+ string: ''
120
+ headers:
121
+ Accept:
122
+ - application/ld+json
123
+ Accept-Encoding:
124
+ - gzip, deflate
125
+ Content-Type:
126
+ - application/ld+json
127
+ Cookie:
128
+ - _internal_session=Q1NTK3JyUnBZcGw0VURDRHBTc3lwUkZwVnRRcExZcER3MUdKMHcvMWhObVhyeHZWMjdZRzFFMkNlckgvRXFLclpyaWJLVUZ6S3dZbHRUcUJOZCtKaUtSUE44THBFaC9iZ3NPbnNsLzUxUDYxQ2JOaUhYUW9wNmM4MEsvcVlRMytJOXRWMGZLOGgvT2hWemVMT04zYzZka3kvbmIvdFVzMENjaUhlcTBIWFdGVVNEU0UxaytCV3J6WjF4cGJXVyt0a3Q5U3dIc3d3NGhhMDFaWnJlKzNIL1NoQXFYZ2tITlRvYU5GVmlDNmxOZGo5WDAwdzJ3STlaeDF3K0V0VVdxVFFHd0x5bWFRRHlaTHQ4QzlDVndWVEJUWmc2VlZLVTBGUWNMWXkyTExqdFUzSHkvTlVyc05mTEpMNGxJZlMvYUxyYU1yRFRacW93RkVMRnRiL1JPVGdMTDZOTUl1MWtDQkpuSmZzenBQc3dLQVJhNDJnREJqNDdDZ09JSFFtamVrVVFxc2lFTG0xL3RyemVLRU82eC8zOTh0emxkeU1halcxT0RBeEZKZTYreXNWNitPblh5OE95MlJrRXZURWtoTG1nbEdka0FMWmJxS2NaMS91eVA1SWxtbU1KMWVkNHZjcEhvSkxRbDNmSEI4QnltTjA0bVd3dzdFaTZ4VTRwYjB6Yk9wVTc1S3NIZGQrKzNoYTRoVHZXWCtrM2V2OTRMSHl1bEZiTVhaN2Q4cHZ5citpRnBvU3M1TCtPNDJHdVlPLS04d25lZUlDRmlNbkxqeGlVMk1EMEdnPT0%3D--7030a3335faa5c8a0b88693c5a8f6ef418d0e5b6;
129
+ login_user=
130
+ User-Agent:
131
+ - Ruby
132
+ response:
133
+ status:
134
+ code: 200
135
+ message: 'OK '
136
+ headers:
137
+ X-Frame-Options:
138
+ - SAMEORIGIN
139
+ X-Xss-Protection:
140
+ - 1; mode=block
141
+ X-Content-Type-Options:
142
+ - nosniff
143
+ Content-Type:
144
+ - '["application/ld+json"]; charset=utf-8'
145
+ Etag:
146
+ - W/"230a44733c64ff963aca4d0a6b1c32f7"
147
+ Cache-Control:
148
+ - max-age=0, private, must-revalidate
149
+ X-Request-Id:
150
+ - 7601b3dd-c207-4492-a3a7-6957c850f793
151
+ X-Runtime:
152
+ - '0.328678'
153
+ Server:
154
+ - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
155
+ Date:
156
+ - Mon, 03 Aug 2015 22:12:07 GMT
157
+ Content-Length:
158
+ - '306'
159
+ Connection:
160
+ - Keep-Alive
161
+ Set-Cookie:
162
+ - _internal_session=TE5Cc0Vvc3RIdmw1dkZiY25iNHdRM0JqV0crblBXVW5vcGVTSndLaTIzdEN5V280dXMwM3U1U3kwM3VWakZxUFJseGZGK1p5MGxqek9ZV3o0MHpWcU5TNFpwT0RheTJjeENHZ2FSRUVOakdRYnVpdmRNYS9WSUlxV1c0ZTZKOFNtUlhMWEovSzlwQjN6ajNFcldiWDY1QzFnbFYwL3RHNG8za2pqUGxsbk83K05nOXREc0lJSW84ell3R2c5clhFWHhjSEVkWWl2bXk4UG1UZDFwOXozOGFVMTU2Y1Vvc3BPbzU5amw1SnlTVEU0T3ZEZ1h2dGNhVmlQR2wrS01RUEU1VXp4OXNwdG5sYlNzOEZJdkpEdWprcWY1WmVTMVhSSmkzR25CcFZCVk50cEdhVjVlK0g5OEEyUXlzeVBBbjlrdWpKVXBOaWYwSEU5TFp5Z3c3UWwyNEZscWNJS0lWUXloVHdhcmZOWkJ3azNtR0dxTk8ySFNFWkxxVnVoY21xeDZ1cGdlSUcxOWx5Z1Zkd1VrcEVINFZFS0V0NU9GVWFtMTRJbk9sN3ArSlJVTVNRdkhrTG9GSWdQZmJSK3FERG5sd3RkUk1VUDRwSysxV29ZbTF2TVVsWDZIZGRISHVZYWdvMGNRZVM5UEJpWk0rdTJqbFVzRExvcDk0UHQ0elNyN3N6T0lDcTZEOHlVSDJlQks3OUtXejB5RUNtaC9DZWkyTFo4bDVUTU5yMUxMQlluU0VIV2NiY1pNczdkcEFObE1oVUFCODl5d3FCbitEREI0cFdNMG9UQ1QzTXlSb1piUlovclN4ZUE0UlRUQm1BYVVBRmFCMVp4azhnZittOUZPR3B4Q0RQdjdtbzNMdUVRbXI2N0kvNExkL29nbnF1STNscXBWNVJlTVNlM1pxb3RIenc1K3lqM0xUTTgxTzVDNzFOTkNRLzZwRmd6RUtrLzJaWjNHaEFuMjJTQmpnMUxPaDBaZW5CMW01dVZsa0h5YTdmOGpLMTdXcWNxQmdFR3ljb2Uxb0JUL1FUeWY3U1lIUjdGT3hPMWs4cGQ0SVZ2YU9sQ1RKTzF2Mk5sU0YwQjJjMER2dzFObjVvbDhkYTM2Z0RGY1ZML2VhREVXTUlqWUZITFlXYzdYeGNDUFB1cVlWMDhjeEpsS2p2UU9UaThaN0tUZEpsSytwVGhlR2F6K3BOL3JhRkRXSGN2MHVQbmpOMnc0Sm85R0s5OEF4em5Hcnl1OWhlNzVWdmlKMUdOUlYwK29XNDhXRFBNa1FRODJrTHg2LzJMM3ZhQ2Q2UGxHZnEwVndnVFJoSFludUhGZUpnN29iN2Ztcz0tLVY1VHhjK2dXMGlxZS9jQndFT005SEE9PQ%3D%3D--1c0d8e861a27d5656614e525359a45c2304931e8;
163
+ path=/; HttpOnly
164
+ - login_user=; path=/; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000
165
+ body:
166
+ encoding: UTF-8
167
+ string: '{"accessToken":"QTBJVnpKYWFGUXByRTdLbEphbkRETHhPem8wTEY0Slo2TnNmc3VWU0tiQ3dOKzBvNXhFbEd1L1o1UWxBYjRNalN0bDlhYW44dXFXMjFrUEM2T3lnMHVDblNtaGVmbks1RXovWGFOaVJ5WTJQZFE3ays3YnRPWXBaRzhyZUhuRFktLUxZb1NFL0FKRUJvWElBa1lUaG1CU3c9PQ==--53f669f3f252befe49a995c6cb4169fbfb086b7b","tokenType":"Bearer","expiresIn":3600}'
168
+ http_version:
169
+ recorded_at: Mon, 03 Aug 2015 22:12:07 GMT
170
+ - request:
171
+ method: post
172
+ uri: http://localhost:3000/annotations/bar/
6
173
  body:
7
174
  encoding: US-ASCII
8
175
  string: commit=Create%20Annotation&annotation[data]=%7B%22%40context%22%3A%22http%3A%2F%2Fiiif.io%2Fapi%2Fpresentation%2F2%2Fcontext.json%22%2C%22%40graph%22%3A%5B%7B%22%40id%22%3A%22_%3Ag70349699654640%22%2C%22%40type%22%3A%5B%22dctypes%3AText%22%2C%22cnt%3AContentAsText%22%5D%2C%22chars%22%3A%22I%20love%20this!%22%2C%22format%22%3A%22text%2Fplain%22%2C%22language%22%3A%22en%22%7D%2C%7B%22%40type%22%3A%22oa%3AAnnotation%22%2C%22motivation%22%3A%22oa%3Acommenting%22%2C%22on%22%3A%22http%3A%2F%2Fpurl.stanford.edu%2Fkq131cs7229%22%2C%22resource%22%3A%22_%3Ag70349699654640%22%7D%5D%7D
@@ -13,6 +180,10 @@ http_interactions:
13
180
  - gzip, deflate
14
181
  Content-Type:
15
182
  - application/x-www-form-urlencoded
183
+ Authorization:
184
+ - Bearer QTBJVnpKYWFGUXByRTdLbEphbkRETHhPem8wTEY0Slo2TnNmc3VWU0tiQ3dOKzBvNXhFbEd1L1o1UWxBYjRNalN0bDlhYW44dXFXMjFrUEM2T3lnMHVDblNtaGVmbks1RXovWGFOaVJ5WTJQZFE3ays3YnRPWXBaRzhyZUhuRFktLUxZb1NFL0FKRUJvWElBa1lUaG1CU3c9PQ==--53f669f3f252befe49a995c6cb4169fbfb086b7b
185
+ Cookie:
186
+ - _internal_session=TE5Cc0Vvc3RIdmw1dkZiY25iNHdRM0JqV0crblBXVW5vcGVTSndLaTIzdEN5V280dXMwM3U1U3kwM3VWakZxUFJseGZGK1p5MGxqek9ZV3o0MHpWcU5TNFpwT0RheTJjeENHZ2FSRUVOakdRYnVpdmRNYS9WSUlxV1c0ZTZKOFNtUlhMWEovSzlwQjN6ajNFcldiWDY1QzFnbFYwL3RHNG8za2pqUGxsbk83K05nOXREc0lJSW84ell3R2c5clhFWHhjSEVkWWl2bXk4UG1UZDFwOXozOGFVMTU2Y1Vvc3BPbzU5amw1SnlTVEU0T3ZEZ1h2dGNhVmlQR2wrS01RUEU1VXp4OXNwdG5sYlNzOEZJdkpEdWprcWY1WmVTMVhSSmkzR25CcFZCVk50cEdhVjVlK0g5OEEyUXlzeVBBbjlrdWpKVXBOaWYwSEU5TFp5Z3c3UWwyNEZscWNJS0lWUXloVHdhcmZOWkJ3azNtR0dxTk8ySFNFWkxxVnVoY21xeDZ1cGdlSUcxOWx5Z1Zkd1VrcEVINFZFS0V0NU9GVWFtMTRJbk9sN3ArSlJVTVNRdkhrTG9GSWdQZmJSK3FERG5sd3RkUk1VUDRwSysxV29ZbTF2TVVsWDZIZGRISHVZYWdvMGNRZVM5UEJpWk0rdTJqbFVzRExvcDk0UHQ0elNyN3N6T0lDcTZEOHlVSDJlQks3OUtXejB5RUNtaC9DZWkyTFo4bDVUTU5yMUxMQlluU0VIV2NiY1pNczdkcEFObE1oVUFCODl5d3FCbitEREI0cFdNMG9UQ1QzTXlSb1piUlovclN4ZUE0UlRUQm1BYVVBRmFCMVp4azhnZittOUZPR3B4Q0RQdjdtbzNMdUVRbXI2N0kvNExkL29nbnF1STNscXBWNVJlTVNlM1pxb3RIenc1K3lqM0xUTTgxTzVDNzFOTkNRLzZwRmd6RUtrLzJaWjNHaEFuMjJTQmpnMUxPaDBaZW5CMW01dVZsa0h5YTdmOGpLMTdXcWNxQmdFR3ljb2Uxb0JUL1FUeWY3U1lIUjdGT3hPMWs4cGQ0SVZ2YU9sQ1RKTzF2Mk5sU0YwQjJjMER2dzFObjVvbDhkYTM2Z0RGY1ZML2VhREVXTUlqWUZITFlXYzdYeGNDUFB1cVlWMDhjeEpsS2p2UU9UaThaN0tUZEpsSytwVGhlR2F6K3BOL3JhRkRXSGN2MHVQbmpOMnc0Sm85R0s5OEF4em5Hcnl1OWhlNzVWdmlKMUdOUlYwK29XNDhXRFBNa1FRODJrTHg2LzJMM3ZhQ2Q2UGxHZnEwVndnVFJoSFludUhGZUpnN29iN2Ztcz0tLVY1VHhjK2dXMGlxZS9jQndFT005SEE9PQ%3D%3D--1c0d8e861a27d5656614e525359a45c2304931e8
16
187
  Content-Length:
17
188
  - '580'
18
189
  User-Agent:
@@ -31,31 +202,31 @@ http_interactions:
31
202
  Content-Type:
32
203
  - application/ld+json; charset=utf-8
33
204
  Etag:
34
- - W/"9174b64703f6a6df2ebde91a1491ff09"
205
+ - W/"97ada74db5630818e8fb95df01b40974"
35
206
  Cache-Control:
36
207
  - max-age=0, private, must-revalidate
37
208
  X-Request-Id:
38
- - cb2c5880-aa83-429b-8778-231577e2e74c
209
+ - fde74ca9-2175-464b-ae62-e82c58054ece
39
210
  X-Runtime:
40
- - '1.858800'
211
+ - '1.699353'
41
212
  Server:
42
213
  - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
43
214
  Date:
44
- - Fri, 19 Jun 2015 18:38:23 GMT
215
+ - Mon, 03 Aug 2015 22:12:09 GMT
45
216
  Content-Length:
46
217
  - '447'
47
218
  Connection:
48
219
  - Keep-Alive
49
220
  Set-Cookie:
50
- - _internal_session=UWxVNXRkWGVoRXRXTmNHc1A0ejBuQXQxT3RrSUl3UmpReE12WHgvVi9wNEZUczF6NjV1UVp4b1E0S3NmNUV1eERLM2oxSGsxbmp3VVladDVHcUFHVlJwaDh3Tllud0xyV3ord3ZOSWdIaUwyRERQakh5b0ZOVm8rUG5MemNjdWVSZzZ1aW5DYXVQNTh5UUlDcEhXNHI2YU01d1BKbkFCOUdZdUhUMVNURERTekNsQ2daUm55Yml0eW14ZDVwRFVrM1AvMkJuSVN0M1FhdHV5UGI3bVlQU3NQSkhmNThUWW42OURBSnZERmJ0NU91OVRyWmNVSVFxanJXNzd3eTlOay0tcUN6WDZjQVhuTHlUaUxuT01qN2dGZz09--2c52ff679a5e0a6656e8597519a21816900edd19;
221
+ - _internal_session=cHQwdGxuak9kWE43cVFBc1VLWWFrbUxzbFdrWG9WUXlWQlN0VWFGd3lGQ0NrZUNuMWVHUGY3dHZ3cFN0eWlsK1MvQTZSSlFMNTRLL0dGYXJ4RFRQY1hrdk1VcmNyTVlJVkxaam1ZNEkzUjNaTFBrSmVxb2lTcC9UQmp6anloZFhsdVRPeE9jV1RXdmQyNk1rYkl3NkdncHNNSHFVZGFsWmtsUjQxWjBIMVF4enhPOFhnSHRJajRlM0JtYkU4Wi9qZ0xJSk1kTUMxb0piQk9EaC9ucUtTN0ZiQzVBR0RZWjVPVzlxL0dmU3Y1bFhzdW9STGVSWWR3b2JodTZ0amNWZGszbEdnVXpEcm9zWmpuNFpncDFlckliazVPdyticmdUeU55OTNkYUdxZjYySVJCYVNNWktEMmxzazRPL1NCc2hDNmpPa0w2amtkWC9sQmhGMW5lUklsQlMzTDJST2poUUNGOVNQem9jQlpzZVI5RXV1aGFtVnFvbXM5WURReWNxM0Jjc2NQbkxFZk5td080cG1hOXdNdW5QQkp1VEJoeHd2ZkF1aEZpSTRlQ1JBN2hFM0hKakhGc2kvbzRVTlcyTDRGcUgrb1YrUlFqWUhtUklOMHBJc2k2TEEyZnl3cVBzY1I0cDgrb2tIVDJzM2tLMWZYTURRZXc2MjNvNEhTYitYV2R0SE44NVJaOEVkdmZiUUtHODVFVTNZalBtK3gyLy9LS1hlUzJla3V2MEZCamFNY0ZkRjZRbFNkaTUxRFFzbUc0WWVFYndaODBEUzR0QTlNMFEvNWl1bllDSnJkUlpqVW5qRFYweFhEM1R6L0RkUzhRV3kwbDY2RGp1N3pCTWhadFNtaGpNelJXZmpDd214K3MxYmRHSVcwbXZaV2wySEtTNVJweCtPOWxaSjRJL2tRdkFuNFd6cEtnWVVmTHlMdzlNL3RMSGVoY2swdUFVVGQ1Q2JwS0xtWFRCenREaFN2M1RaeE42bWZQLy8zd3BMTVRjNDk0RFlEbm81OE9NSEtjTlZ0eHFPYWlVVkw4RldvNEI0ZUZJclR2MkpyNjlhQmtUemg1VXBFYTdMS2RLSWhIR2JiM1l3MmQzelZaTG5NQ0c1ajhLVG1jNWVsTmpKVmpwYlZJb1d1UlRkVVRMNGRxZVhqbTFENCtVbmgyR2YrYXdoSHYxcStzcFdHSVpJeVZSNVBZb2tQY2xYSzdaSEVZV2FFRkwvOW5ldXhxWVRTTE1abkQrMEpZNkdQcS9sM3ZMbGY1VDc2dmNoT0V0VW1KL21RcUlpREZiS3FFNWdxYUZuY1RBZEVrcUxJT0NKYmc5ZEtaaEFEck1TWWRUU2duNWlST3Uxekt1TFczNWlmRldFTnpEUHlPbHZOWTBNU0t3bHQwYk9Tb1NETTZnZXRXTlFUejFPbURoajVOUjlKR1doSG1RT3BRY04wais1VVJIb2RNTjNKRmxNMEJEeXpZeHc3UU1RYm1nNzFIQ0hUdUhES2hHcElyTDd0RDNpbXVROE9uWkc5S2l3NTFPTU9hd3FLQXRkb2hMaFVOVHNwQTE5UT09LS1hYnhUTFN4Y0JNZjJnWHA1S1RvR0VnPT0%3D--0a66e4461540e3af83ed9ed5f6ce5c1483003136;
51
222
  path=/; HttpOnly
52
223
  - request_method=POST; path=/
53
224
  body:
54
225
  encoding: UTF-8
55
- string: '{"@context":"http://www.w3.org/ns/oa-context-20130208.json","@graph":[{"@id":"_:g70154462250380","@type":["dctypes:Text","cnt:ContentAsText"],"chars":"I
56
- love this!","format":"text/plain","language":"en"},{"@id":"http://your.triannon-server.com/annotations/foo/d6/5b/34/90/d65b3490-7cd2-4cdc-85f4-e0ec34643c05","@type":"oa:Annotation","hasBody":"_:g70154462250380","hasTarget":"http://purl.stanford.edu/kq131cs7229","motivatedBy":"oa:commenting"}]}'
226
+ string: '{"@context":"http://www.w3.org/ns/oa-context-20130208.json","@graph":[{"@id":"_:g69926413076180","@type":["dctypes:Text","cnt:ContentAsText"],"chars":"I
227
+ love this!","format":"text/plain","language":"en"},{"@id":"http://your.triannon-server.com/annotations/bar/11/4f/9b/26/114f9b26-4b59-4e9b-a3a8-41b03318bc5f","@type":"oa:Annotation","hasBody":"_:g69926413076180","hasTarget":"http://purl.stanford.edu/kq131cs7229","motivatedBy":"oa:commenting"}]}'
57
228
  http_version:
58
- recorded_at: Fri, 19 Jun 2015 18:38:23 GMT
229
+ recorded_at: Mon, 03 Aug 2015 22:12:09 GMT
59
230
  - request:
60
231
  method: get
61
232
  uri: http://www.w3.org/ns/oa-context-20130208.json
@@ -75,7 +246,7 @@ http_interactions:
75
246
  message: Temporary Redirect
76
247
  headers:
77
248
  Date:
78
- - Fri, 19 Jun 2015 18:38:23 GMT
249
+ - Mon, 03 Aug 2015 22:12:09 GMT
79
250
  Server:
80
251
  - Apache/2
81
252
  Location:
@@ -83,7 +254,7 @@ http_interactions:
83
254
  Cache-Control:
84
255
  - max-age=21600
85
256
  Expires:
86
- - Sat, 20 Jun 2015 00:38:23 GMT
257
+ - Tue, 04 Aug 2015 04:12:09 GMT
87
258
  Content-Length:
88
259
  - '240'
89
260
  Content-Type:
@@ -99,7 +270,7 @@ http_interactions:
99
270
  <p>The document has moved <a href="http://www.w3.org/ns/oa.jsonld">here</a>.</p>
100
271
  </body></html>
101
272
  http_version:
102
- recorded_at: Fri, 19 Jun 2015 18:38:23 GMT
273
+ recorded_at: Mon, 03 Aug 2015 22:12:09 GMT
103
274
  - request:
104
275
  method: get
105
276
  uri: http://www.w3.org/ns/oa.jsonld
@@ -121,7 +292,7 @@ http_interactions:
121
292
  message: OK
122
293
  headers:
123
294
  Date:
124
- - Fri, 19 Jun 2015 18:38:23 GMT
295
+ - Mon, 03 Aug 2015 22:12:09 GMT
125
296
  Server:
126
297
  - Apache/2
127
298
  Last-Modified:
@@ -135,7 +306,7 @@ http_interactions:
135
306
  Cache-Control:
136
307
  - max-age=21600
137
308
  Expires:
138
- - Sat, 20 Jun 2015 00:38:23 GMT
309
+ - Tue, 04 Aug 2015 04:12:09 GMT
139
310
  P3p:
140
311
  - policyref="http://www.w3.org/2014/08/p3p.xml"
141
312
  Access-Control-Allow-Origin:
@@ -1253,7 +1424,7 @@ http_interactions:
1253
1424
 
1254
1425
 
1255
1426
  http_version:
1256
- recorded_at: Fri, 19 Jun 2015 18:38:23 GMT
1427
+ recorded_at: Mon, 03 Aug 2015 22:12:10 GMT
1257
1428
  - request:
1258
1429
  method: get
1259
1430
  uri: http://www.w3.org/ns/oa-context-20130208.json
@@ -1273,7 +1444,7 @@ http_interactions:
1273
1444
  message: Temporary Redirect
1274
1445
  headers:
1275
1446
  Date:
1276
- - Fri, 19 Jun 2015 18:38:24 GMT
1447
+ - Mon, 03 Aug 2015 22:12:10 GMT
1277
1448
  Server:
1278
1449
  - Apache/2
1279
1450
  Location:
@@ -1281,7 +1452,7 @@ http_interactions:
1281
1452
  Cache-Control:
1282
1453
  - max-age=21600
1283
1454
  Expires:
1284
- - Sat, 20 Jun 2015 00:38:24 GMT
1455
+ - Tue, 04 Aug 2015 04:12:10 GMT
1285
1456
  Content-Length:
1286
1457
  - '240'
1287
1458
  Content-Type:
@@ -1297,7 +1468,7 @@ http_interactions:
1297
1468
  <p>The document has moved <a href="http://www.w3.org/ns/oa.jsonld">here</a>.</p>
1298
1469
  </body></html>
1299
1470
  http_version:
1300
- recorded_at: Fri, 19 Jun 2015 18:38:24 GMT
1471
+ recorded_at: Mon, 03 Aug 2015 22:12:10 GMT
1301
1472
  - request:
1302
1473
  method: get
1303
1474
  uri: http://www.w3.org/ns/oa.jsonld
@@ -1319,7 +1490,7 @@ http_interactions:
1319
1490
  message: OK
1320
1491
  headers:
1321
1492
  Date:
1322
- - Fri, 19 Jun 2015 18:38:24 GMT
1493
+ - Mon, 03 Aug 2015 22:12:10 GMT
1323
1494
  Server:
1324
1495
  - Apache/2
1325
1496
  Last-Modified:
@@ -1333,7 +1504,7 @@ http_interactions:
1333
1504
  Cache-Control:
1334
1505
  - max-age=21600
1335
1506
  Expires:
1336
- - Sat, 20 Jun 2015 00:38:24 GMT
1507
+ - Tue, 04 Aug 2015 04:12:10 GMT
1337
1508
  P3p:
1338
1509
  - policyref="http://www.w3.org/2014/08/p3p.xml"
1339
1510
  Access-Control-Allow-Origin:
@@ -2451,115 +2622,5 @@ http_interactions:
2451
2622
 
2452
2623
 
2453
2624
  http_version:
2454
- recorded_at: Fri, 19 Jun 2015 18:38:24 GMT
2455
- - request:
2456
- method: get
2457
- uri: http://localhost:3000/annotations/foo/d6%2F5b%2F34%2F90%2Fd65b3490-7cd2-4cdc-85f4-e0ec34643c05
2458
- body:
2459
- encoding: US-ASCII
2460
- string: ''
2461
- headers:
2462
- Accept:
2463
- - application/rdf+xml
2464
- Accept-Encoding:
2465
- - gzip, deflate
2466
- User-Agent:
2467
- - Ruby
2468
- response:
2469
- status:
2470
- code: 200
2471
- message: 'OK '
2472
- headers:
2473
- X-Frame-Options:
2474
- - SAMEORIGIN
2475
- X-Xss-Protection:
2476
- - 1; mode=block
2477
- X-Content-Type-Options:
2478
- - nosniff
2479
- Content-Type:
2480
- - application/rdf+xml; charset=utf-8
2481
- Etag:
2482
- - W/"70096102a48fd8234f310e5383d8b4f3"
2483
- Cache-Control:
2484
- - max-age=0, private, must-revalidate
2485
- X-Request-Id:
2486
- - d54003b4-bd6f-424d-85ec-620aed2516f0
2487
- X-Runtime:
2488
- - '0.137790'
2489
- Server:
2490
- - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
2491
- Date:
2492
- - Fri, 19 Jun 2015 18:38:24 GMT
2493
- Content-Length:
2494
- - '913'
2495
- Connection:
2496
- - Keep-Alive
2497
- body:
2498
- encoding: UTF-8
2499
- string: |
2500
- <?xml version='1.0' encoding='utf-8' ?>
2501
- <rdf:RDF xmlns:cnt='http://www.w3.org/2011/content#' xmlns:dc11='http://purl.org/dc/elements/1.1/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:oa='http://www.w3.org/ns/oa#' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
2502
- <oa:Annotation rdf:about='http://your.triannon-server.com/annotations/foo/d6/5b/34/90/d65b3490-7cd2-4cdc-85f4-e0ec34643c05'>
2503
- <oa:hasBody>
2504
- <dcmitype:Text rdf:nodeID='g70154456640160'>
2505
- <rdf:type rdf:resource='http://www.w3.org/2011/content#ContentAsText'></rdf:type>
2506
- <dc11:format>text/plain</dc11:format>
2507
- <dc11:language>en</dc11:language>
2508
- <cnt:chars>I love this!</cnt:chars>
2509
- </dcmitype:Text>
2510
- </oa:hasBody>
2511
- <oa:hasTarget rdf:resource='http://purl.stanford.edu/kq131cs7229' />
2512
- <oa:motivatedBy rdf:resource='http://www.w3.org/ns/oa#commenting' />
2513
- </oa:Annotation>
2514
-
2515
- </rdf:RDF>
2516
- http_version:
2517
- recorded_at: Fri, 19 Jun 2015 18:38:24 GMT
2518
- - request:
2519
- method: delete
2520
- uri: http://localhost:3000/annotations/foo/d6%2F5b%2F34%2F90%2Fd65b3490-7cd2-4cdc-85f4-e0ec34643c05
2521
- body:
2522
- encoding: US-ASCII
2523
- string: ''
2524
- headers:
2525
- Accept:
2526
- - "*/*; q=0.5, application/xml"
2527
- Accept-Encoding:
2528
- - gzip, deflate
2529
- User-Agent:
2530
- - Ruby
2531
- response:
2532
- status:
2533
- code: 204
2534
- message: 'No Content '
2535
- headers:
2536
- X-Frame-Options:
2537
- - SAMEORIGIN
2538
- X-Xss-Protection:
2539
- - 1; mode=block
2540
- X-Content-Type-Options:
2541
- - nosniff
2542
- Location:
2543
- - http://localhost:3000/annotations?anno_root=foo
2544
- Cache-Control:
2545
- - no-cache
2546
- X-Request-Id:
2547
- - 1c291459-d2ec-443e-8625-d035c394d85f
2548
- X-Runtime:
2549
- - '0.208353'
2550
- Server:
2551
- - WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13)
2552
- Date:
2553
- - Fri, 19 Jun 2015 18:38:25 GMT
2554
- Connection:
2555
- - Keep-Alive
2556
- Set-Cookie:
2557
- - _internal_session=VStxYzJUQVg4aUJ6R2FnWlVlZFc0MDd6SmpZOC94cWVUN1FuWjA4S1V1MC9wMzkvQ0dMejAwazg4eVF5S0lienN3aEJWeXpubUNjY0ZYQmJqR3k3UDRkSG5CT0lKcFdTVkZOSjMrbHo4TW9pMjFnS0NReFBVSXNiWmNRWit3SitwTlZpREFMaVc1d1Fod05GTTdTdTY4YVY3TVpWM1YySTlNTExESi9Pc0duL24yME1HSjdCT3Y0Mzg2THJ1ZUwwLS1IWEtBd2pKbElxT0R5bHg2NTRwRDlRPT0%3D--71f699b9d63650f75ca1a423ea3382af4c2b7d0a;
2558
- path=/; HttpOnly
2559
- - request_method=DELETE; path=/
2560
- body:
2561
- encoding: UTF-8
2562
- string: ''
2563
- http_version:
2564
- recorded_at: Fri, 19 Jun 2015 18:38:25 GMT
2625
+ recorded_at: Mon, 03 Aug 2015 22:12:10 GMT
2565
2626
  recorded_with: VCR 2.9.3
@@ -4,17 +4,24 @@ module TriannonClient
4
4
 
5
5
  describe Configuration do
6
6
 
7
+ before :each do
8
+ triannon_reset
9
+ end
10
+
11
+ after :each do
12
+ triannon_reset
13
+ end
14
+
15
+ let(:config) { Configuration.new }
16
+
7
17
  describe '#debug' do
8
18
  it 'default value is false' do
9
- ENV['DEBUG'] = nil
10
- config = Configuration.new
11
19
  expect(config.debug).to be_falsey
12
20
  end
13
21
  end
14
22
 
15
23
  describe '#debug=' do
16
24
  it 'can set value' do
17
- config = Configuration.new
18
25
  config.debug = true
19
26
  expect(config.debug).to be_truthy
20
27
  end
@@ -22,65 +29,114 @@ module TriannonClient
22
29
 
23
30
  describe '#host' do
24
31
  it 'default value is http://localhost:3000' do
25
- ENV['TRIANNON_HOST'] = nil
26
- config = Configuration.new
27
32
  expect(config.host).to eql('http://localhost:3000')
28
33
  end
29
34
  end
30
35
 
31
36
  describe '#host=' do
32
37
  it 'can set value' do
33
- config = Configuration.new
34
38
  config.host = 'triannon.example.org'
35
39
  expect(config.host).to eql('triannon.example.org')
36
40
  end
37
41
  end
38
42
 
39
- describe '#user' do
43
+ # triannon doesn't support basic auth, so disabled these config params.
44
+ # describe '#user' do
45
+ # it 'default value is an empty string' do
46
+ # expect(config.user).to be_empty
47
+ # end
48
+ # end
49
+ # describe '#user=' do
50
+ # it 'can set value' do
51
+ # config.user = 'fred'
52
+ # expect(config.user).to eql('fred')
53
+ # end
54
+ # end
55
+ # describe '#pass' do
56
+ # it 'default value is an empty string' do
57
+ # expect(config.pass).to be_empty
58
+ # end
59
+ # end
60
+ # describe '#pass=' do
61
+ # it 'can set value' do
62
+ # config.pass = 'secret'
63
+ # expect(config.pass).to eql('secret')
64
+ # end
65
+ # end
66
+
67
+ describe '#client_id' do
40
68
  it 'default value is an empty string' do
41
- ENV['TRIANNON_USER'] = nil
42
- config = Configuration.new
43
- expect(config.user).to be_empty
69
+ expect(config.client_id).to be_empty
44
70
  end
45
71
  end
46
72
 
47
- describe '#user=' do
73
+ describe '#client_id=' do
48
74
  it 'can set value' do
49
- config = Configuration.new
50
- config.user = 'fred'
51
- expect(config.user).to eql('fred')
75
+ config.client_id = 'fred'
76
+ expect(config.client_id).to eql('fred')
52
77
  end
53
78
  end
54
79
 
55
- describe '#pass' do
80
+ describe '#client_pass' do
56
81
  it 'default value is an empty string' do
57
- ENV['TRIANNON_PASS'] = nil
58
- config = Configuration.new
59
- expect(config.pass).to be_empty
82
+ expect(config.client_pass).to be_empty
60
83
  end
61
84
  end
62
85
 
63
- describe '#pass=' do
86
+ describe '#client_pass=' do
64
87
  it 'can set value' do
65
- config = Configuration.new
66
- config.pass = 'secret'
67
- expect(config.pass).to eql('secret')
88
+ config.client_pass = 'secret'
89
+ expect(config.client_pass).to eql('secret')
68
90
  end
69
91
  end
70
92
 
71
93
  describe '#container' do
72
94
  it 'default value is an empty string' do
73
- ENV['TRIANNON_CONTAINER'] = nil
74
- config = Configuration.new
75
95
  expect(config.container).to be_empty
76
96
  end
77
97
  end
78
98
 
79
99
  describe '#container=' do
80
100
  it 'can set value' do
81
- config = Configuration.new
82
- config.container = 'secret'
83
- expect(config.container).to eql('secret')
101
+ config.container = 'foo'
102
+ expect(config.container).to eql('foo')
103
+ end
104
+ end
105
+
106
+ describe '#container_user' do
107
+ it 'default value is an empty string' do
108
+ expect(config.container_user).to be_empty
109
+ end
110
+ end
111
+
112
+ describe '#container_user=' do
113
+ it 'can set value' do
114
+ config.container_user = 'joe'
115
+ expect(config.container_user).to eql('joe')
116
+ end
117
+ end
118
+
119
+ describe '#container_workgroups' do
120
+ it 'default value is an empty string' do
121
+ expect(config.container_workgroups).to be_empty
122
+ end
123
+ end
124
+
125
+ describe '#container_workgroups=' do
126
+ it 'can set value' do
127
+ config.container_workgroups = 'wgA'
128
+ expect(config.container_workgroups).to eql('wgA')
129
+ end
130
+ end
131
+
132
+ describe '#logger' do
133
+ it 'default value is a Logger' do
134
+ expect(config.logger).to be_instance_of(Logger)
135
+ end
136
+ it 'uses STDERR as a fallback for failure to create log file' do
137
+ ENV['TRIANNON_LOG_FILE'] = '/tmp.txt' # permission denied
138
+ expect(config.log_file).to eql('STDERR')
139
+ expect(config.logger).to be_instance_of(Logger)
84
140
  end
85
141
  end
86
142