rails-forward_compatible_controller_tests 2.0.0 → 2.0.1
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0894d12d099c42aba3205bb555332d57284b22e
|
|
4
|
+
data.tar.gz: 6f94bec942dc31afad1e5a0473e09d3fedfac082
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
@
|
|
9
|
+
@old_syntax_strategy = :deprecation_warning
|
|
10
10
|
|
|
11
|
-
attr_reader :
|
|
11
|
+
attr_reader :old_syntax_strategy
|
|
12
12
|
|
|
13
13
|
def deprecate
|
|
14
|
-
@
|
|
14
|
+
@old_syntax_strategy = :deprecation_warning
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def deprecated?
|
|
18
|
-
@
|
|
18
|
+
@old_syntax_strategy == :deprecation_warning
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def ignore
|
|
22
|
-
@
|
|
22
|
+
@old_syntax_strategy = nil
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def raise_exception
|
|
26
|
-
@
|
|
26
|
+
@old_syntax_strategy = :raise_exception
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def raise_exception?
|
|
30
|
-
@
|
|
30
|
+
@old_syntax_strategy == :raise_exception
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
34
34
|
|
|
35
35
|
def with_ignore
|
|
36
|
-
|
|
37
|
-
@
|
|
36
|
+
previous_strategy = @old_syntax_strategy
|
|
37
|
+
@old_syntax_strategy = nil
|
|
38
38
|
begin
|
|
39
39
|
yield
|
|
40
40
|
ensure
|
|
41
|
-
@
|
|
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
|
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.
|
|
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-
|
|
11
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|