cf-uaac 3.1.0 → 3.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f975b934d93193d3d23935f98683510bff81a468
4
- data.tar.gz: 7b1b63c9a22b67fed10faa292668623ef960dcae
3
+ metadata.gz: 64982208297b2c5c6b478824f007631011d1a26e
4
+ data.tar.gz: 0aa3fa6c54177df5b7b17232e0cd3b115cec2de5
5
5
  SHA512:
6
- metadata.gz: 4b2d1575c80cfb76cf72d151fc0765a327bbae04c4e617fe434732873b74055b285df2810aa9150df636e30a333aa29a0adf8edf17d2ced159793a2c62a27492
7
- data.tar.gz: 0f4901450bff3c9b06d6e559376aa0dd8aeb54b8819f81670edbfa71aa4cb29d5e308d806dbfea0c3d0c392f6a039f69fa91b26f35ab4554d2cfb3be1cbc345e
6
+ metadata.gz: 1994cb541eb259496a099e1c1db15aa178944c4cb239e3dcd4bd6dbb82dc8959a6da3dc41269472b51ccec458a55757d48f99271059fba22c8b1f615d9ea016f
7
+ data.tar.gz: 7ad4f1a0be225c088e0364a1084640dce2c73b2cd65a4ab81593965a14b02bb67c48a268d0d01338bb50695be9be5aece04d23f511f9e9c5b64cd97c23de7921
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # CloudFoundry UAA Command Line Client
2
2
 
3
3
  [![Build Status](https://travis-ci.org/cloudfoundry/cf-uaac.svg?branch=master)](https://travis-ci.org/cloudfoundry/cf-uaac)
4
+ [![Gem Version](https://badge.fury.io/rb/cf-uaac.png)](https://rubygems.org/gems/cf-uaac)
4
5
 
5
6
  ## Build the gem
6
7
 
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_development_dependency "simplecov", "~> 0.8.2"
40
40
  s.add_development_dependency "simplecov-rcov", "~> 0.2.3"
41
41
  s.add_development_dependency "ci_reporter", "~> 1.9.2"
42
- s.add_runtime_dependency "cf-uaa-lib", "~> 3.1.0"
42
+ s.add_runtime_dependency "cf-uaa-lib", "~> 3.2.2"
43
43
  s.add_runtime_dependency "highline", "~> 1.6.21"
44
44
  s.add_runtime_dependency "eventmachine", "~> 1.0.3"
45
45
  s.add_runtime_dependency "launchy", "~> 2.4.2"
@@ -84,7 +84,7 @@ module CF::UAA
84
84
  end
85
85
 
86
86
  say "RESPONSE BODY:"
87
- if response['Content-Type'].include?('application/json')
87
+ if !response['Content-Type'].nil? && response['Content-Type'].include?('application/json')
88
88
  parsed = JSON.parse(response.body)
89
89
  formatted = JSON.pretty_generate(parsed)
90
90
  say formatted
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- CLI_VERSION = "3.1.0"
17
+ CLI_VERSION = "3.1.1"
18
18
  end
19
19
  end
@@ -117,6 +117,11 @@ class Reply
117
117
  @body = "<html><body>#{info}</body></html>"
118
118
  nil
119
119
  end
120
+ def empty()
121
+ @status = 204
122
+ @body = ''
123
+ nil
124
+ end
120
125
  def set_cookie(name, value, options = {})
121
126
  @cookies << options.each_with_object("#{name}=#{value}") { |(k, v), o|
122
127
  o << (v.nil? ? "; #{k}" : "; #{k}=#{v}")
@@ -74,6 +74,11 @@ class StubUAAConn < Stub::Base
74
74
  reply_in_kind(202, parsed.merge(:updated => 42))
75
75
  end
76
76
 
77
+ route :put, '/fake-endpoint-empty-response' do
78
+ return unless valid_token("clients.read")
79
+ reply.empty()
80
+ end
81
+
77
82
  route :get, '/my-fake-endpoint' do
78
83
  return unless valid_token("clients.read")
79
84
  reply_in_kind(200, "some fake response text")
@@ -64,6 +64,16 @@ module CF::UAA
64
64
  Cli.output.string.should include "\"updated\": 42"
65
65
  end
66
66
 
67
+ it "handles 204 No Content response when Content-Type is missing" do
68
+ pending "Test not applicable in integration test runs" if ENV["UAA_CLIENT_TARGET"]
69
+ Cli.run("curl -X PUT /fake-endpoint-empty-response")
70
+
71
+ Cli.output.string.should include "PUT #{@target}/fake-endpoint-empty-response"
72
+ Cli.output.string.should include "204 NO CONTENT"
73
+ Cli.output.string.should include "RESPONSE BODY:"
74
+ Cli.output.string.should_not include "error"
75
+ end
76
+
67
77
  it "uses headers passed from the command line" do
68
78
  pending "Test not applicable in integration test runs" if ENV["UAA_CLIENT_TARGET"]
69
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-uaac
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Syer
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-08-26 00:00:00.000000000 Z
15
+ date: 2015-07-02 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -104,14 +104,14 @@ dependencies:
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: 3.1.0
107
+ version: 3.2.2
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: 3.1.0
114
+ version: 3.2.2
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: highline
117
117
  requirement: !ruby/object:Gem::Requirement
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  version: '0'
277
277
  requirements: []
278
278
  rubyforge_project: cf-uaac
279
- rubygems_version: 2.2.2
279
+ rubygems_version: 2.2.3
280
280
  signing_key:
281
281
  specification_version: 4
282
282
  summary: Command line interface for CloudFoundry UAA