stash-client 0.0.3 → 0.0.4

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: 37e95a0035c83fa208ad29032a5a89448105af50
4
- data.tar.gz: f2b6a7bcddd9ad5b9c37d76bc51e8375df4f2ee1
3
+ metadata.gz: 8e5139e54592ba641445e59d063b0236f8787185
4
+ data.tar.gz: 8acb8c89024e388efc81cdc569e5b58cd563af93
5
5
  SHA512:
6
- metadata.gz: b9a6f28745f60193f0e1030a80cbef7f35af602d502d0ff43387f04b2edb130e9e05a036f3f32077e7a36ad77ef16eb87e3af035d3b9aced05fe8dacddbb83df
7
- data.tar.gz: f25294fa009ad9ae9bb6063a0e6fd27d3912d1ef8d3b5e1f06386df5e987dfa6a3289d6b3fa4b0cfffb66cffbd81c4841d5c0fbd39dbd985c6b44f1f56ba1d79
6
+ metadata.gz: d3c2303a1ca1429cd78be1ac6efa2c3500f4cf48bbd97b0deb5fc49a9623b0ce2d99b899b2a66e4ce94a85cdbfda11d4bcf9e184294aba3e349631924080c6bf
7
+ data.tar.gz: 73ff0a0b9604a7ea2b39db680fd5c30899c3be4df816e334c7019573f3a1c55f435d5a0b03b1deaccf44875e10ab272b200fbd6731aedac647eb32a88caf9e43
@@ -1,5 +1,5 @@
1
1
  module Stash
2
2
  class Client
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
data/lib/stash/client.rb CHANGED
@@ -9,7 +9,9 @@ module Stash
9
9
  attr_reader :url
10
10
 
11
11
  def initialize(opts = {})
12
- if opts[:host]
12
+ if opts[:host] && opts[:scheme]
13
+ @url = Addressable::URI.parse(opts[:scheme] + '://' + opts[:host] + '/rest/api/1.0/')
14
+ elsif opts[:host]
13
15
  @url = Addressable::URI.parse('http://' + opts[:host] + '/rest/api/1.0/')
14
16
  elsif opts[:url]
15
17
  @url = Addressable::URI.parse(opts[:url])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken