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.
- data/lib/rhoconnect/configuration.rb +3 -3
- data/lib/rhoconnect/version.rb +1 -1
- metadata +3 -3
@@ -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 =
|
37
|
-
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
|
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
|
data/lib/rhoconnect/version.rb
CHANGED
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rhomobile
|