scooter 4.5.0 → 4.5.2

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
  SHA256:
3
- metadata.gz: f71907b52f6d00c4a5c3922bad60f2c1bea0a39556959f9ce678bdbdfdcdd63f
4
- data.tar.gz: '07956a1b0006f9c680f8e54ff80f77d2d1fcad5359af6304e50d9ba4f19a7cd8'
3
+ metadata.gz: d28d921bb29a43c1a54b237177b9f614c934cf312449dace635c97fe315018aa
4
+ data.tar.gz: dea1e7ed4177988ad032d1bed17f277eef7b3e724d1064e8fbf8248fd63e764b
5
5
  SHA512:
6
- metadata.gz: ea079fd367c468e76f8cfd84503c912a63727a0c6877aa86d0cd7fea239a3687b78f2dcaf369b81a8ea830b3e8ef34fd30534c539cf2fe9cff1748cb79e381ab
7
- data.tar.gz: 45d3dc393431935218e795bd83b4df78c075c0e801a25ae9763a4886f0128a963735e92a940c23d20ed268d6bd1d9ad08aa61d3d882565863673a59047f4eddf
6
+ metadata.gz: 92c27de1b5fd63ce3bd588332e5befa893b4d15f854bec459e5097ac22d6d857a60899bd46a3e3856541d5d66d4644d993deb6113b93dc92f6eb19bb9f24812b
7
+ data.tar.gz: 6147ef6db76ecc15f3063d6c07368978388f111f2a06d927120e35a26cf2dc888b05b968c3cc4b4d4730a81d1e948a01731843db0756a8bcc51cd03f2e7c074d
data/README.md CHANGED
@@ -32,7 +32,7 @@ Scooter is currently divvied into the following sections:
32
32
  ## Running the tests
33
33
 
34
34
  ```
35
- bundle exec rake spec
35
+ bundle exec rake test
36
36
  ```
37
37
 
38
38
  ## Versioning
@@ -88,8 +88,15 @@ module Scooter
88
88
  end
89
89
 
90
90
  def signin(login=self.credentials.login, password=self.credentials.password)
91
+ response = @connection.get "/auth/login" do |request|
92
+ connection.port = 443
93
+ end
94
+ return response if response.status != 200
95
+ # extract the session cookie, if it is present
96
+ cookie = response.headers['Set-Cookie']
91
97
  response = @connection.post "/auth/login" do |request|
92
98
  request.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
99
+ request.headers['Cookie'] = cookie if cookie
93
100
  request.body = "username=#{login}&password=#{CGI.escape(password)}"
94
101
  connection.port = 443
95
102
  end
@@ -27,7 +27,7 @@ module Scooter
27
27
  display_name = options['display_name'] || RandomString.generate(8)
28
28
  login = options['login'] || RandomString.generate(16)
29
29
  role_ids = options['role_ids'] || []
30
- password = options['password'] || 'Puppet11'
30
+ password = options['password'] || 'Puppetlabs-1'
31
31
 
32
32
  user_hash = { 'email' => email,
33
33
  'display_name' => display_name,
@@ -1,5 +1,5 @@
1
1
  module Scooter
2
2
  module Version
3
- STRING = '4.5.0'
3
+ STRING = '4.5.2'
4
4
  end
5
5
  end
@@ -28,6 +28,12 @@ module Scooter
28
28
 
29
29
  context '"signin with a page that returns a token' do
30
30
  before do
31
+ stub_request(:get, /auth\/login/).
32
+ to_return(status: 200,
33
+ body: '',
34
+ headers: {
35
+ "set-cookie"=>"__HOST-somecookie=something;Secure;Path=/",
36
+ })
31
37
  stub_request(:post, /auth\/login/).
32
38
  to_return(status: 200,
33
39
  body: '',
@@ -35,7 +41,7 @@ module Scooter
35
41
  "date"=>"Tue, 29 Nov 2016 22:05:41 GMT",
36
42
  "content-length"=>"0",
37
43
  "connection"=>"close",
38
- "set-cookie"=>"JSESSIONID=b05e9b11-5e9f-4d6a-9faf-e28a0415197d; Path=/; Secure; HttpOnly, rememberMe=deleteMe; Path=/auth; Max-Age=0; Expires=Mon, 28-Nov-2016 22:05:41 GMT, pl_ssti=0CeHhpz5PPLna7kpaEMcTHjJ62z9eizHTzsxEXNK8W20;Secure;Path=/",
44
+ "set-cookie"=>"__HOST-pl_ssti=0CeHhpz5PPLna7kpaEMcTHjJ62z9eizHTzsxEXNK8W20;Secure;Path=/",
39
45
  "location"=>"/",
40
46
  "x-frame-options"=>"DENY"})
41
47
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scooter
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler