razor-client 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  Razor
2
2
 
3
- Copyright 2013 Puppet Labs Inc
3
+ Copyright 2013, 2014 Puppet Labs Inc
4
4
 
5
5
  Licensed under the Apache License, Version 2.0 (the "License");
6
6
  you may not use this file except in compliance with the License.
data/bin/razor CHANGED
@@ -23,6 +23,8 @@ begin
23
23
  parse = Razor::CLI::Parse.new(ARGV)
24
24
  rescue Razor::CLI::InvalidURIError => e
25
25
  die e.message
26
+ rescue OptionParser::InvalidOption => e
27
+ die e.message + "\nTry 'razor --help' for more information"
26
28
  end
27
29
 
28
30
  if parse.show_help?
@@ -34,7 +36,7 @@ begin
34
36
  document = parse.navigate.get_document
35
37
  url = parse.navigate.last_url
36
38
  puts "From #{url}:\n\n#{format_document document}\n\n"
37
- rescue Razor::CLI::NavigationError => e
39
+ rescue Razor::CLI::Error => e
38
40
  die "#{e}\n#{parse.help}\n\n"
39
41
  rescue SocketError, Errno::ECONNREFUSED => e
40
42
  puts "Error: Could not connect to the server at #{parse.api_url}"
@@ -53,7 +53,18 @@ module Razor::CLI
53
53
  # @todo lutter 2013-08-16: None of this has any tests, and error
54
54
  # handling is heinous at best
55
55
  cmd, body = extract_command
56
- json_post(cmd["id"], body)
56
+ if body.empty?
57
+ raise Razor::CLI::Error,
58
+ "No arguments for command (did you forget --json ?)"
59
+ end
60
+ # Ensure that we copy authentication data from our previous URL.
61
+ url = cmd["id"]
62
+ if @doc_url
63
+ url = URI.parse(url.to_s)
64
+ url.userinfo = @doc_url.userinfo
65
+ end
66
+
67
+ json_post(url, body)
57
68
  else
58
69
  raise NavigationError.new(@doc_url, @segments, @doc)
59
70
  end
@@ -64,11 +75,22 @@ module Razor::CLI
64
75
  body = {}
65
76
  until @segments.empty?
66
77
  if @segments.shift =~ /\A--([a-z-]+)(=(\S+))?\Z/
67
- body[$1] = convert_arg(cmd["name"], $1, ($3 || @segments.shift))
78
+ arg, value = [$1, $3]
79
+ value = @segments.shift if value.nil? && @segments[0] !~ /^--/
80
+ body[arg] = convert_arg(cmd["name"], arg, value)
68
81
  end
69
82
  end
70
83
 
71
- body = MultiJson::load(File::read(body["json"])) if body["json"]
84
+ begin
85
+ body = MultiJson::load(File::read(body["json"])) if body["json"]
86
+ rescue MultiJson::LoadError
87
+ raise Razor::CLI::Error, "File #{body["json"]} is not valid JSON"
88
+ rescue Errno::ENOENT
89
+ raise Razor::CLI::Error, "File #{body["json"]} not found"
90
+ rescue Errno::EACCES
91
+ raise Razor::CLI::Error,
92
+ "Permission to read file #{body["json"]} denied"
93
+ end
72
94
  [cmd, body]
73
95
  end
74
96
 
@@ -83,12 +105,18 @@ module Razor::CLI
83
105
  raise NavigationError.new(@doc_url, key, @doc) unless obj
84
106
 
85
107
  if obj.is_a?(Hash) && obj["id"]
86
- @doc = json_get(obj["id"])
108
+ url = obj["id"]
109
+ if @doc_url
110
+ url = URI.parse(url.to_s)
111
+ url.userinfo = @doc_url.userinfo
112
+ end
113
+
114
+ @doc = json_get(url)
87
115
  # strip the wrapper around collections
88
116
  if @doc.is_a? Hash and @doc["items"].is_a? Array
89
117
  @doc = @doc["items"]
90
118
  end
91
- @doc_url = obj["id"]
119
+ @doc_url = url
92
120
  elsif obj.is_a? Hash
93
121
  @doc = obj
94
122
  else
@@ -98,7 +126,7 @@ module Razor::CLI
98
126
 
99
127
  def get(url, headers={})
100
128
  response = RestClient.get url.to_s, headers
101
- puts "GET #{url.to_s}\n#{response.body}" if @parse.dump_response?
129
+ print "GET #{url.to_s}\n#{response.body}\n\n" if @parse.dump_response?
102
130
  response
103
131
  end
104
132
 
@@ -112,8 +140,14 @@ module Razor::CLI
112
140
 
113
141
  def json_post(url, body)
114
142
  headers = { :accept=>:json, "Content-Type" => :json }
115
- response = RestClient.post url, MultiJson::dump(body), headers
116
- puts "POST #{url.to_s}\n#{body}\n-->\n#{response.body}" if @parse.dump_response?
143
+ begin
144
+ response = RestClient.post url.to_s, MultiJson::dump(body), headers
145
+ ensure
146
+ if @parse.dump_response?
147
+ print "POST #{url.to_s}\n#{body}\n-->\n"
148
+ puts (response ? response.body : "ERROR")
149
+ end
150
+ end
117
151
  MultiJson::load(response.body)
118
152
  end
119
153
 
@@ -130,7 +164,14 @@ module Razor::CLI
130
164
 
131
165
  def convert_arg(cmd_name, arg_name, value)
132
166
  value = nil if value == "null"
133
- self.class.arg_type(cmd_name, arg_name) == "json" ? MultiJson::load(value) : value
167
+ case self.class.arg_type(cmd_name, arg_name)
168
+ when "json"
169
+ MultiJson::load(value)
170
+ when "boolean"
171
+ ["true", nil].include?(value)
172
+ else
173
+ value
174
+ end
134
175
  end
135
176
  end
136
177
  end
@@ -4,11 +4,25 @@
4
4
  # API. Ultimately, this should be something the server provides. But until
5
5
  # we better understand what sort of annotation we need from the server,
6
6
  # we'll keep this with the client.
7
-
7
+ #
8
+ # Possible argument types are
9
+ # - json: parse the argument value as a JSON document and use that
10
+ # - boolean: if the argument has no value associated with it, or the value
11
+ # is "true", convert to +true+; everything else gets converted
12
+ # to +false+
8
13
  commands:
14
+ create-broker:
15
+ args:
16
+ configuration: json
9
17
  create-tag:
10
18
  args:
11
19
  rule: json
20
+ add-policy-tag:
21
+ args:
22
+ rule: json
12
23
  update-tag-rule:
13
24
  args:
14
25
  rule: json
26
+ reboot-node:
27
+ args:
28
+ hard: boolean
@@ -9,7 +9,6 @@ module Razor::CLI
9
9
  def get_optparse
10
10
  @optparse ||= OptionParser.new do |opts|
11
11
  opts.banner = "Usage: razor [FLAGS] NAVIGATION\n"
12
- " or: razor shell"
13
12
 
14
13
  opts.on "-d", "--dump", "Dumps API output to the screen" do
15
14
  @dump = true
@@ -39,8 +38,10 @@ module Razor::CLI
39
38
  def help
40
39
  output = get_optparse.to_s
41
40
  begin
42
- output << list_things("collections", navigate.collections)
43
- output << list_things("commands", navigate.commands)
41
+ output << list_things("Collections", navigate.collections)
42
+ output << "\n\n Navigate to entries of a collection using COLLECTION NAME, for example,\n 'nodes node15' for the details of a node or 'nodes node15 log' to see\n the log for node15\n"
43
+ output << list_things("Commands", navigate.commands)
44
+ output << "\n\n Pass arguments to commands either directly by name ('--name=NAME')\n or save the JSON body for the command in a file and pass it with\n '--json FILE'. Using --json is the only way to pass arguments in\n nested structures such as the configuration for a broker.\n"
44
45
  rescue
45
46
  output << "\nCould not connect to the server at #{@api_url}. More help is available after "
46
47
  output << "pointing\nthe client to a Razor server"
data/razor-client.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "razor-client"
7
- spec.version = "0.13.0"
7
+ spec.version = "0.14.0"
8
8
  spec.authors = ["Puppet Labs"]
9
9
  spec.email = ["info@puppetlabs.com"]
10
10
  spec.description = "The client for the Razor server"
@@ -34,8 +34,19 @@ describe Razor::CLI::Navigate do
34
34
  it {expect{nav.get_document}.to raise_error Razor::CLI::NavigationError}
35
35
  end
36
36
 
37
- describe "extract_command" do
38
- it "should understand --arg=value"
39
- it "should understand '--arg value'"
37
+ context "with authentication", :vcr do
38
+ AuthArg = %w[-u http://fred:dead@localhost:8080/api].freeze
39
+
40
+ it "should supply that to the API service" do
41
+ nav = Razor::CLI::Parse.new(AuthArg).navigate
42
+ nav.get_document.should be_an_instance_of Hash
43
+ URI.parse(nav.last_url.to_s).userinfo.should == "fred:dead"
44
+ end
45
+
46
+ it "should preserve that across navigation" do
47
+ nav = Razor::CLI::Parse.new(AuthArg + ['tags']).navigate
48
+ nav.get_document.should == []
49
+ URI.parse(nav.last_url.to_s).userinfo.should == "fred:dead"
50
+ end
40
51
  end
41
52
  end
@@ -29,14 +29,14 @@ describe Razor::CLI::Parse do
29
29
  it {parse("-d").dump_response?.should be true}
30
30
  end
31
31
 
32
- context "with a '-U'" do
32
+ context "with a '-u'" do
33
33
  it "should use the given URL" do
34
34
  url = 'http://razor.example.com:2150/path/to/api'
35
- parse('-U',url).api_url.to_s.should == url
35
+ parse('-u',url).api_url.to_s.should == url
36
36
  end
37
37
 
38
38
  it "should terminate with an error if an invalid URL is provided" do
39
- expect{parse('-U','not valid url')}.to raise_error(Razor::CLI::InvalidURIError)
39
+ expect{parse('-u','not valid url')}.to raise_error(Razor::CLI::InvalidURIError)
40
40
  end
41
41
  end
42
42
 
@@ -47,11 +47,11 @@ describe Razor::CLI::Parse do
47
47
  parse.api_url.to_s.should == url
48
48
  end
49
49
 
50
- it "should use -U before ENV" do
50
+ it "should use -u before ENV" do
51
51
  env_url = 'http://razor.example.com:2150/env/path/to/api'
52
52
  url = 'http://razor.example.com:2150/path/to/api'
53
53
  ENV["RAZOR_API"] = env_url
54
- parse('-U',url).api_url.to_s.should == url
54
+ parse('-u',url).api_url.to_s.should == url
55
55
  end
56
56
 
57
57
  it "should terminate with an error if an invalid URL is provided" do
@@ -0,0 +1,102 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8080/api/collections/tags
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Content-Type-Options:
24
+ - nosniff
25
+ Content-Type:
26
+ - application/json;charset=utf-8
27
+ Content-Length:
28
+ - '73'
29
+ Date:
30
+ - Wed, 29 Jan 2014 21:06:11 GMT
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags","items":[]}'
34
+ http_version:
35
+ recorded_at: Wed, 29 Jan 2014 21:06:11 GMT
36
+ - request:
37
+ method: get
38
+ uri: http://fred:dead@localhost:8080/api
39
+ body:
40
+ encoding: US-ASCII
41
+ string: ''
42
+ headers:
43
+ Accept:
44
+ - application/json
45
+ Accept-Encoding:
46
+ - gzip, deflate
47
+ User-Agent:
48
+ - Ruby
49
+ response:
50
+ status:
51
+ code: 200
52
+ message: OK
53
+ headers:
54
+ Server:
55
+ - Apache-Coyote/1.1
56
+ X-Content-Type-Options:
57
+ - nosniff
58
+ Content-Type:
59
+ - application/json;charset=utf-8
60
+ Content-Length:
61
+ - '4491'
62
+ Date:
63
+ - Wed, 29 Jan 2014 21:14:20 GMT
64
+ body:
65
+ encoding: US-ASCII
66
+ string: ! '{"commands":[{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"}]}'
67
+ http_version:
68
+ recorded_at: Wed, 29 Jan 2014 21:14:20 GMT
69
+ - request:
70
+ method: get
71
+ uri: http://fred:dead@localhost:8080/api/collections/tags
72
+ body:
73
+ encoding: US-ASCII
74
+ string: ''
75
+ headers:
76
+ Accept:
77
+ - application/json
78
+ Accept-Encoding:
79
+ - gzip, deflate
80
+ User-Agent:
81
+ - Ruby
82
+ response:
83
+ status:
84
+ code: 200
85
+ message: OK
86
+ headers:
87
+ Server:
88
+ - Apache-Coyote/1.1
89
+ X-Content-Type-Options:
90
+ - nosniff
91
+ Content-Type:
92
+ - application/json;charset=utf-8
93
+ Content-Length:
94
+ - '73'
95
+ Date:
96
+ - Wed, 29 Jan 2014 21:14:20 GMT
97
+ body:
98
+ encoding: US-ASCII
99
+ string: ! '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags","items":[]}'
100
+ http_version:
101
+ recorded_at: Wed, 29 Jan 2014 21:14:21 GMT
102
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,36 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://fred:dead@localhost:8080/api
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache-Coyote/1.1
23
+ X-Content-Type-Options:
24
+ - nosniff
25
+ Content-Type:
26
+ - application/json;charset=utf-8
27
+ Content-Length:
28
+ - '4491'
29
+ Date:
30
+ - Wed, 29 Jan 2014 21:06:11 GMT
31
+ body:
32
+ encoding: US-ASCII
33
+ string: ! '{"commands":[{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"}]}'
34
+ http_version:
35
+ recorded_at: Wed, 29 Jan 2014 21:06:11 GMT
36
+ recorded_with: VCR 2.5.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: razor-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-22 00:00:00.000000000 Z
12
+ date: 2014-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mime-types
@@ -134,6 +134,8 @@ files:
134
134
  - spec/cli/parse_spec.rb
135
135
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_a_single_item_path/.yml
136
136
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_an_invalid_path/.yml
137
+ - spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml
138
+ - spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml
137
139
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_no_path/.yml
138
140
  - spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/.yml
139
141
  - spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml
@@ -169,6 +171,8 @@ test_files:
169
171
  - spec/cli/parse_spec.rb
170
172
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_a_single_item_path/.yml
171
173
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_an_invalid_path/.yml
174
+ - spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml
175
+ - spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml
172
176
  - spec/fixtures/vcr/Razor_CLI_Navigate/with_no_path/.yml
173
177
  - spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/.yml
174
178
  - spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml