dont 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dont.gemspec +0 -1
- data/lib/dont.rb +6 -5
- data/lib/dont/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47e7aaba35b69404948ed047c94b0a675f5e73de
|
4
|
+
data.tar.gz: b8365866d03847e653995f5461c78b15f3e9eabd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48dce9059d3833f242bfc432da86cd536286b3365ed4cf8585e7854c0346093b2d5cd20c3cdf4b7dd76dbdf2076ca5df9ea48aaea67b6447199b555cdce5d842
|
7
|
+
data.tar.gz: 946abd156b7e87d84edab23e255ba8e4436e230fdd74ac039f0b5f7c940090785eeb8f163979f1063c73baabfae59001efae0733e8ad165f376319a8caedcbd4
|
data/dont.gemspec
CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.add_dependency "dry-container", ">= 0.6"
|
25
|
-
spec.add_dependency "dry-initializer", ">= 0.10.0"
|
26
25
|
|
27
26
|
spec.add_development_dependency "bundler", "~> 1.13"
|
28
27
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/dont.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "dont/version"
|
2
2
|
require "dry-container"
|
3
|
-
require "dry-initializer"
|
4
3
|
|
5
4
|
# Defines a `dont_use` method which can be used to deprecate methods. Whenever
|
6
5
|
# the deprecated method is used the specified handler will get triggered.
|
@@ -108,11 +107,13 @@ class Dont < Module
|
|
108
107
|
|
109
108
|
# Contains info about the deprecated method being called
|
110
109
|
class Deprecation
|
111
|
-
|
110
|
+
attr_reader :subject, :old_method, :new_method
|
112
111
|
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
def initialize(subject:, old_method:, new_method: nil)
|
113
|
+
@subject = subject
|
114
|
+
@new_method = new_method
|
115
|
+
@old_method = old_method
|
116
|
+
end
|
116
117
|
|
117
118
|
# A message saying that the old_method is deprecated. It also mentions the
|
118
119
|
# new_method if provided.
|
data/lib/dont/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dont
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Claes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-container
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: dry-initializer
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.10.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.10.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|