cassette 1.1.3 → 1.1.4

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: 01f1d6811c1335b5b176f69010aa6708b3c7ff3d
4
- data.tar.gz: ca010544b44694b470487d336701aeaf2c3e0f21
3
+ metadata.gz: e63f18eabd5f87a8976aa3c8ae3e6d2aa1a32391
4
+ data.tar.gz: 5661be8783e0490ac42e48d5185cedc807cfffd7
5
5
  SHA512:
6
- metadata.gz: a5af0a94f26e3403311e14eff8869d52424a86b63ffbcb46822e7b15fab64f0aa346d93942a2bc53316dcc20ca1cee663126091157f06bdd92ab5a4a105a9650
7
- data.tar.gz: 2e3421d3b9669cf44e778186f47b9c8d08be0a96b7965fbc10b291268597c450c69cf6746073884c9a855cf93a02e8c65c2cf70720b4fac89296536f645911e4
6
+ metadata.gz: 2df0891132dfc91b40c9df0ef32bfe6392382cef824f96686c6c4e6577ead9f8371066e5c22b9383621e881bcfef92a5a1a5b07c5cb45d9e28a2d8277edb1a1a
7
+ data.tar.gz: 14ce3c294dece8fb5db1322b77421d173fb1e8548aaaaae952fe3807a8d8d40a937477ca190ca5c51bbf51cfe4a5703f11a36a7d8eb96802b20caf16475caf0a
data/README.md CHANGED
@@ -56,7 +56,10 @@ class SomeController < ApplicationController
56
56
  end
57
57
  ```
58
58
 
59
- Where options are the same options you can pass to Rails' `skip_before_filter` method
59
+ Where options are the same options you can pass to Rails' `skip_before_action` method.
60
+
61
+ You also can skip the whole CAS authentication using an environment variable `NOAUTH=true`. The method `current_user` will keep available. This is useful for development environments. **Be careful not to set and/or forget this variable in production environment**.
62
+
60
63
 
61
64
  ### Overriding the authenticated service
62
65
 
@@ -136,7 +139,7 @@ class SomeController < ApplicationController
136
139
 
137
140
  # - Allow only employees:
138
141
  #
139
- # before_filter :employee_only_filter
142
+ # before_action :employee_only_filter
140
143
  #
141
144
  # rescue_from Cassette::Errors::NotAnEmployee do
142
145
  # redirect_to '/403.html'
@@ -144,7 +147,7 @@ class SomeController < ApplicationController
144
147
 
145
148
  # - Allow only customers:
146
149
  #
147
- # before_filter :customer_only_filter
150
+ # before_action :customer_only_filter
148
151
  #
149
152
  # rescue_from Cassette::Errors::NotACustomer do
150
153
  # redirect_to '/403.html'
@@ -9,13 +9,13 @@ module Cassette
9
9
  extend ActiveSupport::Concern
10
10
 
11
11
  included do |controller|
12
- controller.before_filter(:validate_authentication_ticket)
12
+ controller.before_action(:validate_authentication_ticket)
13
13
  controller.send(:attr_accessor, :current_user)
14
14
  end
15
15
 
16
16
  module ClassMethods
17
17
  def skip_authentication(*options)
18
- skip_before_filter :validate_authentication_ticket, *options
18
+ skip_before_action :validate_authentication_ticket, *options
19
19
  end
20
20
  end
21
21
 
@@ -9,13 +9,13 @@ module Cassette
9
9
  include UserFactory
10
10
 
11
11
  included do
12
- before_filter :validate_authentication_ticket
12
+ before_action :validate_authentication_ticket
13
13
  helper_method :current_user
14
14
  end
15
15
 
16
16
  module ClassMethods
17
17
  def skip_authentication(*options)
18
- skip_before_filter :validate_authentication_ticket, *options
18
+ skip_before_action :validate_authentication_ticket, *options
19
19
  end
20
20
  end
21
21
 
@@ -2,7 +2,7 @@ module Cassette
2
2
  class Version
3
3
  MAJOR = '1'
4
4
  MINOR = '1'
5
- PATCH = '3'
5
+ PATCH = '4'
6
6
 
7
7
  def self.version
8
8
  [MAJOR, MINOR, PATCH].join('.')
@@ -10,7 +10,7 @@ end
10
10
 
11
11
  class ControllerMock
12
12
  attr_accessor :params, :request, :current_user
13
- def self.before_filter(*); end
13
+ def self.before_action(*); end
14
14
 
15
15
  def initialize(params = {}, headers = {})
16
16
  self.params = params.with_indifferent_access
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.3
4
+ version: 1.1.4
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: 2016-05-13 00:00:00.000000000 Z
11
+ date: 2017-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday