pe-razor-client 0.15.2 → 0.15.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/razor/cli/navigate.rb +7 -0
- data/lib/razor/cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc13d92ec1a319b44a570e3818e5213ce680f1cd
|
4
|
+
data.tar.gz: fe2e2ad76e1576137a2f1d5fd99fd2739f4726fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6abc24982e8c7c4217a62c604ec5a742f6681d0faa81a4b42cef9ee4e8e2dd7c1aa82d578fc3d1e03c2397b7ecc483953ded7f34d6134114ddbb782b34882c6e
|
7
|
+
data.tar.gz: 35a58ff1d7fac87331bfc5c921aa57fd5a9c8bd69244af62d385ca60fff10b761c96d98c7f3b9bf8d59c9f3ab8816de0ad46b0f796ebe8af695c871b757ff868
|
data/lib/razor/cli/navigate.rb
CHANGED
@@ -12,6 +12,7 @@ module Razor::CLI
|
|
12
12
|
@segments = segments||[]
|
13
13
|
@doc = entrypoint
|
14
14
|
@doc_url = parse.api_url
|
15
|
+
@userinfo = parse.api_url.userinfo
|
15
16
|
end
|
16
17
|
|
17
18
|
def last_url
|
@@ -186,12 +187,16 @@ module Razor::CLI
|
|
186
187
|
end
|
187
188
|
|
188
189
|
def get(url, headers={})
|
190
|
+
url = URI.parse(url.to_s)
|
191
|
+
url.userinfo = @userinfo
|
189
192
|
response = RestClient.get url.to_s, headers
|
190
193
|
print "GET #{url.to_s}\n#{response.body}\n\n" if @parse.dump_response?
|
191
194
|
response
|
192
195
|
end
|
193
196
|
|
194
197
|
def json_get(url, headers = {})
|
198
|
+
url = URI.parse(url.to_s)
|
199
|
+
url.userinfo = @userinfo
|
195
200
|
response = get(url,headers.merge(:accept => :json))
|
196
201
|
unless response.headers[:content_type] =~ /application\/json/
|
197
202
|
raise "Received content type #{response.headers[:content_type]}"
|
@@ -200,6 +205,8 @@ module Razor::CLI
|
|
200
205
|
end
|
201
206
|
|
202
207
|
def json_post(url, body)
|
208
|
+
url = URI.parse(url.to_s)
|
209
|
+
url.userinfo = @userinfo
|
203
210
|
headers = { :accept=>:json, "Content-Type" => :json }
|
204
211
|
begin
|
205
212
|
response = RestClient.post url.to_s, MultiJson::dump(body), headers
|
data/lib/razor/cli/version.rb
CHANGED
@@ -18,7 +18,7 @@ module Razor
|
|
18
18
|
#
|
19
19
|
# The next line is the one that our packaging tools modify, so please make
|
20
20
|
# sure that any change to it is discussed and agreed first.
|
21
|
-
version =
|
21
|
+
version = "DEVELOPMENT"
|
22
22
|
|
23
23
|
if version == "DEVELOPMENT"
|
24
24
|
root = File.expand_path("../../..", File.dirname(__FILE__))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pe-razor-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.2
|
4
|
+
version: 0.15.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.0.
|
143
|
+
rubygems_version: 2.0.14
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Razor is an advanced provisioning application
|