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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0156e22abab96bdf2ddbd0356e4cbac463db8768
4
- data.tar.gz: fe0a0d6111137d0afe9b54f8d015ae70ec0a6f59
3
+ metadata.gz: 47e7aaba35b69404948ed047c94b0a675f5e73de
4
+ data.tar.gz: b8365866d03847e653995f5461c78b15f3e9eabd
5
5
  SHA512:
6
- metadata.gz: b5db40d42d4f9f50b99a3afa562dcde408fb17cf6e657db25208897b11a533a0f88d885da1f93a4d046a8ecb44b63495b244135af9c3ab3f4d8c10716acc273d
7
- data.tar.gz: 903ce70655179694dd581f4d7f2e9d98fcc2e200198853d69756a111ce7252519460c2903389d3218cc4a798fbbebe65066596108ebea2de5889f6b39e6b747a
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
- extend Dry::Initializer::Mixin
110
+ attr_reader :subject, :old_method, :new_method
112
111
 
113
- option :subject
114
- option :new_method
115
- option :old_method, optional: true
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
@@ -1,3 +1,3 @@
1
1
  class Dont < Module
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
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.1
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: 2016-12-23 00:00:00.000000000 Z
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