rhoconnect-rb 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,15 +33,15 @@ module Rhoconnect
33
33
  self.configuration = Configuration.new
34
34
  yield(configuration)
35
35
  # make a call to rhoconnect instance to set app url
36
- endpoint_url = self.configuration.app_endpoint || ENV['APP_ENDPOINT']
37
- uri = self.configuration.uri || ENV['URI']
36
+ endpoint_url = ENV['APP_ENDPOINT'] || self.configuration.app_endpoint
37
+ uri = ENV['URI'] || self.configuration.uri
38
38
  if uri
39
39
  uri = URI.parse(uri)
40
40
  token = uri.user
41
41
  uri.user = nil
42
42
  uri = uri.to_s
43
43
  end
44
- token ||= ENV['token'] || self.configuration.token
44
+ token ||= ENV['token'] || self.configuration.token
45
45
  Rhoconnect::Client.set_app_endpoint(uri + "/api/source/save_adapter?attributes[adapter_url]=#{endpoint_url}&api_token=#{token}") if endpoint_url && uri && token
46
46
  end
47
47
  end
@@ -1,3 +1,3 @@
1
1
  module Rhoconnect
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhoconnect-rb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rhomobile