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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eea7d3927403faf13121f530c2a64d3ae05fa55b
4
- data.tar.gz: 6d70cb35c23eeb4b8b49e9cd031f6fad1fdb77b4
2
+ SHA256:
3
+ metadata.gz: dfcccbabeb21e2c523a53b47c542619f8fc8ed0f9c36a6b0cff55ae9d378d100
4
+ data.tar.gz: 762450996467cfc68b446fe484bafcd1ede73375cfadb541db256cef7f168aa6
5
5
  SHA512:
6
- metadata.gz: a748c9ab621daf636f70d19f56ccc69f1b5f16881fd62a89e5389541175e6029db2aaec2125c2a61e858b51c4e77872a2e4e08d582a2bdce83b127a725aa0966
7
- data.tar.gz: 2d2360d3a7ed669c84c01a45ebfc5826d30999ae8f083fd2f81b9ec9b033c3117cb6bc4a1f67dc14e205b6488a4e4bd5081e9463681cdeda067594d09b0675c3
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
@@ -16,9 +16,9 @@ module Tron
16
16
  def initialize(code: nil, metadata: nil)
17
17
  @code = code
18
18
  @metadata = metadata
19
- warn 'DEPRECATED: As of Tron 1.0.0 calls to `Tron::Success` and `Tron::Failure.call` are deprecated. ' \
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
- 'See github.com/halo/tron'
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
@@ -1,8 +1,8 @@
1
1
  module Tron
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 0
5
- TINY = 1
4
+ MINOR = 1
5
+ TINY = 0
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join '.'
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.1
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
- rubyforge_project:
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.