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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0cb6df7f08aa6f28deb61db78bbe516ecb1e6b69
4
- data.tar.gz: 6cf5ccf3a8615e0dc14dad2d4be8c1701c55c092
2
+ SHA256:
3
+ metadata.gz: 2c9a64b119a2dbd5c8337f1a4c9d8524cb145c16e0e15796ccb131170872ab47
4
+ data.tar.gz: 02e5f441dfe055079ed8474fc04c542439fbd6f214e34d5767f740b1bfcad038
5
5
  SHA512:
6
- metadata.gz: c3039b22d3902c1ac33d07f2afa80bb425543171a1eccd985b8d1b415f8933e30f3ec216e1963537c36b52add90ab577f44379ab205256a6d776eec96bc48e05
7
- data.tar.gz: 3810af05f1754c429cec7df47dd28ea3edc7622d0b98e982468f3f532cfa45469090c9de0242abfba88efe306a15e28d40671d5d3f1878140ee5c8f3f5043264
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
- username: options.db_username,
32
- password: options.db_password,
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
- username: options.db_username,
32
- password: options.db_password
31
+ db_username: options.db_username,
32
+ db_password: options.db_password
33
33
  )
34
34
  end
35
35
 
@@ -28,8 +28,8 @@ module Crowbar
28
28
 
29
29
  def args_with_options
30
30
  args.easy_merge!(
31
- username: options.db_username,
32
- password: options.db_password,
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
@@ -34,7 +34,7 @@ module Crowbar
34
34
  name: attrs.node,
35
35
  network: attrs.network,
36
36
  range: attrs.range,
37
- suggestion: attrs.suggest
37
+ suggestion: attrs.suggestion
38
38
  )
39
39
  end
40
40
 
@@ -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
@@ -34,7 +34,7 @@ module Crowbar
34
34
  name: attrs.service,
35
35
  network: attrs.network,
36
36
  range: attrs.range,
37
- suggestion: attrs.suggest
37
+ suggestion: attrs.suggestion
38
38
  )
39
39
  end
40
40
 
@@ -33,7 +33,7 @@ module Crowbar
33
33
  #
34
34
  # Patch version
35
35
  #
36
- PATCH = 0
36
+ PATCH = 1
37
37
 
38
38
  #
39
39
  # Optional suffix
@@ -29,7 +29,7 @@ describe "Crowbar::Client::Request::HostIP::Allocate" do
29
29
  node: "",
30
30
  network: "",
31
31
  range: "",
32
- suggest: "",
32
+ suggestion: "",
33
33
  proposal: "default"
34
34
  }
35
35
  end
@@ -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
- pending
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
@@ -29,7 +29,7 @@ describe "Crowbar::Client::Request::VirtualIP::Allocate" do
29
29
  service: "",
30
30
  network: "",
31
31
  range: "",
32
- suggest: "",
32
+ suggestion: "",
33
33
  proposal: "default"
34
34
  }
35
35
  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.0
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-10-13 00:00:00.000000000 Z
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.6.14
624
+ rubygems_version: 2.7.3
625
625
  signing_key:
626
626
  specification_version: 4
627
627
  summary: Crowbar commandline client