duracloud-client 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a80c928604f4871e81e40df21497f669d57dce14
4
- data.tar.gz: bb0f71e139c0fff9e5634a56c205106daed5a0d5
3
+ metadata.gz: e4ecca7b686316d42167a375acad7de84fd8265e
4
+ data.tar.gz: 2dcf12852efa3373af9c26140f0b09f93270a7d3
5
5
  SHA512:
6
- metadata.gz: 39311c8c6a74b5100779f0f32e3aa0b08c8c27d406492d3b4a3cf477736b75b8b8a9028a5935b9b6724f3922284bd4972ee4247a5f394cc7e8a58295e9b1cfb3
7
- data.tar.gz: 266f141ab9f3d0d87759411ba76d63816498ea4980354eb6e9824cc89ac9c93fa802a7edb132bcf5b6535c90fff96d0a1f0ba76e528233f210eda0d6bb9fab43
6
+ metadata.gz: eb132b96fd0f5664a60d150640c3bf271e1dd994b1167245a6008e2ec84a730baa381c4c408115e1a4679125c7c59baac7063750f172214b7d62b1ec37636a53
7
+ data.tar.gz: baba50af951e1c79aae3fd1bc9981112443ebee392b222568531155b9ef87be0252e87eafb97b4a008fd6f86621824a580b103e5ab929d8ec8b0ee318a228e24
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = ">= 2.2"
22
22
 
23
+ spec.add_dependency "addressable", "~> 2.5"
23
24
  spec.add_dependency "hashie", "~> 3.4"
24
25
  spec.add_dependency "httpclient", "~> 2.7"
25
26
  spec.add_dependency "activemodel", ">= 4.2", "< 6"
@@ -1,3 +1,5 @@
1
+ require 'addressable/uri'
2
+
1
3
  module Duracloud
2
4
  class Request
3
5
  attr_reader :client, :url, :http_method, :body, :headers, :query
@@ -12,7 +14,7 @@ module Duracloud
12
14
  def initialize(client, http_method, url, **options)
13
15
  @client = client
14
16
  @http_method = http_method
15
- @url = url
17
+ @url = Addressable::URI.parse(url).normalize.to_s
16
18
  set_options(options.dup)
17
19
  end
18
20
 
@@ -130,8 +130,7 @@ module Duracloud
130
130
  end
131
131
 
132
132
  def durastore_content(http_method, space_id, content_id, **options, &block)
133
- escaped_content_id = content_id.gsub(/%/, "%25").gsub(/ /, "%20")
134
- url = [ space_id, escaped_content_id ].join("/")
133
+ url = [ space_id, content_id.gsub(/%/, "%25") ].join("/")
135
134
  durastore(http_method, url, **options, &block)
136
135
  end
137
136
 
@@ -1,3 +1,3 @@
1
1
  module Duracloud
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duracloud-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chandek-Stark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: addressable
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.5'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: hashie
15
29
  requirement: !ruby/object:Gem::Requirement