tron 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/tron.rb +12 -0
- data/lib/tron/resultable.rb +2 -2
- data/lib/tron/version.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dfcccbabeb21e2c523a53b47c542619f8fc8ed0f9c36a6b0cff55ae9d378d100
|
4
|
+
data.tar.gz: 762450996467cfc68b446fe484bafcd1ede73375cfadb541db256cef7f168aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a391636868501ea17ed7b8c06075c3b288904e1a379951e811ced590231e4315ccdd9855458599f7a76f1e5ea85324e987506a04bcc8bd5c5f82bb9cbc0278d2
|
7
|
+
data.tar.gz: 4f0ddd7c1c53156ebaa5f25616e0a32a51ceabb42b4de6f2de34c71e693222068065bfce477a6ae208c575a1b89724e35e02c53cccd2034584220702b4ffb8a5
|
data/lib/tron.rb
CHANGED
@@ -33,6 +33,12 @@ module Tron
|
|
33
33
|
nil
|
34
34
|
end
|
35
35
|
|
36
|
+
def code
|
37
|
+
warn "DEPRECATION WARNING: Calling `#code` on a Tron object is deprecated and will be removed in Tron 2.0.0. Please use `#success` instead. Called from `#{caller.first}`"
|
38
|
+
|
39
|
+
success
|
40
|
+
end
|
41
|
+
|
36
42
|
def on_success(proc = nil, &block)
|
37
43
|
(proc || block).call self
|
38
44
|
end
|
@@ -69,6 +75,12 @@ module Tron
|
|
69
75
|
nil
|
70
76
|
end
|
71
77
|
|
78
|
+
def code
|
79
|
+
warn "DEPRECATION WARNING: Calling `#code` on a Tron object is deprecated and will be removed in Tron 2.0.0. Please use `#failure` instead. Called from `#{caller.first}`"
|
80
|
+
|
81
|
+
failure
|
82
|
+
end
|
83
|
+
|
72
84
|
def on_success(_ = nil)
|
73
85
|
self
|
74
86
|
end
|
data/lib/tron/resultable.rb
CHANGED
@@ -16,9 +16,9 @@ module Tron
|
|
16
16
|
def initialize(code: nil, metadata: nil)
|
17
17
|
@code = code
|
18
18
|
@metadata = metadata
|
19
|
-
warn '
|
19
|
+
warn 'DEPRECATION WARNING: As of Tron 1.0.0 calls to `Tron::Success.call` and `Tron::Failure.call` are deprecated. ' \
|
20
20
|
'They will be removed in Tron 2.0.0. Please migrate using `Tron.success` and `Tron.failure`. ' \
|
21
|
-
|
21
|
+
"See github.com/halo/tron Called in:: `#{caller[2]}`"
|
22
22
|
end
|
23
23
|
|
24
24
|
def success?
|
data/lib/tron/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- halo
|
@@ -99,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
|
103
|
-
rubygems_version: 2.5.1
|
102
|
+
rubygems_version: 3.1.2
|
104
103
|
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: General-purpose method return objects that can be chained.
|