cassette 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e63f18eabd5f87a8976aa3c8ae3e6d2aa1a32391
4
- data.tar.gz: 5661be8783e0490ac42e48d5185cedc807cfffd7
3
+ metadata.gz: 0e9da653330f2b19a49cd4710abfc4ab68f38dac
4
+ data.tar.gz: 97863b30cdbfdc0455b1296bd893eef92d505f9a
5
5
  SHA512:
6
- metadata.gz: 2df0891132dfc91b40c9df0ef32bfe6392382cef824f96686c6c4e6577ead9f8371066e5c22b9383621e881bcfef92a5a1a5b07c5cb45d9e28a2d8277edb1a1a
7
- data.tar.gz: 14ce3c294dece8fb5db1322b77421d173fb1e8548aaaaae952fe3807a8d8d40a937477ca190ca5c51bbf51cfe4a5703f11a36a7d8eb96802b20caf16475caf0a
6
+ metadata.gz: e6ef4f0b1a396d3de5e01f404a156717fc0f1db0738874e1bcb5bbf74a6a67f6fd791706834730217d6c7118e13a1b63cb42b3331636d1260d386afb746d0b33
7
+ data.tar.gz: fc589953459901c2539d126cf09944caf2a7898b4a402ac83aa5894a428384d59103948eee935277193837a3d297c6c37da537792108bf47ba5a32fdcc8d9800
@@ -31,7 +31,7 @@ module Cassette
31
31
  begin
32
32
  logger.info("Validating #{ticket} on #{validate_path}")
33
33
 
34
- response = http.post(validate_path, ticket: ticket, service: service).body
34
+ response = http.get(validate_path, ticket: ticket, service: service).body
35
35
  ticket_response = Http::TicketResponse.new(response)
36
36
 
37
37
  logger.info("Validation resut: #{response.inspect}")
@@ -17,6 +17,13 @@ module Cassette
17
17
  end
18
18
  end
19
19
 
20
+ def get(path, payload, timeout = DEFAULT_TIMEOUT)
21
+ perform(:get, path) do |req|
22
+ req.params = payload
23
+ req.options.timeout = timeout
24
+ end
25
+ end
26
+
20
27
  private
21
28
 
22
29
  attr_accessor :config
@@ -2,7 +2,7 @@ module Cassette
2
2
  class Version
3
3
  MAJOR = '1'
4
4
  MINOR = '1'
5
- PATCH = '4'
5
+ PATCH = '5'
6
6
 
7
7
  def self.version
8
8
  [MAJOR, MINOR, PATCH].join('.')
@@ -45,13 +45,13 @@ describe Cassette::Authentication do
45
45
  end
46
46
 
47
47
  it 'raises a Forbidden exception on any exceptions' do
48
- allow(http).to receive(:post).with(anything, anything).and_raise(Cassette::Errors::BadRequest)
48
+ allow(http).to receive(:get).with(anything, anything).and_raise(Cassette::Errors::BadRequest)
49
49
  expect { subject.ticket_user('ticket') }.to raise_error(Cassette::Errors::Forbidden)
50
50
  end
51
51
 
52
52
  context 'with a failed CAS response' do
53
53
  before do
54
- allow(http).to receive(:post).with(anything, anything)
54
+ allow(http).to receive(:get).with(anything, anything)
55
55
  .and_return(OpenStruct.new(body: fixture('cas/fail.xml')))
56
56
  end
57
57
 
@@ -62,7 +62,7 @@ describe Cassette::Authentication do
62
62
 
63
63
  context 'with a successful CAS response' do
64
64
  before do
65
- allow(http).to receive(:post).with(anything, anything)
65
+ allow(http).to receive(:get).with(anything, anything)
66
66
  .and_return(OpenStruct.new(body: fixture('cas/success.xml')))
67
67
  end
68
68
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassette
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Hermida Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-03 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -291,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  version: '0'
292
292
  requirements: []
293
293
  rubyforge_project:
294
- rubygems_version: 2.5.1
294
+ rubygems_version: 2.5.2
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: Generates, validates and caches TGTs and STs