occi-api 4.3.1 → 4.3.2

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: 60f141c28fb0f5f43599d5d6787fa671a498cc27
4
- data.tar.gz: c96268b68de1c1eee4efce68c168089d846d6d11
3
+ metadata.gz: 04565e23e7e47439f4b835dbdf574dd2a8fb9745
4
+ data.tar.gz: 377f670ffdae197276a7ea3feb1894bfad184868
5
5
  SHA512:
6
- metadata.gz: 229b33eff53318cd8814d35ab47451142d8a24b530b59f65053fad6293d19045a92aa6b2d3eaaa668ed2f0c0aaa323baf2fc45630675a63709e56c3ba2e45eaa
7
- data.tar.gz: 7b6a872941e7b101609f9adedc5c6d5dc7d9c8cddf8d9b3a9424bbce5c37da7e62dc88d424b9988c719a962ba2693da55ab6ecdb57168c0d642410cfe581707c
6
+ metadata.gz: 8d1ec06ab28e2583f83a1ab6e3ec481ada11473970475fed1cd96f9968849f5d5c65ef725962e1db9d38e8617b5cfa5ca7901c498334782ff243afb9983ed9e9
7
+ data.tar.gz: 6d13444e919da595cd14731ea04303525849c95cf7e9d5f95e0a80d2a274b5d7455344b92435be3d6cf77d9569c68b0e0cd94de27228abade63d3530f0d2431e
@@ -38,6 +38,7 @@ module Occi::Api::Client
38
38
  # normalize URIs, remove trailing slashes
39
39
  endpoint = URI(endpoint)
40
40
  endpoint.path = endpoint.path.gsub(/\/+/, '/').chomp('/')
41
+ endpoint.query = nil
41
42
 
42
43
  endpoint
43
44
  end
@@ -76,4 +77,4 @@ module Occi::Api::Client
76
77
  end
77
78
 
78
79
  end
79
- end
80
+ end
@@ -47,11 +47,13 @@ module Occi::Api::Client
47
47
 
48
48
  # set a global base URI for all subsequent requests
49
49
  # must be done after authN calls
50
- self.class.base_uri @endpoint.to_s
50
+ endpoint_base_uri = "#{@endpoint.scheme}://#{@endpoint.host}"
51
+ endpoint_base_uri << ":#{@endpoint.port}" unless @endpoint.port == @endpoint.default_port
52
+ self.class.base_uri endpoint_base_uri
51
53
 
52
54
  # get model information from the endpoint
53
55
  # and create Occi::Model instance
54
- model_collection = get('/-/')
56
+ model_collection = get("#{@endpoint.path}/-/")
55
57
  @model = get_model(model_collection)
56
58
 
57
59
  # auto-connect?
@@ -1,5 +1,5 @@
1
1
  module Occi
2
2
  module Api
3
- VERSION = "4.3.1" unless defined?(::Occi::Api::VERSION)
3
+ VERSION = "4.3.2" unless defined?(::Occi::Api::VERSION)
4
4
  end
5
5
  end
@@ -9,6 +9,11 @@ module Occi
9
9
  vcr_options = { :record => :none }
10
10
  describe ClientHttp, :vcr => vcr_options do
11
11
 
12
+ context "endpoint handling" do
13
+ it "removes query string from endpoint"
14
+ it "correctly handles endpoint with path"
15
+ end
16
+
12
17
  context "using media type text/plain" do
13
18
 
14
19
  before(:each) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occi-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Feldhaus
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-10-13 00:00:00.000000000 Z
13
+ date: 2015-06-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: occi-core
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  requirements: []
236
236
  rubyforge_project:
237
- rubygems_version: 2.2.2
237
+ rubygems_version: 2.4.4
238
238
  signing_key:
239
239
  specification_version: 4
240
240
  summary: OCCI development library providing a high-level client API