rails-forward_compatible_controller_tests 2.0.0 → 2.0.1

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: c14737488ec9d88e466310f7b7c6df11426a25df
4
- data.tar.gz: 8dcde00c075180b1905c20848ebf57ef79b59ea8
3
+ metadata.gz: f0894d12d099c42aba3205bb555332d57284b22e
4
+ data.tar.gz: 6f94bec942dc31afad1e5a0473e09d3fedfac082
5
5
  SHA512:
6
- metadata.gz: 9d76badb16031b39c287245791052be7d460c284cd15dba5870bd3557bbd0e17b84fc021905c8dc407423fc2e4f0abeee666346c5a102ecb3e7f150ce1eb00de
7
- data.tar.gz: 2a30af7fccd62babe9255b419836c39b59aae0b0e05a8efb44cdc6807e602aa0aae5319db91b1f6cb83c71539a87529a4571eeb271efe78ff574e105f703d97d
6
+ metadata.gz: fed586514f5fe5a73c101cfcc4b8e73255cdf66749cf915b16d4e21ff95622f912fd96c6ef110cba25bb1382527e701bc5f71ee28a54d16e393c839986889a45
7
+ data.tar.gz: 93b80abe3cfe373360cf6b8c356f68189fe0ec5e62e43285b7cf55f238621f02331fc043d48b29fe859e81ef59980ec290f22ac3ad751fb8eaaa2d3d05107b0f
@@ -6,39 +6,39 @@ module Rails
6
6
  ERROR_MESSAGE = 'Please use Rails 5 syntax. See: https://github.com/appfolio/rails-forward_compatible_controller_tests'
7
7
 
8
8
  class <<self
9
- @action = :deprecation_warning
9
+ @old_syntax_strategy = :deprecation_warning
10
10
 
11
- attr_reader :action
11
+ attr_reader :old_syntax_strategy
12
12
 
13
13
  def deprecate
14
- @action = :deprecation_warning
14
+ @old_syntax_strategy = :deprecation_warning
15
15
  end
16
16
 
17
17
  def deprecated?
18
- @action == :deprecation_warning
18
+ @old_syntax_strategy == :deprecation_warning
19
19
  end
20
20
 
21
21
  def ignore
22
- @action = nil
22
+ @old_syntax_strategy = nil
23
23
  end
24
24
 
25
25
  def raise_exception
26
- @action = :raise_exceptioon
26
+ @old_syntax_strategy = :raise_exception
27
27
  end
28
28
 
29
29
  def raise_exception?
30
- @action == :raise_exceptioon
30
+ @old_syntax_strategy == :raise_exception
31
31
  end
32
32
 
33
33
  private
34
34
 
35
35
  def with_ignore
36
- previous_action = @action
37
- @action = nil
36
+ previous_strategy = @old_syntax_strategy
37
+ @old_syntax_strategy = nil
38
38
  begin
39
39
  yield
40
40
  ensure
41
- @action = previous_action
41
+ @old_syntax_strategy = previous_strategy
42
42
  end
43
43
  end
44
44
  end
@@ -79,7 +79,7 @@ module Rails
79
79
  end
80
80
 
81
81
  def xhr(request_method, action, parameters = nil, *args)
82
- raise Exception ERROR_MESSAGE if ForwardCompatibleControllerTests.raise_exception?
82
+ raise Exception, ERROR_MESSAGE if ForwardCompatibleControllerTests.raise_exception?
83
83
  ActiveSupport::Deprecation.warn(ERROR_MESSAGE) if ForwardCompatibleControllerTests.deprecated?
84
84
  super(request_method, action, parameters, *args)
85
85
  end
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module ForwardCompatibleControllerTests
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-forward_compatible_controller_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler