sequencescape-client-api 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/.rspec +1 -0
- data/.rvmrc +52 -0
- data/.yardoc/checksums +96 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +4 -0
- data/README.markdown +4 -0
- data/Rakefile +2 -0
- data/doc/Array.html +192 -0
- data/doc/BaitLibrary.html +139 -0
- data/doc/Hash.html +242 -0
- data/doc/NilClass.html +214 -0
- data/doc/Sequencescape/Api/Actions/ClassActionHelpers.html +213 -0
- data/doc/Sequencescape/Api/Actions/InstanceActionHelpers.html +282 -0
- data/doc/Sequencescape/Api/Actions.html +197 -0
- data/doc/Sequencescape/Api/Associations/Base/InstanceMethods.html +352 -0
- data/doc/Sequencescape/Api/Associations/Base.html +237 -0
- data/doc/Sequencescape/Api/Associations/BelongsTo/AssociationProxy.html +332 -0
- data/doc/Sequencescape/Api/Associations/BelongsTo/CommonBehaviour/LoadHandler.html +279 -0
- data/doc/Sequencescape/Api/Associations/BelongsTo/CommonBehaviour.html +432 -0
- data/doc/Sequencescape/Api/Associations/BelongsTo/InlineAssociationProxy.html +173 -0
- data/doc/Sequencescape/Api/Associations/BelongsTo.html +212 -0
- data/doc/Sequencescape/Api/Associations/HasMany/AssociationProxy.html +366 -0
- data/doc/Sequencescape/Api/Associations/HasMany/InlineAssociationProxy.html +529 -0
- data/doc/Sequencescape/Api/Associations/HasMany/Json.html +250 -0
- data/doc/Sequencescape/Api/Associations/HasMany/Validation/CompositeErrors.html +493 -0
- data/doc/Sequencescape/Api/Associations/HasMany/Validation.html +245 -0
- data/doc/Sequencescape/Api/Associations/HasMany.html +212 -0
- data/doc/Sequencescape/Api/Associations/InstanceMethods/CompositeErrors.html +379 -0
- data/doc/Sequencescape/Api/Associations/InstanceMethods.html +496 -0
- data/doc/Sequencescape/Api/Associations.html +201 -0
- data/doc/Sequencescape/Api/BasicErrorHandling.html +371 -0
- data/doc/Sequencescape/Api/Composition/Target.html +262 -0
- data/doc/Sequencescape/Api/Composition.html +215 -0
- data/doc/Sequencescape/Api/ConnectionFactory/Actions.html +611 -0
- data/doc/Sequencescape/Api/ConnectionFactory/Helpers.html +233 -0
- data/doc/Sequencescape/Api/ConnectionFactory.html +321 -0
- data/doc/Sequencescape/Api/ErrorHandling/TurnOffValidationOfUuidOnlyRecords.html +189 -0
- data/doc/Sequencescape/Api/ErrorHandling.html +201 -0
- data/doc/Sequencescape/Api/FinderMethods/AllHandler.html +279 -0
- data/doc/Sequencescape/Api/FinderMethods/Caching.html +183 -0
- data/doc/Sequencescape/Api/FinderMethods/Delegation.html +189 -0
- data/doc/Sequencescape/Api/FinderMethods/FindByUuidHandler.html +279 -0
- data/doc/Sequencescape/Api/FinderMethods.html +364 -0
- data/doc/Sequencescape/Api/GeneralError.html +176 -0
- data/doc/Sequencescape/Api/JsonError.html +205 -0
- data/doc/Sequencescape/Api/ModifyingHandler.html +359 -0
- data/doc/Sequencescape/Api/PageOfResults/UpdateHandler.html +279 -0
- data/doc/Sequencescape/Api/PageOfResults.html +611 -0
- data/doc/Sequencescape/Api/Rails/ApplicationController.html +207 -0
- data/doc/Sequencescape/Api/Rails/Resourced.html +269 -0
- data/doc/Sequencescape/Api/Rails.html +117 -0
- data/doc/Sequencescape/Api/Resource/ActiveModel.html +287 -0
- data/doc/Sequencescape/Api/Resource/Attributes/InstanceMethods.html +272 -0
- data/doc/Sequencescape/Api/Resource/Attributes.html +199 -0
- data/doc/Sequencescape/Api/Resource/Groups/InstanceMethods.html +378 -0
- data/doc/Sequencescape/Api/Resource/Groups/Json.html +112 -0
- data/doc/Sequencescape/Api/Resource/Groups/Proxy/InstanceMethods.html +256 -0
- data/doc/Sequencescape/Api/Resource/Groups/Proxy.html +177 -0
- data/doc/Sequencescape/Api/Resource/Groups.html +270 -0
- data/doc/Sequencescape/Api/Resource/InstanceMethods.html +344 -0
- data/doc/Sequencescape/Api/Resource/Json/ClassMethods.html +243 -0
- data/doc/Sequencescape/Api/Resource/Json/CoercionHandler.html +279 -0
- data/doc/Sequencescape/Api/Resource/Json.html +405 -0
- data/doc/Sequencescape/Api/Resource/Modifications.html +295 -0
- data/doc/Sequencescape/Api/Resource.html +436 -0
- data/doc/Sequencescape/Api/ResourceInvalid.html +289 -0
- data/doc/Sequencescape/Api/ResourceModelProxy.html +444 -0
- data/doc/Sequencescape/Api/Version1.html +218 -0
- data/doc/Sequencescape/Api/Version2.html +222 -0
- data/doc/Sequencescape/Api.html +704 -0
- data/doc/Sequencescape/Asset.html +262 -0
- data/doc/Sequencescape/AssetAudit.html +258 -0
- data/doc/Sequencescape/AssetGroup.html +258 -0
- data/doc/Sequencescape/BaitLibraryLayout.html +258 -0
- data/doc/Sequencescape/BarcodePrinter.html +258 -0
- data/doc/Sequencescape/BarcodedAsset.html +293 -0
- data/doc/Sequencescape/Batch.html +327 -0
- data/doc/Sequencescape/Behaviour/Barcoded.html +195 -0
- data/doc/Sequencescape/Behaviour/Labeled.html +189 -0
- data/doc/Sequencescape/Behaviour/Qced/QcFile.html +244 -0
- data/doc/Sequencescape/Behaviour/Qced.html +199 -0
- data/doc/Sequencescape/Behaviour/Receptacle/Aliquot.html +258 -0
- data/doc/Sequencescape/Behaviour/Receptacle.html +195 -0
- data/doc/Sequencescape/Behaviour/StateDriven.html +205 -0
- data/doc/Sequencescape/Behaviour.html +130 -0
- data/doc/Sequencescape/BulkTransfer.html +258 -0
- data/doc/Sequencescape/Comment.html +258 -0
- data/doc/Sequencescape/Lane.html +282 -0
- data/doc/Sequencescape/LibraryEvent.html +258 -0
- data/doc/Sequencescape/LibraryTube.html +322 -0
- data/doc/Sequencescape/Lot.html +258 -0
- data/doc/Sequencescape/LotType/LotCreator.html +182 -0
- data/doc/Sequencescape/LotType.html +268 -0
- data/doc/Sequencescape/MultiplexedLibraryTube.html +326 -0
- data/doc/Sequencescape/Order.html +338 -0
- data/doc/Sequencescape/OrderTemplate/OrderCreator.html +182 -0
- data/doc/Sequencescape/OrderTemplate.html +268 -0
- data/doc/Sequencescape/Pipeline.html +258 -0
- data/doc/Sequencescape/Plate/CommentsCreation.html +184 -0
- data/doc/Sequencescape/Plate/CurrentVolumeSubstraction.html +236 -0
- data/doc/Sequencescape/Plate/Pooling.html +249 -0
- data/doc/Sequencescape/Plate/WellStructure.html +313 -0
- data/doc/Sequencescape/Plate.html +446 -0
- data/doc/Sequencescape/PlateConversion.html +258 -0
- data/doc/Sequencescape/PlateCreation.html +258 -0
- data/doc/Sequencescape/PlatePurpose/PlateCreation.html +186 -0
- data/doc/Sequencescape/PlatePurpose.html +268 -0
- data/doc/Sequencescape/PlateTemplate.html +282 -0
- data/doc/Sequencescape/PooledPlateCreation.html +258 -0
- data/doc/Sequencescape/Project.html +258 -0
- data/doc/Sequencescape/QcDecision.html +258 -0
- data/doc/Sequencescape/QcFile.html +327 -0
- data/doc/Sequencescape/Qcable.html +258 -0
- data/doc/Sequencescape/QcableCreator.html +258 -0
- data/doc/Sequencescape/Request.html +258 -0
- data/doc/Sequencescape/Robot.html +258 -0
- data/doc/Sequencescape/Sample.html +258 -0
- data/doc/Sequencescape/SampleTube.html +318 -0
- data/doc/Sequencescape/Search/BaseHandler.html +234 -0
- data/doc/Sequencescape/Search/MultipleResultHandler.html +276 -0
- data/doc/Sequencescape/Search/SingleResultHandler.html +303 -0
- data/doc/Sequencescape/Search.html +431 -0
- data/doc/Sequencescape/SpecificTubeCreation.html +258 -0
- data/doc/Sequencescape/Stamp.html +258 -0
- data/doc/Sequencescape/StateChange.html +258 -0
- data/doc/Sequencescape/Study.html +258 -0
- data/doc/Sequencescape/Submission.html +258 -0
- data/doc/Sequencescape/SubmissionPool.html +258 -0
- data/doc/Sequencescape/Tag/Group.html +219 -0
- data/doc/Sequencescape/Tag.html +149 -0
- data/doc/Sequencescape/Tag2Layout.html +258 -0
- data/doc/Sequencescape/Tag2LayoutTemplate.html +258 -0
- data/doc/Sequencescape/TagGroup.html +258 -0
- data/doc/Sequencescape/TagLayout.html +258 -0
- data/doc/Sequencescape/TagLayoutTemplate.html +258 -0
- data/doc/Sequencescape/Template.html +258 -0
- data/doc/Sequencescape/Transfer.html +258 -0
- data/doc/Sequencescape/TransferTemplate.html +258 -0
- data/doc/Sequencescape/Tube.html +319 -0
- data/doc/Sequencescape/TubeCreation.html +258 -0
- data/doc/Sequencescape/TubeFromTubeCreation.html +258 -0
- data/doc/Sequencescape/TubePurpose/TubeCreation.html +186 -0
- data/doc/Sequencescape/TubePurpose.html +268 -0
- data/doc/Sequencescape/User.html +258 -0
- data/doc/Sequencescape/VolumeUpdate.html +258 -0
- data/doc/Sequencescape/Well.html +362 -0
- data/doc/Sequencescape.html +121 -0
- data/doc/_index.html +1248 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +481 -0
- data/doc/file.README.html +76 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +76 -0
- data/doc/js/app.js +243 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1411 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/sequencescape/asset.rb +10 -0
- data/lib/sequencescape/asset_audit.rb +7 -0
- data/lib/sequencescape/asset_group.rb +9 -0
- data/lib/sequencescape/bait_library.rb +14 -0
- data/lib/sequencescape/bait_library_layout.rb +9 -0
- data/lib/sequencescape/barcode_printer.rb +13 -0
- data/lib/sequencescape/barcoded_asset.rb +12 -0
- data/lib/sequencescape/batch.rb +24 -0
- data/lib/sequencescape/behaviour/barcoded.rb +15 -0
- data/lib/sequencescape/behaviour/labeled.rb +14 -0
- data/lib/sequencescape/behaviour/qced.rb +31 -0
- data/lib/sequencescape/behaviour/receptacle.rb +21 -0
- data/lib/sequencescape/behaviour/state_driven.rb +19 -0
- data/lib/sequencescape/bulk_transfer.rb +8 -0
- data/lib/sequencescape/comment.rb +7 -0
- data/lib/sequencescape/custom_metadatum_collection.rb +8 -0
- data/lib/sequencescape/lane.rb +8 -0
- data/lib/sequencescape/library_event.rb +5 -0
- data/lib/sequencescape/library_tube.rb +7 -0
- data/lib/sequencescape/locale/en.yml +190 -0
- data/lib/sequencescape/lot.rb +11 -0
- data/lib/sequencescape/lot_type.rb +20 -0
- data/lib/sequencescape/multiplexed_library_tube.rb +6 -0
- data/lib/sequencescape/order.rb +13 -0
- data/lib/sequencescape/order_template.rb +19 -0
- data/lib/sequencescape/pipeline.rb +10 -0
- data/lib/sequencescape/plate/pooling.rb +23 -0
- data/lib/sequencescape/plate/well_structure.rb +27 -0
- data/lib/sequencescape/plate.rb +71 -0
- data/lib/sequencescape/plate_conversion.rb +8 -0
- data/lib/sequencescape/plate_creation.rb +8 -0
- data/lib/sequencescape/plate_purpose.rb +24 -0
- data/lib/sequencescape/plate_template.rb +13 -0
- data/lib/sequencescape/pooled_plate_creation.rb +8 -0
- data/lib/sequencescape/project.rb +11 -0
- data/lib/sequencescape/qc_decision.rb +9 -0
- data/lib/sequencescape/qc_file.rb +14 -0
- data/lib/sequencescape/qcable.rb +17 -0
- data/lib/sequencescape/qcable_creator.rb +13 -0
- data/lib/sequencescape/request.rb +16 -0
- data/lib/sequencescape/robot.rb +5 -0
- data/lib/sequencescape/sample.rb +51 -0
- data/lib/sequencescape/sample_tube.rb +7 -0
- data/lib/sequencescape/search.rb +80 -0
- data/lib/sequencescape/specific_tube_creation.rb +8 -0
- data/lib/sequencescape/stamp.rb +9 -0
- data/lib/sequencescape/state_change.rb +11 -0
- data/lib/sequencescape/study.rb +14 -0
- data/lib/sequencescape/submission.rb +16 -0
- data/lib/sequencescape/submission_pool.rb +7 -0
- data/lib/sequencescape/tag.rb +14 -0
- data/lib/sequencescape/tag2_layout.rb +10 -0
- data/lib/sequencescape/tag2_layout_template.rb +9 -0
- data/lib/sequencescape/tag_group.rb +4 -0
- data/lib/sequencescape/tag_layout.rb +10 -0
- data/lib/sequencescape/tag_layout_template.rb +15 -0
- data/lib/sequencescape/template.rb +6 -0
- data/lib/sequencescape/transfer.rb +9 -0
- data/lib/sequencescape/transfer_request.rb +12 -0
- data/lib/sequencescape/transfer_request_collection.rb +8 -0
- data/lib/sequencescape/transfer_template.rb +9 -0
- data/lib/sequencescape/tube.rb +26 -0
- data/lib/sequencescape/tube_creation.rb +8 -0
- data/lib/sequencescape/tube_from_tube_creation.rb +8 -0
- data/lib/sequencescape/tube_purpose.rb +24 -0
- data/lib/sequencescape/user.rb +13 -0
- data/lib/sequencescape/volume_update.rb +6 -0
- data/lib/sequencescape/well.rb +19 -0
- data/lib/sequencescape/work_completion.rb +10 -0
- data/lib/sequencescape-api/actions.rb +69 -0
- data/lib/sequencescape-api/associations/base/instance_methods.rb +57 -0
- data/lib/sequencescape-api/associations/base.rb +15 -0
- data/lib/sequencescape-api/associations/belongs_to.rb +127 -0
- data/lib/sequencescape-api/associations/has_many/json.rb +10 -0
- data/lib/sequencescape-api/associations/has_many/validation.rb +37 -0
- data/lib/sequencescape-api/associations/has_many.rb +123 -0
- data/lib/sequencescape-api/associations.rb +112 -0
- data/lib/sequencescape-api/capabilities.rb +11 -0
- data/lib/sequencescape-api/composition.rb +37 -0
- data/lib/sequencescape-api/connection_factory/actions.rb +154 -0
- data/lib/sequencescape-api/connection_factory/helpers.rb +9 -0
- data/lib/sequencescape-api/connection_factory.rb +40 -0
- data/lib/sequencescape-api/core.rb +63 -0
- data/lib/sequencescape-api/core_ext/array.rb +7 -0
- data/lib/sequencescape-api/core_ext/hash.rb +18 -0
- data/lib/sequencescape-api/core_ext.rb +2 -0
- data/lib/sequencescape-api/error_handling.rb +42 -0
- data/lib/sequencescape-api/errors.rb +38 -0
- data/lib/sequencescape-api/finder_methods.rb +184 -0
- data/lib/sequencescape-api/locale/en.yml +7 -0
- data/lib/sequencescape-api/rails.rb +88 -0
- data/lib/sequencescape-api/resource/active_model.rb +17 -0
- data/lib/sequencescape-api/resource/attribute_groups.rb +94 -0
- data/lib/sequencescape-api/resource/attributes.rb +87 -0
- data/lib/sequencescape-api/resource/instance_methods.rb +24 -0
- data/lib/sequencescape-api/resource/json.rb +114 -0
- data/lib/sequencescape-api/resource/modifications.rb +111 -0
- data/lib/sequencescape-api/resource.rb +47 -0
- data/lib/sequencescape-api/resource_model_proxy.rb +44 -0
- data/lib/sequencescape-api/version.rb +5 -0
- data/lib/sequencescape-api.rb +16 -0
- data/lib/sequencescape.rb +81 -0
- data/sequencescape-api.gemspec +32 -0
- data/spec/sequencescape-api/associations_spec.rb +95 -0
- data/spec/sequencescape-api/contracts/belongs-to-association.txt +14 -0
- data/spec/sequencescape-api/contracts/client-fails-authentication.txt +6 -0
- data/spec/sequencescape-api/contracts/create-invalid-resource.txt +10 -0
- data/spec/sequencescape-api/contracts/create-model-c-has-many-inline-nested.txt +10 -0
- data/spec/sequencescape-api/contracts/create-model-c-has-many-inline.txt +10 -0
- data/spec/sequencescape-api/contracts/create-model-c-has-many.txt +10 -0
- data/spec/sequencescape-api/contracts/create-model-c.txt +11 -0
- data/spec/sequencescape-api/contracts/create-via-has-many.txt +9 -0
- data/spec/sequencescape-api/contracts/model-a-instance.txt +21 -0
- data/spec/sequencescape-api/contracts/model-b-instance.txt +38 -0
- data/spec/sequencescape-api/contracts/model-c-instance-created.txt +17 -0
- data/spec/sequencescape-api/contracts/model-c-instance-updated.txt +17 -0
- data/spec/sequencescape-api/contracts/model-c-instance.txt +28 -0
- data/spec/sequencescape-api/contracts/model-c-invalid-attribute.txt +8 -0
- data/spec/sequencescape-api/contracts/resource-not-found.txt +6 -0
- data/spec/sequencescape-api/contracts/results-page-1.txt +17 -0
- data/spec/sequencescape-api/contracts/results-page-2.txt +18 -0
- data/spec/sequencescape-api/contracts/results-page-3.txt +17 -0
- data/spec/sequencescape-api/contracts/retrieve-belongs-to-association.txt +3 -0
- data/spec/sequencescape-api/contracts/retrieve-model.txt +4 -0
- data/spec/sequencescape-api/contracts/retrieve-results-page-1.txt +3 -0
- data/spec/sequencescape-api/contracts/retrieve-results-page-2.txt +3 -0
- data/spec/sequencescape-api/contracts/retrieve-results-page-3.txt +3 -0
- data/spec/sequencescape-api/contracts/retrieve-root-with-an-authorised-client.txt +5 -0
- data/spec/sequencescape-api/contracts/retrieve-root-with-an-unauthorised-client.txt +4 -0
- data/spec/sequencescape-api/contracts/retrieve-unauthorised-model-a-list.txt +4 -0
- data/spec/sequencescape-api/contracts/retrieve-unauthorised-model-b-list.txt +4 -0
- data/spec/sequencescape-api/contracts/retrieve-unauthorised-model-c-list.txt +4 -0
- data/spec/sequencescape-api/contracts/root-response-for-authorised-client.txt +20 -0
- data/spec/sequencescape-api/contracts/root-response-for-unauthorised-client.txt +28 -0
- data/spec/sequencescape-api/contracts/unauthorised-model-a-list.txt +15 -0
- data/spec/sequencescape-api/contracts/unauthorised-model-b-list.txt +14 -0
- data/spec/sequencescape-api/contracts/unauthorised-model-c-list.txt +15 -0
- data/spec/sequencescape-api/contracts/update-invalid-resource.txt +10 -0
- data/spec/sequencescape-api/contracts/update-model-c.txt +11 -0
- data/spec/sequencescape-api/finding_methods_spec.rb +34 -0
- data/spec/sequencescape-api/modifications_spec.rb +169 -0
- data/spec/sequencescape-api/root_spec.rb +58 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/support/contract_helper.rb +112 -0
- data/spec/support/namespaces.rb +67 -0
- data/spec/support/shared_examples.rb +12 -0
- metadata +540 -0
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Sequencescape::Api::ConnectionFactory::Actions
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.5
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
pathId = "Sequencescape::Api::ConnectionFactory::Actions";
|
|
19
|
+
relpath = '../../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div class="nav_wrap">
|
|
31
|
+
<iframe id="nav" src="../../../class_list.html"></iframe>
|
|
32
|
+
<div id="resizer"></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="main" tabindex="-1">
|
|
36
|
+
<div id="header">
|
|
37
|
+
<div id="menu">
|
|
38
|
+
|
|
39
|
+
<a href="../../../_index.html">Index (A)</a> »
|
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../Sequencescape.html" title="Sequencescape (module)">Sequencescape</a></span></span> » <span class='title'><span class='object_link'><a href="../../Api.html" title="Sequencescape::Api (class)">Api</a></span></span> » <span class='title'><span class='object_link'><a href="../ConnectionFactory.html" title="Sequencescape::Api::ConnectionFactory (class)">ConnectionFactory</a></span></span>
|
|
41
|
+
»
|
|
42
|
+
<span class="title">Actions</span>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div id="search">
|
|
47
|
+
|
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
|
49
|
+
href="../../../class_list.html">
|
|
50
|
+
|
|
51
|
+
<svg width="24" height="24">
|
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
</svg>
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
</div>
|
|
59
|
+
<div class="clear"></div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<iframe id="search_frame" src="../../../class_list.html"></iframe>
|
|
63
|
+
|
|
64
|
+
<div id="content"><h1>Module: Sequencescape::Api::ConnectionFactory::Actions
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</h1>
|
|
69
|
+
<div class="box_info">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Included in:</dt>
|
|
81
|
+
<dd><span class='object_link'><a href="../ConnectionFactory.html" title="Sequencescape::Api::ConnectionFactory (class)">Sequencescape::Api::ConnectionFactory</a></span></dd>
|
|
82
|
+
</dl>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<dl>
|
|
87
|
+
<dt>Defined in:</dt>
|
|
88
|
+
<dd>lib/sequencescape-api/connection_factory/actions.rb</dd>
|
|
89
|
+
</dl>
|
|
90
|
+
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<h2>Constant Summary</h2>
|
|
95
|
+
<dl class="constants">
|
|
96
|
+
|
|
97
|
+
<dt id="ServerError-constant" class="">ServerError =
|
|
98
|
+
|
|
99
|
+
</dt>
|
|
100
|
+
<dd><pre class="code"><span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Sequencescape</span><span class='op'>::</span><span class='const'>Api</span><span class='op'>::</span><span class='const'>ConnectionFactory</span><span class='op'>::</span><span class='const'>ConnectionError</span><span class='rparen'>)</span></pre></dd>
|
|
101
|
+
|
|
102
|
+
</dl>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
<h2>
|
|
112
|
+
Instance Method Summary
|
|
113
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
114
|
+
</h2>
|
|
115
|
+
|
|
116
|
+
<ul class="summary">
|
|
117
|
+
|
|
118
|
+
<li class="public ">
|
|
119
|
+
<span class="summary_signature">
|
|
120
|
+
|
|
121
|
+
<a href="#create-instance_method" title="#create (instance method)">#<strong>create</strong>(url, body, handler) ⇒ Object </a>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</span>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
136
|
+
|
|
137
|
+
</li>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<li class="public ">
|
|
141
|
+
<span class="summary_signature">
|
|
142
|
+
|
|
143
|
+
<a href="#create_from_file-instance_method" title="#create_from_file (instance method)">#<strong>create_from_file</strong>(url, file, filename, content_type, handler) ⇒ Object </a>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</span>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
158
|
+
|
|
159
|
+
</li>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<li class="public ">
|
|
163
|
+
<span class="summary_signature">
|
|
164
|
+
|
|
165
|
+
<a href="#perform_for_file-instance_method" title="#perform_for_file (instance method)">#<strong>perform_for_file</strong>(http_verb, url, file, filename, content_type, &block) ⇒ Object </a>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</span>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
180
|
+
|
|
181
|
+
</li>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
<li class="public ">
|
|
185
|
+
<span class="summary_signature">
|
|
186
|
+
|
|
187
|
+
<a href="#read-instance_method" title="#read (instance method)">#<strong>read</strong>(url, handler) ⇒ Object </a>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</span>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
202
|
+
|
|
203
|
+
</li>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<li class="public ">
|
|
207
|
+
<span class="summary_signature">
|
|
208
|
+
|
|
209
|
+
<a href="#retrieve-instance_method" title="#retrieve (instance method)">#<strong>retrieve</strong>(url, handler, content_type) ⇒ Object </a>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
</span>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
224
|
+
|
|
225
|
+
</li>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<li class="public ">
|
|
229
|
+
<span class="summary_signature">
|
|
230
|
+
|
|
231
|
+
<a href="#root-instance_method" title="#root (instance method)">#<strong>root</strong>(handler) ⇒ Object </a>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
</span>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
246
|
+
|
|
247
|
+
</li>
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<li class="public ">
|
|
251
|
+
<span class="summary_signature">
|
|
252
|
+
|
|
253
|
+
<a href="#update-instance_method" title="#update (instance method)">#<strong>update</strong>(url, body, handler) ⇒ Object </a>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
</span>
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
268
|
+
|
|
269
|
+
</li>
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
</ul>
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<div id="instance_method_details" class="method_details_list">
|
|
278
|
+
<h2>Instance Method Details</h2>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
<div class="method_details first">
|
|
282
|
+
<h3 class="signature first" id="create-instance_method">
|
|
283
|
+
|
|
284
|
+
#<strong>create</strong>(url, body, handler) ⇒ <tt>Object</tt>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
</h3><table class="source_code">
|
|
291
|
+
<tr>
|
|
292
|
+
<td>
|
|
293
|
+
<pre class="lines">
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
50
|
|
297
|
+
51
|
|
298
|
+
52
|
|
299
|
+
53
|
|
300
|
+
54
|
|
301
|
+
55
|
|
302
|
+
56
|
|
303
|
+
57
|
|
304
|
+
58
|
|
305
|
+
59
|
|
306
|
+
60
|
|
307
|
+
61
|
|
308
|
+
62</pre>
|
|
309
|
+
</td>
|
|
310
|
+
<td>
|
|
311
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 50</span>
|
|
312
|
+
|
|
313
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
314
|
+
<span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_jsonify'>jsonify</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:create</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
315
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_response'>response</span>
|
|
316
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPCreated</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
317
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='comment'># TODO: should be error!
|
|
318
|
+
</span> <span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnauthorized</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_unauthenticated'>unauthenticated</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
319
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnprocessableEntity</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
320
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_missing'>missing</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
321
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPRedirection</span> <span class='kw'>then</span> <span class='id identifier rubyid_handle_redirect'>handle_redirect</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
322
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ServerError</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
|
323
|
+
<span class='kw'>end</span>
|
|
324
|
+
<span class='kw'>end</span>
|
|
325
|
+
<span class='kw'>end</span></pre>
|
|
326
|
+
</td>
|
|
327
|
+
</tr>
|
|
328
|
+
</table>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div class="method_details ">
|
|
332
|
+
<h3 class="signature " id="create_from_file-instance_method">
|
|
333
|
+
|
|
334
|
+
#<strong>create_from_file</strong>(url, file, filename, content_type, handler) ⇒ <tt>Object</tt>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
</h3><table class="source_code">
|
|
341
|
+
<tr>
|
|
342
|
+
<td>
|
|
343
|
+
<pre class="lines">
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
64
|
|
347
|
+
65
|
|
348
|
+
66
|
|
349
|
+
67
|
|
350
|
+
68
|
|
351
|
+
69
|
|
352
|
+
70
|
|
353
|
+
71
|
|
354
|
+
72
|
|
355
|
+
73
|
|
356
|
+
74
|
|
357
|
+
75
|
|
358
|
+
76</pre>
|
|
359
|
+
</td>
|
|
360
|
+
<td>
|
|
361
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 64</span>
|
|
362
|
+
|
|
363
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_from_file'>create_from_file</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
364
|
+
<span class='id identifier rubyid_perform_for_file'>perform_for_file</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
365
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_response'>response</span>
|
|
366
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPCreated</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
367
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='comment'># TODO: should be error!
|
|
368
|
+
</span> <span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnauthorized</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_unauthenticated'>unauthenticated</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
369
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnprocessableEntity</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
370
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_missing'>missing</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
371
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPRedirection</span> <span class='kw'>then</span> <span class='id identifier rubyid_handle_redirect'>handle_redirect</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
372
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ServerError</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
|
373
|
+
<span class='kw'>end</span>
|
|
374
|
+
<span class='kw'>end</span>
|
|
375
|
+
<span class='kw'>end</span></pre>
|
|
376
|
+
</td>
|
|
377
|
+
</tr>
|
|
378
|
+
</table>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
<div class="method_details ">
|
|
382
|
+
<h3 class="signature " id="perform_for_file-instance_method">
|
|
383
|
+
|
|
384
|
+
#<strong>perform_for_file</strong>(http_verb, url, file, filename, content_type, &block) ⇒ <tt>Object</tt>
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
</h3><table class="source_code">
|
|
391
|
+
<tr>
|
|
392
|
+
<td>
|
|
393
|
+
<pre class="lines">
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
115
|
|
397
|
+
116
|
|
398
|
+
117
|
|
399
|
+
118
|
|
400
|
+
119
|
|
401
|
+
120
|
|
402
|
+
121
|
|
403
|
+
122
|
|
404
|
+
123
|
|
405
|
+
124
|
|
406
|
+
125
|
|
407
|
+
126</pre>
|
|
408
|
+
</td>
|
|
409
|
+
<td>
|
|
410
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 115</span>
|
|
411
|
+
|
|
412
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_perform_for_file'>perform_for_file</span><span class='lparen'>(</span><span class='id identifier rubyid_http_verb'>http_verb</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
413
|
+
<span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
|
414
|
+
<span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_connection'>connection</span><span class='op'>|</span>
|
|
415
|
+
<span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_read_timeout'>read_timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_read_timeout'>read_timeout</span>
|
|
416
|
+
<span class='id identifier rubyid_file_headers'>file_headers</span> <span class='op'>=</span> <span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Content-Disposition</span><span class='tstring_end'>'</span></span><span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>form-data; filename=\"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_filename'>filename</span><span class='embexpr_end'>}</span><span class='tstring_content'>\"</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
|
417
|
+
<span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_http_verb'>http_verb</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_classify'>classify</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_request_uri'>request_uri</span><span class='comma'>,</span> <span class='id identifier rubyid_file_headers'>file_headers</span><span class='rparen'>)</span>
|
|
418
|
+
<span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_content_type'>content_type</span> <span class='op'>=</span> <span class='id identifier rubyid_content_type'>content_type</span>
|
|
419
|
+
<span class='comment'>#request.body = body.to_json
|
|
420
|
+
</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
|
|
421
|
+
<span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
422
|
+
<span class='kw'>end</span>
|
|
423
|
+
<span class='kw'>end</span></pre>
|
|
424
|
+
</td>
|
|
425
|
+
</tr>
|
|
426
|
+
</table>
|
|
427
|
+
</div>
|
|
428
|
+
|
|
429
|
+
<div class="method_details ">
|
|
430
|
+
<h3 class="signature " id="read-instance_method">
|
|
431
|
+
|
|
432
|
+
#<strong>read</strong>(url, handler) ⇒ <tt>Object</tt>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
</h3><table class="source_code">
|
|
439
|
+
<tr>
|
|
440
|
+
<td>
|
|
441
|
+
<pre class="lines">
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
38
|
|
445
|
+
39
|
|
446
|
+
40
|
|
447
|
+
41
|
|
448
|
+
42
|
|
449
|
+
43
|
|
450
|
+
44
|
|
451
|
+
45
|
|
452
|
+
46
|
|
453
|
+
47
|
|
454
|
+
48</pre>
|
|
455
|
+
</td>
|
|
456
|
+
<td>
|
|
457
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 38</span>
|
|
458
|
+
|
|
459
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
460
|
+
<span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
461
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_response'>response</span>
|
|
462
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
463
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnauthorized</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_unauthenticated'>unauthenticated</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
464
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_missing'>missing</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
465
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPRedirection</span> <span class='kw'>then</span> <span class='id identifier rubyid_handle_redirect'>handle_redirect</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
466
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ServerError</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
|
467
|
+
<span class='kw'>end</span>
|
|
468
|
+
<span class='kw'>end</span>
|
|
469
|
+
<span class='kw'>end</span></pre>
|
|
470
|
+
</td>
|
|
471
|
+
</tr>
|
|
472
|
+
</table>
|
|
473
|
+
</div>
|
|
474
|
+
|
|
475
|
+
<div class="method_details ">
|
|
476
|
+
<h3 class="signature " id="retrieve-instance_method">
|
|
477
|
+
|
|
478
|
+
#<strong>retrieve</strong>(url, handler, content_type) ⇒ <tt>Object</tt>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
</h3><table class="source_code">
|
|
485
|
+
<tr>
|
|
486
|
+
<td>
|
|
487
|
+
<pre class="lines">
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
26
|
|
491
|
+
27
|
|
492
|
+
28
|
|
493
|
+
29
|
|
494
|
+
30
|
|
495
|
+
31
|
|
496
|
+
32
|
|
497
|
+
33
|
|
498
|
+
34
|
|
499
|
+
35
|
|
500
|
+
36</pre>
|
|
501
|
+
</td>
|
|
502
|
+
<td>
|
|
503
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 26</span>
|
|
504
|
+
|
|
505
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_retrieve'>retrieve</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='comma'>,</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='rparen'>)</span>
|
|
506
|
+
<span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_content_type'>content_type</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
507
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_response'>response</span>
|
|
508
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span> <span class='kw'>then</span> <span class='id identifier rubyid_response'>response</span>
|
|
509
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnauthorized</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_unauthenticated'>unauthenticated</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
510
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_missing'>missing</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
511
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPRedirection</span> <span class='kw'>then</span> <span class='id identifier rubyid_handle_redirect'>handle_redirect</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
512
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ServerError</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
|
513
|
+
<span class='kw'>end</span>
|
|
514
|
+
<span class='kw'>end</span>
|
|
515
|
+
<span class='kw'>end</span></pre>
|
|
516
|
+
</td>
|
|
517
|
+
</tr>
|
|
518
|
+
</table>
|
|
519
|
+
</div>
|
|
520
|
+
|
|
521
|
+
<div class="method_details ">
|
|
522
|
+
<h3 class="signature " id="root-instance_method">
|
|
523
|
+
|
|
524
|
+
#<strong>root</strong>(handler) ⇒ <tt>Object</tt>
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
</h3><table class="source_code">
|
|
531
|
+
<tr>
|
|
532
|
+
<td>
|
|
533
|
+
<pre class="lines">
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
22
|
|
537
|
+
23
|
|
538
|
+
24</pre>
|
|
539
|
+
</td>
|
|
540
|
+
<td>
|
|
541
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 22</span>
|
|
542
|
+
|
|
543
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span><span class='lparen'>(</span><span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
544
|
+
<span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
545
|
+
<span class='kw'>end</span></pre>
|
|
546
|
+
</td>
|
|
547
|
+
</tr>
|
|
548
|
+
</table>
|
|
549
|
+
</div>
|
|
550
|
+
|
|
551
|
+
<div class="method_details ">
|
|
552
|
+
<h3 class="signature " id="update-instance_method">
|
|
553
|
+
|
|
554
|
+
#<strong>update</strong>(url, body, handler) ⇒ <tt>Object</tt>
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
</h3><table class="source_code">
|
|
561
|
+
<tr>
|
|
562
|
+
<td>
|
|
563
|
+
<pre class="lines">
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
78
|
|
567
|
+
79
|
|
568
|
+
80
|
|
569
|
+
81
|
|
570
|
+
82
|
|
571
|
+
83
|
|
572
|
+
84
|
|
573
|
+
85
|
|
574
|
+
86
|
|
575
|
+
87
|
|
576
|
+
88
|
|
577
|
+
89</pre>
|
|
578
|
+
</td>
|
|
579
|
+
<td>
|
|
580
|
+
<pre class="code"><span class="info file"># File 'lib/sequencescape-api/connection_factory/actions.rb', line 78</span>
|
|
581
|
+
|
|
582
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
583
|
+
<span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_jsonify'>jsonify</span><span class='lparen'>(</span><span class='id identifier rubyid_body'>body</span><span class='comma'>,</span> <span class='symbol'>:action</span> <span class='op'>=></span> <span class='symbol'>:update</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
584
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_response'>response</span>
|
|
585
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPSuccess</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_success'>success</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
586
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnauthorized</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_unauthenticated'>unauthenticated</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
587
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPUnprocessableEntity</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_failure'>failure</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
588
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPNotFound</span> <span class='kw'>then</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_missing'>missing</span><span class='lparen'>(</span><span class='id identifier rubyid_parse_json_from'>parse_json_from</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
589
|
+
<span class='kw'>when</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTPRedirection</span> <span class='kw'>then</span> <span class='id identifier rubyid_handle_redirect'>handle_redirect</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='comma'>,</span> <span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span>
|
|
590
|
+
<span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ServerError</span><span class='comma'>,</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
|
|
591
|
+
<span class='kw'>end</span>
|
|
592
|
+
<span class='kw'>end</span>
|
|
593
|
+
<span class='kw'>end</span></pre>
|
|
594
|
+
</td>
|
|
595
|
+
</tr>
|
|
596
|
+
</table>
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
</div>
|
|
602
|
+
|
|
603
|
+
<div id="footer">
|
|
604
|
+
Generated on Wed Nov 16 16:31:16 2016 by
|
|
605
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
606
|
+
0.9.5 (ruby-2.3.0).
|
|
607
|
+
</div>
|
|
608
|
+
|
|
609
|
+
</div>
|
|
610
|
+
</body>
|
|
611
|
+
</html>
|