who_delegated 0.3.4 → 0.3.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4713c6ceaebc82b3ca665489592f1df85f557670f8bb41cb1e6349fbbbd0b71b
|
4
|
+
data.tar.gz: 1b8fecd7065321d99c78bea604935d18a47cd1618a3bd791f6bb1febe6677277
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57563f3ab4c9993650f089e56512c1b6bc3b9247d9435470503a53e92d762be46e36314466cddd9569380eb44a0f59701345e77243da2d55ca21e4fc515a74dd
|
7
|
+
data.tar.gz: 366963552e4a029ebf0d6e454962305e89dbd2da8d0e957b784fc6df6cc2d9f19ce317c99bbc39c71a27d9d44892fd0d24aed852aa72d97262f6fbfdb03f09c5
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# reopen ActiveRecord::Base to add delegated_method? method
|
4
|
-
module
|
5
|
-
|
4
|
+
module WhoDelegated
|
5
|
+
module ActiveRecordExtension
|
6
6
|
def delegated_method?(method_name)
|
7
7
|
respond_to?("delegated_#{method_name}?") && send("delegated_#{method_name}?")
|
8
8
|
end
|
@@ -14,3 +14,5 @@ module ActiveRecord
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
17
|
+
|
18
|
+
ActiveRecord::Base.send(:include, WhoDelegated::ActiveRecordExtension)
|
data/lib/who_delegated.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "active_record/base"
|
4
3
|
require "active_support/core_ext/module/delegation"
|
5
|
-
require "
|
4
|
+
require "active_record/base"
|
6
5
|
require "zeitwerk"
|
7
6
|
loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
|
8
7
|
loader.setup
|
9
|
-
|
8
|
+
require "who_delegated/railtie"
|
10
9
|
module WhoDelegated # rubocop:todo Style/Documentation
|
11
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: who_delegated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sampo Kuokkanen
|
@@ -35,10 +35,10 @@ files:
|
|
35
35
|
- MIT-LICENSE
|
36
36
|
- README.md
|
37
37
|
- Rakefile
|
38
|
-
- lib/activerecord/base.rb
|
39
38
|
- lib/module.rb
|
40
39
|
- lib/tasks/who_delegated_tasks.rake
|
41
40
|
- lib/who_delegated.rb
|
41
|
+
- lib/who_delegated/active_record_extension.rb
|
42
42
|
- lib/who_delegated/railtie.rb
|
43
43
|
- lib/who_delegated/version.rb
|
44
44
|
homepage: https://github.com/sampokuokkanen/who_delegated
|