clearance 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of clearance might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0998695d86d391312a288b68a0721140249641b
4
- data.tar.gz: 1995891a282666fee645519061cf0cd848aeff86
3
+ metadata.gz: b36c10484673f64ecf6621a00b290bb481731ca1
4
+ data.tar.gz: fd2a23e512ad678d7841128f9e7911cca174f0eb
5
5
  SHA512:
6
- metadata.gz: 9fca14ac8e1a9650c7acd431642331bbd0eb7365f1f03c070e83be7a7e2bddbb6cec28b7942cade5687b9a28aeb7a0d316e0a21087a71211724cdeaa034db7f1
7
- data.tar.gz: c4097377a618028dba3656e1da534fa8d566dc5ea6107c94f45dc585bfaab77e8fa1cd9015a9c33fb43ac270fab2799d2c21e17b5e2e248fedc5fd9d47465442
6
+ metadata.gz: 31afa57919c1be57c63f8cbfea0b28bb035cd9e2f5df11ccfd0ae730c379d6360fd5638535ce7f047f57aa95f2c35be5ebdb44d6fb4b952f02324222d2203c43
7
+ data.tar.gz: ea9b82a67c87ffeecae9163a3ed1a3868230d74301678e03dd5d92e09b67a668dc0eb50cfe5d64c146a251435d64f83f74ff4cd5ae2b9c28f637a5d8f0ddc0e4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearance (1.4.1)
4
+ clearance (1.4.2)
5
5
  bcrypt
6
6
  email_validator (~> 1.4)
7
7
  rails (>= 3.1)
data/NEWS.md CHANGED
@@ -1,5 +1,8 @@
1
1
  Thank you to all the [contributors](https://github.com/thoughtbot/clearance/graphs/contributors)!
2
2
 
3
+ New for 1.4.2 (September 13, 2014)
4
+ * Eliminate deprecation message when using DenyAccess matcher with RSpec 3.
5
+
3
6
  New for 1.4.1 (September 5, 2014)
4
7
  * Prevent BCrypt strategy from raising an exception when `encypted_password`
5
8
  is nil.
@@ -8,7 +8,7 @@ module Clearance
8
8
  end
9
9
 
10
10
  class DenyAccessMatcher
11
- attr_reader :failure_message, :negative_failure_message
11
+ attr_reader :failure_message, :failure_message_when_negated
12
12
 
13
13
  def initialize(context, opts)
14
14
  @context = context
@@ -16,7 +16,7 @@ module Clearance
16
16
  @url = opts[:redirect]
17
17
 
18
18
  @failure_message = ''
19
- @negative_failure_message = ''
19
+ @failure_message_when_negated = ''
20
20
  end
21
21
 
22
22
  def description
@@ -28,6 +28,14 @@ module Clearance
28
28
  sets_the_flash? && redirects_to_url?
29
29
  end
30
30
 
31
+ def failure_message_for_should
32
+ failure_message
33
+ end
34
+
35
+ def failure_message_for_should_not
36
+ failure_message_when_negated
37
+ end
38
+
31
39
  private
32
40
 
33
41
  def denied_access_url
@@ -55,7 +63,8 @@ module Clearance
55
63
 
56
64
  begin
57
65
  @context.send(:assert_redirected_to, @url)
58
- @negative_failure_message << "Didn't expect to redirect to #{@url}."
66
+ @failure_message_when_negated <<
67
+ "Didn't expect to redirect to #{@url}."
59
68
  true
60
69
  rescue Clearance::Testing::AssertionError
61
70
  @failure_message << "Expected to redirect to #{@url} but did not."
@@ -68,10 +77,12 @@ module Clearance
68
77
  true
69
78
  else
70
79
  if flash_notice_value == @flash
71
- @negative_failure_message << "Didn't expect to set the flash to #{@flash}"
80
+ @failure_message_when_negated <<
81
+ "Didn't expect to set the flash to #{@flash}"
72
82
  true
73
83
  else
74
- @failure_message << "Expected the flash to be set to #{@flash} but was #{flash_notice_value}"
84
+ @failure_message << "Expected the flash to be set to #{@flash} "\
85
+ "but was #{flash_notice_value}"
75
86
  false
76
87
  end
77
88
  end
@@ -1,3 +1,3 @@
1
1
  module Clearance
2
- VERSION = '1.4.1'
2
+ VERSION = '1.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -25,7 +25,7 @@ authors:
25
25
  autorequire:
26
26
  bindir: bin
27
27
  cert_chain: []
28
- date: 2014-09-08 00:00:00.000000000 Z
28
+ date: 2014-09-13 00:00:00.000000000 Z
29
29
  dependencies:
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bcrypt