cassette 1.2.5 → 1.5.0

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: c9ed73a897ba8ecc5a7f0133132d28388b9f4a90bc2d0e8a1fe3d1ec21f9b4b3
4
- data.tar.gz: bdbe2968131cbddb9527ba973d68aaff7f5008be1b4fe6f662a26c7f5468edd1
3
+ metadata.gz: dbf74773ca3132052c30b12568d80197650617c7b0827bf9730f6e44b285f5be
4
+ data.tar.gz: eae14505d3b5162bd9efdf59d5fa34a1e2098dd50bd37cea2d7eb889ef6bbabb
5
5
  SHA512:
6
- metadata.gz: 259b435580d9ebe186553374624dcab25e84d33b392ea00997dbc1729b0fd1fada1b1e5de3bf129aca440146c9bf5b94544525d7868c54b11509cbfc54b0e9b5
7
- data.tar.gz: 02fc9b53c0a2e873b0dde28d2757e1d23f59b62d949ace7f789466c1e37f874477d9d4489d03c2e48536bf25016eef2da358e9dbe4dcb5e99943f7dd56ac94be
6
+ metadata.gz: dc876e60912940ee6045c5fd616c85f726a9c1b418ee84da59ce718c1b689c3655a498b48f9d937276072ff5dc2294199d70cd96a92eaca62da444c58f1af611
7
+ data.tar.gz: 36294ee7a9618555e4be9b8d3dc822e98123620223da593a4bb9d1249e40bc89adae80625e3052e7c41d9cee720220c80b2a5bc30addad0f6f3538c2e4416ab0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Cassette::Client
2
2
 
3
- [![Build Status](https://travis-ci.org/locaweb/cassette.svg)](https://travis-ci.org/locaweb/cassette)
3
+ [![Build Status](https://travis-ci.org/locaweb/cassette.svg)](https://travis-ci.org/locaweb/cassette)
4
4
 
5
5
  [![Test Coverage](https://codeclimate.com/github/locaweb/cassette/badges/coverage.svg)](https://codeclimate.com/github/locaweb/cassette/coverage)
6
6
 
@@ -25,10 +25,18 @@ $ bundle
25
25
  Require this library and create an intializer to set its configuration:
26
26
 
27
27
  ```ruby
28
- Cassette.config = config
28
+ Cassete.config = OpenStruct.new(
29
+ username: 'user',
30
+ password: 'secret',
31
+ service: 'test-api.example.org',
32
+ base: 'https://some-cas.example.org',
33
+ base_authority: 'CASTEST',
34
+ verify_ssl: true, # If not defined, the default value will be: false.
35
+ tls_version: 'TLSv1_2' # if not defined, the default value will be: 'TLSv1'.
36
+ )
29
37
  ```
30
38
 
31
- where config is an object that responds to the methods `base` for the base CAS uri, `username` and `password` if you are authenticating on other systems and `service` and `base_authority` if you are using the authentication filter to authenticate your app.
39
+ where config is an OpenStruct that responds to the methods `base` for the base CAS uri, `username` and `password` if you are authenticating on other systems and `service` and `base_authority` if you are using the authentication filter to authenticate your app.
32
40
 
33
41
  You may also set the caching backend using the .backend= module method:
34
42
 
@@ -14,6 +14,7 @@ require 'cassette/authentication/filter'
14
14
  require 'faraday'
15
15
  require 'forwardable'
16
16
  require 'logger'
17
+ require 'ostruct'
17
18
 
18
19
  module Cassette
19
20
  extend Forwardable
@@ -21,7 +22,9 @@ module Cassette
21
22
 
22
23
  attr_writer :config, :logger
23
24
 
24
- DEFAULT_TIMEOUT = 10
25
+ DEFAULT_TIMEOUT = 10
26
+ DEFAULT_TLS_VERSION = 'TLSv1_2'.freeze
27
+ DEFAULT_VERIFY_SSL = false
25
28
 
26
29
  def logger
27
30
  @logger ||= begin
@@ -34,7 +37,29 @@ module Cassette
34
37
  end
35
38
 
36
39
  def config
37
- @config if defined?(@config)
40
+ @config = OpenStruct.new unless defined?(@config)
41
+
42
+ @config.tls_version = DEFAULT_TLS_VERSION if @config.tls_version.nil?
43
+
44
+ @config.verify_ssl = DEFAULT_VERIFY_SSL if @config.verify_ssl.nil?
45
+
46
+ @config
47
+ end
48
+
49
+ def cache_backend
50
+ @cache_backend ||= begin
51
+ if defined?(::Rails) && ::Rails.cache
52
+ ::Rails.cache
53
+ elsif defined?(::ActiveSupport::Cache::MemoryStore)
54
+ ActiveSupport::Cache::MemoryStore.new
55
+ else
56
+ Cache::NullStore.new
57
+ end
58
+ end
59
+ end
60
+
61
+ def self.cache_backend=(cache_backend)
62
+ @cache_backend = cache_backend
38
63
  end
39
64
 
40
65
  def_delegators Http::Request, :post
@@ -8,28 +8,6 @@ end
8
8
 
9
9
  module Cassette
10
10
  module Cache
11
- def self.backend
12
- @backend ||= begin
13
- if defined?(::Rails) && ::Rails.cache
14
- ::Rails.cache
15
- elsif defined?(::ActiveSupport::Cache::MemoryStore)
16
- ActiveSupport::Cache::MemoryStore.new
17
- else
18
- NullStore.new
19
- end
20
- end
21
- end
22
-
23
- def self.backend=(backend)
24
- @backend = backend
25
- end
26
-
27
- def backend
28
- @backend ||= Cassette::Cache.backend
29
- end
30
-
31
- attr_writer :backend
32
-
33
11
  def uses_key(key)
34
12
  "uses:#{key}"
35
13
  end
@@ -50,5 +28,17 @@ module Cassette
50
28
 
51
29
  backend.fetch(key, options, &block)
52
30
  end
31
+
32
+ def backend
33
+ Cassette.cache_backend
34
+ end
35
+
36
+ def backend=(backend)
37
+ Cassette.cache_backend = backend
38
+ end
39
+
40
+ def self.backend=(backend)
41
+ ::Cassette.cache_backend = backend
42
+ end
53
43
  end
54
44
  end
@@ -1,5 +1,3 @@
1
- # encoding: UTF-8
2
-
3
1
  module Cassette
4
2
  class Client
5
3
  def self.method_missing(name, *args)
@@ -20,12 +18,16 @@ module Cassette
20
18
 
21
19
  def tgt(usr, pwd, force = false)
22
20
  logger.info 'Requesting TGT'
23
- cache.fetch_tgt(force: force) do
24
- response = http.post(tickets_path, username: usr, password: pwd)
25
- tgt = Regexp.last_match(1) if response.headers['Location'] =~ /tickets\/(.*)/
26
- logger.info "TGT is #{tgt}"
27
- tgt
21
+ cached = true
22
+
23
+ tgt = cache.fetch_tgt(force: force) do
24
+ cached = false
25
+ request_new_tgt(usr, pwd)
28
26
  end
27
+
28
+ logger.info("TGT cache hit, value: '#{tgt}'") if cached
29
+
30
+ tgt
29
31
  end
30
32
 
31
33
  def st(tgt_param, service, force = false)
@@ -49,7 +51,7 @@ module Cassette
49
51
  attr_accessor :cache, :logger, :http, :config
50
52
 
51
53
  def st_with_retry(user, pass, service, retrying = false)
52
- st(->{ tgt(user, pass, retrying) }, service)
54
+ st(-> { tgt(user, pass, retrying) }, service)
53
55
  rescue Cassette::Errors::NotFound => e
54
56
  raise e if retrying
55
57
 
@@ -59,7 +61,14 @@ module Cassette
59
61
  end
60
62
 
61
63
  def tickets_path
62
- "/v1/tickets"
64
+ '/v1/tickets'
65
+ end
66
+
67
+ def request_new_tgt(usr, pwd)
68
+ response = http.post(tickets_path, username: usr, password: pwd)
69
+ tgt = Regexp.last_match(1) if response.headers['Location'] =~ %r{tickets/(.*)}
70
+ logger.info "TGT is #{tgt}"
71
+ tgt
63
72
  end
64
73
  end
65
74
  end
@@ -16,7 +16,7 @@ module Cassette
16
16
  def fetch_tgt(options = {}, &_block)
17
17
  options = { expires_in: 4 * 3600, max_uses: 5000, force: false }.merge(options)
18
18
  fetch('Cassette::Client.tgt', options) do
19
- logger.info 'TGT is not cached'
19
+ logger.info('TGT cache miss')
20
20
  yield
21
21
  end
22
22
  end
@@ -36,7 +36,8 @@ module Cassette
36
36
  end
37
37
 
38
38
  def request
39
- @request ||= Faraday.new(url: config.base, ssl: { verify: false, version: 'TLSv1' }) do |conn|
39
+ @request ||= Faraday.new(url: config.base, ssl:
40
+ { verify: config.verify_ssl, version: config.tls_version }) do |conn|
40
41
  conn.adapter Faraday.default_adapter
41
42
  end
42
43
  end
@@ -1,8 +1,8 @@
1
1
  module Cassette
2
2
  class Version
3
- MAJOR = '1'
4
- MINOR = '2'
5
- PATCH = '5'
3
+ MAJOR = '1'.freeze
4
+ MINOR = '5'.freeze
5
+ PATCH = '0'.freeze
6
6
 
7
7
  def self.version
8
8
  [MAJOR, MINOR, PATCH].join('.')
@@ -65,8 +65,9 @@ describe Cassette::Authentication::Authorities do
65
65
  end
66
66
 
67
67
  context 'with authentication disabled' do
68
- before { ENV['NOAUTH'] = 'true' }
69
- after { ENV.delete('NOAUTH') }
68
+ before do
69
+ stub_const('ENV', ENV.to_hash.merge('NOAUTH' => 'true'))
70
+ end
70
71
  subject { Cassette::Authentication::Authorities.new('[]') }
71
72
 
72
73
  it '#has_role? returns true for every role' do
@@ -40,5 +40,21 @@ describe Cassette::Authentication::Cache do
40
40
  it { expect(call_with_other_service).to eq(2) }
41
41
  end
42
42
  end
43
+
44
+ it 'uses the cache store set in configuration' do
45
+ # setup
46
+ global_cache = double('cache_store')
47
+ Cassette.cache_backend = global_cache
48
+
49
+ logger = Logger.new('/dev/null')
50
+
51
+ # exercise
52
+ auth_cache = described_class.new(logger)
53
+
54
+ expect(auth_cache.backend).to eq(global_cache)
55
+
56
+ # tear down
57
+ Cassette.cache_backend = nil
58
+ end
43
59
  end
44
60
  end
@@ -7,11 +7,7 @@ describe Cassette::Authentication::Filter do
7
7
 
8
8
  shared_context 'with NOAUTH' do
9
9
  before do
10
- ENV['NOAUTH'] = 'yes'
11
- end
12
-
13
- after do
14
- ENV.delete('NOAUTH')
10
+ stub_const('ENV', ENV.to_hash.merge('NOAUTH' => 'true'))
15
11
  end
16
12
  end
17
13
 
@@ -5,62 +5,31 @@ describe Cassette::Cache do
5
5
  cached()
6
6
  end
7
7
 
8
- after do
9
- described_class.instance_variable_set(:@backend, nil)
10
- end
8
+ describe '#backend' do
9
+ it 'returns the global cache' do
10
+ # setup
11
+ global_cache = double('cache_store')
12
+ Cassette.cache_backend = global_cache
11
13
 
12
- describe '.backend' do
13
- it 'defaults to rails backend' do
14
- rails = double('Rails')
15
- cache = double('cache_backend')
16
- allow(rails).to receive(:cache).and_return(cache)
17
- stub_const('Rails', rails)
14
+ # exercise and verify
15
+ expect(subject.backend).to eql(global_cache)
18
16
 
19
- expect(described_class.backend).to eql(cache)
17
+ # tear down
18
+ Cassette.cache_backend = nil
20
19
  end
21
20
  end
22
21
 
23
22
  describe '.backend=' do
24
- it 'provides a default backend for new instances' do
25
- backend = double('backend')
26
- expect(subject.backend).not_to eq(backend)
27
-
28
- described_class.backend = backend
29
-
30
- new_instance = cached()
31
- expect(new_instance.backend).to eq(backend)
32
- expect(new_instance.backend).not_to eq(subject.backend)
33
- end
34
-
35
- it 'sets the default backend' do
36
- backend = double('backend')
37
- expect(described_class.backend).not_to eq(backend)
38
-
39
- described_class.backend = backend
40
-
41
- expect(described_class.backend).to eq(backend)
42
- end
43
- end
44
-
45
- describe '#backend' do
46
- before { subject.backend = nil }
47
- after { subject.backend = nil }
48
-
49
- it 'sets the backend' do
50
- backend = double('Backend')
51
-
52
- subject.backend = backend
53
-
54
- expect(subject.backend).to eql(backend)
55
- end
23
+ it 'sets the cache' do
24
+ # setup
25
+ global_cache = double('cache_store')
26
+ described_class.backend = global_cache
56
27
 
57
- it 'defaults to rails backend' do
58
- rails = double('Rails')
59
- cache = double('cache_backend')
60
- allow(rails).to receive(:cache).and_return(cache)
61
- stub_const('Rails', rails)
28
+ # exercise and verify
29
+ expect(subject.backend).to eql(global_cache)
62
30
 
63
- expect(subject.backend).to eql(cache)
31
+ # tear down
32
+ Cassette.cache_backend = nil
64
33
  end
65
34
  end
66
35
 
@@ -3,5 +3,37 @@
3
3
 
4
4
 
5
5
  describe Cassette::Client::Cache do
6
- pending
6
+ it 'uses the cache store set in configuration' do
7
+ # setup
8
+ global_cache = double('cache_store')
9
+ Cassette.cache_backend = global_cache
10
+
11
+ logger = Logger.new('/dev/null')
12
+
13
+ # exercise
14
+ client_cache = described_class.new(logger)
15
+
16
+ expect(client_cache.backend).to eq(global_cache)
17
+
18
+ # tear down
19
+ Cassette.cache_backend = nil
20
+ end
21
+
22
+ describe '.backend=' do
23
+ it 'sets the cache' do
24
+ # setup
25
+ global_cache = double('cache_store')
26
+ logger = Logger.new('/dev/null')
27
+
28
+ # exercise
29
+ Cassette::Client.cache.backend = global_cache
30
+
31
+ # verify
32
+ client_cache = described_class.new(logger)
33
+ expect(client_cache.backend).to eql(global_cache)
34
+
35
+ # tear down
36
+ Cassette.cache_backend = nil
37
+ end
38
+ end
7
39
  end
@@ -63,50 +63,87 @@ describe Cassette::Client do
63
63
  end
64
64
 
65
65
  context 'when tgt is not cached' do
66
- let(:tgt) { 'TGT-Something-example' }
67
- let(:force) { false }
66
+ after do
67
+ Cassette.logger = Logger.new('/dev/null')
68
+ end
68
69
 
69
- before do
70
- allow(cache).to receive(:fetch_tgt) do |opts, &_block|
71
- expect(opts[:force]).to eq false
72
- tgt
73
- end
70
+ it 'returns the tgt and logs correctly' do
71
+ Cassette::Client.cache.backend.clear
74
72
 
75
- allow(http).to receive(:post)
76
- end
73
+ tgt = 'TGT-Something-example'
74
+ response = double('response', headers: {'Location' => "tickets/#{tgt}"})
75
+ allow(http).to receive(:post).and_return(response)
76
+
77
+ logger = spy(:logger)
78
+ Cassette.logger = logger
77
79
 
78
- it { is_expected.to eq tgt }
80
+ client = Cassette::Client.new(http_client: http)
81
+
82
+ # exercise
83
+ result = client.tgt('user', 'pass')
84
+
85
+ # verify
86
+ expect(result).to eq(tgt)
87
+ expect(logger).to have_received(:info).with("TGT cache miss").ordered
88
+ expect(logger).to have_received(:info).with("TGT is #{tgt}").ordered
89
+ end
79
90
  end
80
91
 
81
92
  context 'with a cached tgt' do
82
- let(:tgt) { 'TGT-Something-example' }
93
+ after do
94
+ Cassette.logger = Logger.new('/dev/null')
95
+ end
83
96
 
84
- before do
85
- allow(cache).to receive(:fetch_tgt).with(hash_including(force: force))
86
- .and_return(tgt)
97
+ it 'returns the tgt from the cache and logs correctly' do
98
+ Cassette::Client.cache.backend.clear
87
99
 
88
- allow(http).to receive(:post)
89
- end
100
+ tgt = 'TGT-Something-example'
101
+ response = double('response', headers: {'Location' => "tickets/#{tgt}"})
102
+ allow(http).to receive(:post).and_return(response)
90
103
 
91
- shared_context 'force control' do
92
- it { is_expected.to eq tgt }
104
+ # this first call is to set the cache
105
+ client = Cassette::Client.new(http_client: http)
106
+ result = client.tgt('user', 'pass')
93
107
 
94
- it 'forwards force to the cache' do
95
- subject
96
- expect(cache).to have_received(:fetch_tgt).with(hash_including(force: force))
97
- end
98
- end
108
+ logger = spy(:logger)
109
+ Cassette.logger = logger
110
+ client = Cassette::Client.new(http_client: http)
99
111
 
100
- context 'and no force' do
101
- let(:force) { false }
112
+ # exercise
113
+ result = client.tgt('user', 'pass')
102
114
 
103
- include_context 'force control'
115
+ # verify
116
+ expect(result).to eq(tgt)
117
+ expect(logger).to have_received(:info).with("TGT cache hit, value: '#{tgt}'")
104
118
  end
105
119
 
106
- context 'and using the force' do
107
- let(:force) { true }
120
+ it 'generates another tgt when the param force is true' do
121
+ Cassette::Client.cache.backend.clear
122
+
123
+ tgt = 'TGT-Something-example'
124
+ response = double('response', headers: {'Location' => "tickets/#{tgt}"})
125
+ allow(http).to receive(:post).and_return(response)
126
+
127
+ # this first call is to set the cache
128
+ client = Cassette::Client.new(http_client: http)
129
+ result = client.tgt('user', 'pass')
130
+
131
+ tgt2 = 'TGT2-Something-example'
132
+ response = double('response', headers: {'Location' => "tickets/#{tgt2}"})
133
+ allow(http).to receive(:post).and_return(response)
134
+
135
+ logger = spy(:logger)
136
+ Cassette.logger = logger
137
+ client = Cassette::Client.new(http_client: http)
138
+
139
+ # exercise
140
+ force = true
141
+ result = client.tgt('user', 'pass', force)
108
142
 
109
- include_context 'force control'
143
+ # verify
144
+ expect(result).to eq(tgt2)
145
+ expect(logger).to have_received(:info).with("TGT cache miss").ordered
146
+ expect(logger).to have_received(:info).with("TGT is #{tgt2}").ordered
110
147
  end
111
148
  end
112
149
  end
@@ -7,6 +7,78 @@ describe Cassette do
7
7
  Cassette.logger = original_logger
8
8
  end
9
9
 
10
+ describe '.config' do
11
+ it 'defines Cassette initial configuration based on a OpenStruct' do
12
+
13
+ config = OpenStruct.new(
14
+ YAML.load_file('spec/config.yml')
15
+ )
16
+
17
+ Cassette.config = config
18
+
19
+ expect(Cassette.config)
20
+ .to eq(config)
21
+ end
22
+
23
+ context 'when tls_version was not specified' do
24
+ it 'uses default TLS version: TLSv1_2' do
25
+ config = OpenStruct.new(
26
+ YAML.load_file('spec/config.yml')
27
+ )
28
+
29
+ # Removing tls_version field
30
+ config.delete_field(:tls_version)
31
+
32
+ Cassette.config = config
33
+
34
+ expect(Cassette.config.tls_version)
35
+ .to eq('TLSv1_2')
36
+ end
37
+ end
38
+
39
+ context 'when tls_version is specified' do
40
+ it 'uses this version' do
41
+ config = OpenStruct.new(
42
+ YAML.load_file('spec/config.yml')
43
+ )
44
+
45
+ Cassette.config = config
46
+
47
+ expect(Cassette.config.tls_version)
48
+ .to eq('TLSv1_2')
49
+ end
50
+ end
51
+
52
+ context 'when verify_ssl was not specified' do
53
+ it 'uses default verify_ssl value: false' do
54
+ config = OpenStruct.new(
55
+ YAML.load_file('spec/config.yml')
56
+ )
57
+
58
+ # Removing verify_ssl field
59
+ config.delete_field(:verify_ssl)
60
+
61
+ Cassette.config = config
62
+
63
+ expect(Cassette.config.verify_ssl)
64
+ .to be false
65
+ end
66
+ end
67
+
68
+ context 'when verify_ssl is specified' do
69
+ it 'uses this value' do
70
+ config = OpenStruct.new(
71
+ YAML.load_file('spec/config.yml')
72
+ )
73
+
74
+ Cassette.config = config
75
+
76
+ expect(Cassette.config.verify_ssl)
77
+ .to be true
78
+ end
79
+ end
80
+ end
81
+
10
82
  describe '.logger' do
11
83
  it 'returns a default instance' do
12
84
  expect(Cassette.logger).not_to be_nil
@@ -33,4 +105,57 @@ describe Cassette do
33
105
  end
34
106
  end
35
107
  end
108
+
109
+ describe '.cache_backend' do
110
+ context 'when the cache_backend is already set' do
111
+ it 'returns the cache_backend set' do
112
+ new_cache = double('cache_backend')
113
+ described_class.cache_backend = new_cache
114
+
115
+ # exercise and verify
116
+ expect(described_class.cache_backend).to eq(new_cache)
117
+
118
+ # tear down
119
+ described_class.cache_backend = nil
120
+ end
121
+ end
122
+
123
+ context 'when the cache_backend is not set' do
124
+ it 'returns Rails.cache if set' do
125
+ described_class.cache_backend = nil
126
+ rails_cache = double('cache')
127
+ rails = double('Rails')
128
+ allow(rails).to receive(:cache).and_return(rails_cache)
129
+ stub_const('Rails', rails)
130
+
131
+ # exercise and verify
132
+ expect(described_class.cache_backend).to eq(rails_cache)
133
+
134
+ # tear down
135
+ described_class.cache_backend = nil
136
+ end
137
+
138
+ it 'returns MemoryStore if Rails.cache not set' do
139
+ described_class.cache_backend = nil
140
+
141
+ # exercise and verify
142
+ expect(described_class.cache_backend).to be_a(ActiveSupport::Cache::MemoryStore)
143
+
144
+ # tear down
145
+ described_class.cache_backend = nil
146
+ end
147
+
148
+ it 'returns NullStore if Rails.cache and MemoryStore are not set' do
149
+ described_class.cache_backend = nil
150
+ hide_const('ActiveSupport::Cache::MemoryStore')
151
+ require 'cassette/cache/null_store'
152
+
153
+ # exercise and verify
154
+ expect(described_class.cache_backend).to be_a(Cassette::Cache::NullStore)
155
+
156
+ # tear down
157
+ described_class.cache_backend = nil
158
+ end
159
+ end
160
+ end
36
161
  end
@@ -1,5 +1,7 @@
1
- username: "user"
2
- password: "secret"
3
- service: "test-api.example.org"
4
- base: "https://some-cas.example.org"
5
- base_authority: "CASTEST"
1
+ username: 'user'
2
+ password: 'secret'
3
+ service: 'test-api.example.org'
4
+ base: 'https://some-cas.example.org'
5
+ base_authority: 'CASTEST'
6
+ verify_ssl: true
7
+ tls_version: 'TLSv1_2'
@@ -5,6 +5,9 @@ require 'yaml'
5
5
  require 'webmock/rspec'
6
6
  require 'rspec/its'
7
7
  require 'faker'
8
+ if RUBY_VERSION >= '2.3.0'
9
+ require 'pry-byebug'
10
+ end
8
11
 
9
12
  Dir['spec/support/**/*.rb'].each { |f| load f }
10
13
 
@@ -17,6 +20,9 @@ end
17
20
  RSpec.configure do |config|
18
21
  config.mock_framework = :rspec
19
22
  config.include Fixtures
23
+ last_execution_result_file = 'spec/support/last_execution_examples_result.txt'
24
+ config.example_status_persistence_file_path = last_execution_result_file
25
+ config.order = 'random'
20
26
  end
21
27
 
22
28
  SimpleCov.start 'gem' do
@@ -0,0 +1,159 @@
1
+ example_id | status | run_time |
2
+ -------------------------------------------------------------- | ------ | --------------- |
3
+ ./spec/cassette/authentication/authorities_spec.rb[1:1:1] | passed | 0.00041 seconds |
4
+ ./spec/cassette/authentication/authorities_spec.rb[1:1:2] | passed | 0.00035 seconds |
5
+ ./spec/cassette/authentication/authorities_spec.rb[1:1:3] | passed | 0.0003 seconds |
6
+ ./spec/cassette/authentication/authorities_spec.rb[1:2:1] | passed | 0.00029 seconds |
7
+ ./spec/cassette/authentication/authorities_spec.rb[1:2:2:1] | passed | 0.00059 seconds |
8
+ ./spec/cassette/authentication/authorities_spec.rb[1:2:2:2] | passed | 0.00198 seconds |
9
+ ./spec/cassette/authentication/authorities_spec.rb[1:3:1] | passed | 0.00018 seconds |
10
+ ./spec/cassette/authentication/authorities_spec.rb[1:3:2] | passed | 0.0005 seconds |
11
+ ./spec/cassette/authentication/authorities_spec.rb[1:3:3] | passed | 0.00053 seconds |
12
+ ./spec/cassette/authentication/authorities_spec.rb[1:3:4] | passed | 0.00043 seconds |
13
+ ./spec/cassette/authentication/authorities_spec.rb[1:4:1] | passed | 0.00036 seconds |
14
+ ./spec/cassette/authentication/authorities_spec.rb[1:4:2] | passed | 0.00052 seconds |
15
+ ./spec/cassette/authentication/cache_spec.rb[1:1:1] | passed | 0.00108 seconds |
16
+ ./spec/cassette/authentication/cache_spec.rb[1:1:2:1] | passed | 0.00051 seconds |
17
+ ./spec/cassette/authentication/cache_spec.rb[1:1:2:2] | passed | 0.00119 seconds |
18
+ ./spec/cassette/authentication/cache_spec.rb[1:1:2:3:1] | passed | 0.00063 seconds |
19
+ ./spec/cassette/authentication/cache_spec.rb[1:1:3] | passed | 0.00074 seconds |
20
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:1:1:1] | passed | 0.00122 seconds |
21
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:1:1:2] | passed | 0.00085 seconds |
22
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:1:2] | passed | 0.00141 seconds |
23
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:1:3] | passed | 0.00135 seconds |
24
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:2:1:1] | passed | 0.00106 seconds |
25
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:2:1:2] | passed | 0.00108 seconds |
26
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:2:2] | passed | 0.00245 seconds |
27
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:2:3] | passed | 0.00125 seconds |
28
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:1:1:1] | passed | 0.00078 seconds |
29
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:1:1:2] | passed | 0.00135 seconds |
30
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:2:1:1] | passed | 0.00081 seconds |
31
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:2:1:2] | passed | 0.001 seconds |
32
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:3:1:1] | passed | 0.00164 seconds |
33
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:1:3:1:2] | passed | 0.00078 seconds |
34
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:2:1] | passed | 0.00099 seconds |
35
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:3:1:1] | passed | 0.00086 seconds |
36
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:3:2:1] | passed | 0.00099 seconds |
37
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:3:3:1] | passed | 0.00096 seconds |
38
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:3:3:4:1] | passed | 0.00109 seconds |
39
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:4:1:1:1] | passed | 0.0049 seconds |
40
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:4:1:2:1] | passed | 0.00461 seconds |
41
+ ./spec/cassette/authentication/filter_spec.rb[1:1:1:4:1:3:1] | passed | 0.0052 seconds |
42
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:1:1:1] | passed | 0.00238 seconds |
43
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:1:1:2] | passed | 0.00221 seconds |
44
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:1:2] | passed | 0.00258 seconds |
45
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:1:3] | passed | 0.00333 seconds |
46
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:2:1:1] | passed | 0.0011 seconds |
47
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:2:1:2] | passed | 0.00159 seconds |
48
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:2:2] | passed | 0.00241 seconds |
49
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:2:3] | passed | 0.00261 seconds |
50
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:1:1:1] | passed | 0.00126 seconds |
51
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:1:1:2] | passed | 0.00109 seconds |
52
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:2:1:1] | passed | 0.00935 seconds |
53
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:2:1:2] | passed | 0.00226 seconds |
54
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:3:1:1] | passed | 0.00433 seconds |
55
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:1:3:1:2] | passed | 0.00664 seconds |
56
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:2:1] | passed | 0.00106 seconds |
57
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:3:1:1] | passed | 0.00104 seconds |
58
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:3:2:1] | passed | 0.0011 seconds |
59
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:3:3:1] | passed | 0.00094 seconds |
60
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:3:3:4:1] | passed | 0.001 seconds |
61
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:4:1:1:1] | passed | 0.00574 seconds |
62
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:4:1:2:1] | passed | 0.00621 seconds |
63
+ ./spec/cassette/authentication/filter_spec.rb[1:2:1:4:1:3:1] | passed | 0.0071 seconds |
64
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:1:1] | passed | 0.00052 seconds |
65
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:2:1] | passed | 0.0009 seconds |
66
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:3:1] | passed | 0.00086 seconds |
67
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:4:1] | passed | 0.00053 seconds |
68
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:5] | passed | 0.00066 seconds |
69
+ ./spec/cassette/authentication/user_factory_spec.rb[1:1:1:6] | passed | 0.45881 seconds |
70
+ ./spec/cassette/authentication/user_spec.rb[1:1:1:1] | passed | 0.00076 seconds |
71
+ ./spec/cassette/authentication/user_spec.rb[1:1:2:1] | passed | 0.00089 seconds |
72
+ ./spec/cassette/authentication/user_spec.rb[1:2:1] | passed | 0.00023 seconds |
73
+ ./spec/cassette/authentication/user_spec.rb[1:2:2] | passed | 0.00052 seconds |
74
+ ./spec/cassette/authentication/user_spec.rb[1:2:3] | passed | 0.00067 seconds |
75
+ ./spec/cassette/authentication/user_spec.rb[1:3:1:1] | passed | 0.00043 seconds |
76
+ ./spec/cassette/authentication/user_spec.rb[1:3:2:1] | passed | 0.0008 seconds |
77
+ ./spec/cassette/authentication_spec.rb[1:1:1:1] | passed | 0.00104 seconds |
78
+ ./spec/cassette/authentication_spec.rb[1:1:1:2] | passed | 0.00082 seconds |
79
+ ./spec/cassette/authentication_spec.rb[1:1:1:3] | passed | 0.00101 seconds |
80
+ ./spec/cassette/authentication_spec.rb[1:1:2:1] | passed | 0.00111 seconds |
81
+ ./spec/cassette/authentication_spec.rb[1:1:2:2:1] | passed | 0.01021 seconds |
82
+ ./spec/cassette/authentication_spec.rb[1:1:2:3:1] | passed | 0.01165 seconds |
83
+ ./spec/cassette/authentication_spec.rb[1:2:1] | passed | 0.00039 seconds |
84
+ ./spec/cassette/authentication_spec.rb[1:2:2] | passed | 0.00072 seconds |
85
+ ./spec/cassette/authentication_spec.rb[1:2:3] | passed | 0.00086 seconds |
86
+ ./spec/cassette/authentication_spec.rb[1:2:4] | passed | 0.00105 seconds |
87
+ ./spec/cassette/cache/null_store_spec.rb[1:1:1] | passed | 0.00016 seconds |
88
+ ./spec/cassette/cache/null_store_spec.rb[1:1:2] | passed | 0.00018 seconds |
89
+ ./spec/cassette/cache/null_store_spec.rb[1:2:1] | passed | 0.00014 seconds |
90
+ ./spec/cassette/cache/null_store_spec.rb[1:3:1] | passed | 0.00013 seconds |
91
+ ./spec/cassette/cache/null_store_spec.rb[1:3:2] | passed | 0.00065 seconds |
92
+ ./spec/cassette/cache/null_store_spec.rb[1:3:3] | passed | 0.00055 seconds |
93
+ ./spec/cassette/cache/null_store_spec.rb[1:4:1] | passed | 0.00022 seconds |
94
+ ./spec/cassette/cache/null_store_spec.rb[1:4:2] | passed | 0.00055 seconds |
95
+ ./spec/cassette/cache/null_store_spec.rb[1:4:3] | passed | 0.00055 seconds |
96
+ ./spec/cassette/cache/null_store_spec.rb[1:4:4] | passed | 0.00056 seconds |
97
+ ./spec/cassette/cache/null_store_spec.rb[1:5:1] | passed | 0.00015 seconds |
98
+ ./spec/cassette/cache/null_store_spec.rb[1:5:2] | passed | 0.00043 seconds |
99
+ ./spec/cassette/cache_spec.rb[1:1:1] | passed | 0.00023 seconds |
100
+ ./spec/cassette/cache_spec.rb[1:2:1] | passed | 0.00119 seconds |
101
+ ./spec/cassette/cache_spec.rb[1:3] | passed | 0.01158 seconds |
102
+ ./spec/cassette/client/cache_spec.rb[1:1] | passed | 0.00153 seconds |
103
+ ./spec/cassette/client_spec.rb[1:1:1] | passed | 0.00052 seconds |
104
+ ./spec/cassette/client_spec.rb[1:1:2] | passed | 0.0005 seconds |
105
+ ./spec/cassette/client_spec.rb[1:2:1:1] | passed | 0.00108 seconds |
106
+ ./spec/cassette/client_spec.rb[1:2:1:2] | passed | 0.00096 seconds |
107
+ ./spec/cassette/client_spec.rb[1:2:1:3] | passed | 0.00102 seconds |
108
+ ./spec/cassette/client_spec.rb[1:2:2:1] | passed | 0.00076 seconds |
109
+ ./spec/cassette/client_spec.rb[1:2:3:1:1] | passed | 0.00082 seconds |
110
+ ./spec/cassette/client_spec.rb[1:2:3:1:2] | passed | 0.00083 seconds |
111
+ ./spec/cassette/client_spec.rb[1:2:3:2:1] | passed | 0.00088 seconds |
112
+ ./spec/cassette/client_spec.rb[1:2:3:2:2] | passed | 0.00084 seconds |
113
+ ./spec/cassette/client_spec.rb[1:3:1:1:1] | passed | 0.00123 seconds |
114
+ ./spec/cassette/client_spec.rb[1:3:1:1:2] | passed | 0.00105 seconds |
115
+ ./spec/cassette/client_spec.rb[1:3:1:1:3] | passed | 0.0009 seconds |
116
+ ./spec/cassette/client_spec.rb[1:3:2:1:1] | passed | 0.00135 seconds |
117
+ ./spec/cassette/client_spec.rb[1:3:2:1:2] | passed | 0.00109 seconds |
118
+ ./spec/cassette/client_spec.rb[1:3:2:1:3] | passed | 0.00121 seconds |
119
+ ./spec/cassette/client_spec.rb[1:3:3:1:1] | passed | 0.00069 seconds |
120
+ ./spec/cassette/client_spec.rb[1:3:3:1:2] | passed | 0.0007 seconds |
121
+ ./spec/cassette/client_spec.rb[1:3:3:2:1] | passed | 0.0007 seconds |
122
+ ./spec/cassette/client_spec.rb[1:3:3:2:2] | passed | 0.00079 seconds |
123
+ ./spec/cassette/client_spec.rb[1:4:1:1] | passed | 0.0018 seconds |
124
+ ./spec/cassette/client_spec.rb[1:4:1:2] | passed | 0.00161 seconds |
125
+ ./spec/cassette/client_spec.rb[1:4:1:3] | passed | 0.00168 seconds |
126
+ ./spec/cassette/client_spec.rb[1:4:2:1] | passed | 0.00128 seconds |
127
+ ./spec/cassette/client_spec.rb[1:4:2:2] | passed | 0.00131 seconds |
128
+ ./spec/cassette/client_spec.rb[1:4:3:1] | passed | 0.00085 seconds |
129
+ ./spec/cassette/client_spec.rb[1:4:4:1] | passed | 0.00227 seconds |
130
+ ./spec/cassette/client_spec.rb[1:4:4:2] | passed | 0.00182 seconds |
131
+ ./spec/cassette/client_spec.rb[1:4:4:3] | passed | 0.00237 seconds |
132
+ ./spec/cassette/client_spec.rb[1:4:4:4] | passed | 0.0022 seconds |
133
+ ./spec/cassette/client_spec.rb[1:4:4:5] | passed | 0.00182 seconds |
134
+ ./spec/cassette/client_spec.rb[1:4:4:6] | passed | 0.0023 seconds |
135
+ ./spec/cassette/errors_spec.rb[1:1:1:1] | passed | 0.00025 seconds |
136
+ ./spec/cassette/errors_spec.rb[1:2:1] | passed | 0.0006 seconds |
137
+ ./spec/cassette/errors_spec.rb[1:2:2] | passed | 0.00026 seconds |
138
+ ./spec/cassette/http/request_spec.rb[1:1:1] | passed | 0.00706 seconds |
139
+ ./spec/cassette/http/request_spec.rb[1:1:2] | passed | 0.01144 seconds |
140
+ ./spec/cassette/http/request_spec.rb[1:1:3:1] | passed | 0.00924 seconds |
141
+ ./spec/cassette/http/ticket_response_spec.rb[1:1:1] | passed | 0.00656 seconds |
142
+ ./spec/cassette/http/ticket_response_spec.rb[1:1:2:1] | passed | 0.00883 seconds |
143
+ ./spec/cassette/http/ticket_response_spec.rb[1:2:1] | passed | 0.0093 seconds |
144
+ ./spec/cassette/http/ticket_response_spec.rb[1:2:2:1] | passed | 0.00564 seconds |
145
+ ./spec/cassette/http/ticket_response_spec.rb[1:3:1] | passed | 0.00688 seconds |
146
+ ./spec/cassette/http/ticket_response_spec.rb[1:3:2:1] | passed | 0.00685 seconds |
147
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:1:1] | passed | 0.00208 seconds |
148
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:1:2:1] | passed | 0.00141 seconds |
149
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:1:3:1] | passed | 0.00186 seconds |
150
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:2:1] | passed | 0.00104 seconds |
151
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:2:2:1] | passed | 0.00093 seconds |
152
+ ./spec/cassette/rubycas/routing_constraint_spec.rb[1:1:2:3:1] | passed | 0.00103 seconds |
153
+ ./spec/cassette_spec.rb[1:1:1] | passed | 0.00036 seconds |
154
+ ./spec/cassette_spec.rb[1:1:2] | passed | 0.00057 seconds |
155
+ ./spec/cassette_spec.rb[1:2:1] | passed | 0.0002 seconds |
156
+ ./spec/cassette_spec.rb[1:3:1:1] | passed | 0.00028 seconds |
157
+ ./spec/cassette_spec.rb[1:3:2:1] | passed | 0.00063 seconds |
158
+ ./spec/cassette_spec.rb[1:3:2:2] | passed | 0.00179 seconds |
159
+ ./spec/cassette_spec.rb[1:3:2:3] | passed | 0.00048 seconds |
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.2.5
4
+ version: 1.5.0
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: 2019-06-19 00:00:00.000000000 Z
11
+ date: 2020-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry
98
+ name: pry-byebug
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -272,6 +272,7 @@ files:
272
272
  - spec/integration/cas/client_spec.rb
273
273
  - spec/spec_helper.rb
274
274
  - spec/support/controllers/controller_mock.rb
275
+ - spec/support/last_execution_examples_result.txt
275
276
  homepage: http://github.com/locaweb/cassette
276
277
  licenses: []
277
278
  metadata: {}
@@ -316,3 +317,4 @@ test_files:
316
317
  - spec/integration/cas/client_spec.rb
317
318
  - spec/spec_helper.rb
318
319
  - spec/support/controllers/controller_mock.rb
320
+ - spec/support/last_execution_examples_result.txt