crowbar-client 3.5.0 → 3.5.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 +5 -5
- data/CHANGELOG.md +7 -0
- data/lib/crowbar/client/command/database/connect.rb +2 -2
- data/lib/crowbar/client/command/database/create.rb +2 -2
- data/lib/crowbar/client/command/database/test.rb +2 -2
- data/lib/crowbar/client/request/host_ip/allocate.rb +1 -1
- data/lib/crowbar/client/request/rest.rb +2 -2
- data/lib/crowbar/client/request/virtual_ip/allocate.rb +1 -1
- data/lib/crowbar/client/version.rb +1 -1
- data/spec/crowbar/client/request/host_ip/allocate_spec.rb +1 -1
- data/spec/crowbar/client/request/rest_spec.rb +53 -1
- data/spec/crowbar/client/request/virtual_ip/allocate_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c9a64b119a2dbd5c8337f1a4c9d8524cb145c16e0e15796ccb131170872ab47
|
4
|
+
data.tar.gz: 02e5f441dfe055079ed8474fc04c542439fbd6f214e34d5767f740b1bfcad038
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a838722e1824b05d66fca1fb0f3e99c56161fa50c87f7ec00e4116d90cb08f941f00731ff7275ea467450fa44cbf534cbd2688eb6fec08745c9f060086b15b01
|
7
|
+
data.tar.gz: e9526302bc214792ea285193bd4971b5f9775b05f84131be7f201bba0030b0c554bdb41836ea9f06fd8149d024ed69011f401e8d1cdb7e5c392bd5ea3fbfc6f7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.5.1](https://github.com/crowbar/crowbar-client/releases/tag/v3.5.1) - 2017-12-05
|
4
|
+
|
5
|
+
* BUGFIX
|
6
|
+
* Escape reserved characters in credentials
|
7
|
+
* Fix for custom user and password for database subcommand
|
8
|
+
* Fix IP allocation subcommand (bsc#1069792)
|
9
|
+
|
3
10
|
## [3.5.0](https://github.com/crowbar/crowbar-client/releases/tag/v3.5.0) - 2017-10-13
|
4
11
|
|
5
12
|
* ENHANCEMENT
|
@@ -28,8 +28,8 @@ module Crowbar
|
|
28
28
|
|
29
29
|
def args_with_options
|
30
30
|
args.easy_merge!(
|
31
|
-
|
32
|
-
|
31
|
+
db_username: options.db_username,
|
32
|
+
db_password: options.db_password,
|
33
33
|
database: options.database,
|
34
34
|
host: options.host,
|
35
35
|
port: options.port
|
@@ -28,8 +28,8 @@ module Crowbar
|
|
28
28
|
|
29
29
|
def args_with_options
|
30
30
|
args.easy_merge!(
|
31
|
-
|
32
|
-
|
31
|
+
db_username: options.db_username,
|
32
|
+
db_password: options.db_password,
|
33
33
|
database: options.database,
|
34
34
|
host: options.host,
|
35
35
|
port: options.port
|
@@ -35,8 +35,8 @@ module Crowbar
|
|
35
35
|
"/",
|
36
36
|
url
|
37
37
|
].join(""),
|
38
|
-
user: user,
|
39
|
-
password: password,
|
38
|
+
user: URI::DEFAULT_PARSER.escape(user, URI::PATTERN::RESERVED),
|
39
|
+
password: URI::DEFAULT_PARSER.escape(password, URI::PATTERN::RESERVED),
|
40
40
|
auth_type: auth_type,
|
41
41
|
verify_ssl: verify_ssl,
|
42
42
|
timeout: Config.timeout
|
@@ -19,6 +19,58 @@ require_relative "../../../spec_helper"
|
|
19
19
|
describe "Crowbar::Client::Request::Rest" do
|
20
20
|
subject { ::Crowbar::Client::Request::Rest }
|
21
21
|
|
22
|
-
|
22
|
+
context "with default parameters" do
|
23
|
+
before do
|
24
|
+
allow(Crowbar::Client::Config).to receive("server") { "testserver1" }
|
25
|
+
allow(Crowbar::Client::Config).to receive("username") { "testuser1" }
|
26
|
+
allow(Crowbar::Client::Config).to receive("password") { "testpassword1" }
|
27
|
+
allow(Crowbar::Client::Config).to receive("verify_ssl") { true }
|
28
|
+
end
|
29
|
+
|
30
|
+
let!(:instance) do
|
31
|
+
subject.new
|
32
|
+
end
|
33
|
+
|
34
|
+
it "uses root URL from global config" do
|
35
|
+
expect(instance.url).to(eq("testserver1/"))
|
36
|
+
end
|
37
|
+
|
38
|
+
it "uses user from global config" do
|
39
|
+
expect(instance.user).to(eq("testuser1"))
|
40
|
+
end
|
41
|
+
|
42
|
+
it "uses password from global config" do
|
43
|
+
expect(instance.password).to(eq("testpassword1"))
|
44
|
+
end
|
45
|
+
|
46
|
+
it "uses verify_ssl from global config" do
|
47
|
+
expect(instance.options[:verify_ssl]).to(eq(true))
|
48
|
+
end
|
49
|
+
|
50
|
+
it "uses digest auth_type" do
|
51
|
+
expect(instance.options[:auth_type]).to(eq(:digest))
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
context "with username/password including reserved characters" do
|
56
|
+
let!(:instance) do
|
57
|
+
subject.new(
|
58
|
+
user: "testuser;/?:@&=+$,[]",
|
59
|
+
password: "testpassword;/?:@&=+$,[]"
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "escapes the username" do
|
64
|
+
expect(instance.user).to(
|
65
|
+
eq("testuser%3B%2F%3F%3A%40%26%3D%2B%24%2C%5B%5D")
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
it "escapes the password" do
|
70
|
+
expect(instance.password).to(
|
71
|
+
eq("testpassword%3B%2F%3F%3A%40%26%3D%2B%24%2C%5B%5D")
|
72
|
+
)
|
73
|
+
end
|
74
|
+
end
|
23
75
|
|
24
76
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowbar-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Boerger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -621,7 +621,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
621
621
|
version: '0'
|
622
622
|
requirements: []
|
623
623
|
rubyforge_project:
|
624
|
-
rubygems_version: 2.
|
624
|
+
rubygems_version: 2.7.3
|
625
625
|
signing_key:
|
626
626
|
specification_version: 4
|
627
627
|
summary: Crowbar commandline client
|