dropkiq 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/dropkiq.gemspec +1 -0
- data/lib/dropkiq/drop_class_analyzer.rb +8 -0
- data/lib/dropkiq/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e87a6068808562755a7635c9fbc10a9ae729831a
|
4
|
+
data.tar.gz: e6202b25aa738ac373a0cc42c96b09d05e51af45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d460fb7e82845b7254004ece0188716ea00e5391b26badf98d8235a3e79ec2ae89f6202dc5df5eae5a68bb8d717402cc764b43c13af20b6120dbd78160d5f182
|
7
|
+
data.tar.gz: 7ac1df5a615b9f54561d99c1201a992fba31bacf31d9007b22cac65d4f32dd5ae671683b362b427ab1047a5f399c5fba7137984e03fa9316cff4431017bd4b3c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dropkiq (0.1.
|
4
|
+
dropkiq (0.1.2)
|
5
5
|
activerecord (>= 4.2)
|
6
6
|
liquid (~> 4.0)
|
7
7
|
|
@@ -27,6 +27,8 @@ GEM
|
|
27
27
|
liquid (4.0.3)
|
28
28
|
method_source (0.9.2)
|
29
29
|
minitest (5.13.0)
|
30
|
+
minitest-focus (1.1.2)
|
31
|
+
minitest (>= 4, < 6)
|
30
32
|
mocha (1.11.2)
|
31
33
|
pry (0.12.2)
|
32
34
|
coderay (~> 1.1.0)
|
@@ -44,6 +46,7 @@ DEPENDENCIES
|
|
44
46
|
bundler (~> 2.0)
|
45
47
|
dropkiq!
|
46
48
|
minitest (~> 5.0)
|
49
|
+
minitest-focus (~> 1.1.2)
|
47
50
|
mocha (~> 1.11.2)
|
48
51
|
pry (~> 0.12.2)
|
49
52
|
rake (~> 10.0)
|
data/dropkiq.gemspec
CHANGED
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_development_dependency "minitest", "~> 5.0"
|
43
43
|
spec.add_development_dependency "sqlite3", "~> 1.3.13"
|
44
44
|
spec.add_development_dependency "mocha", "~> 1.11.2"
|
45
|
+
spec.add_development_dependency "minitest-focus", "~> 1.1.2"
|
45
46
|
|
46
47
|
spec.add_dependency "activerecord", ">= 4.2"
|
47
48
|
spec.add_dependency "liquid", "~> 4.0"
|
@@ -9,6 +9,7 @@ module Dropkiq
|
|
9
9
|
|
10
10
|
def analyze
|
11
11
|
self.active_record_class = find_active_record_class
|
12
|
+
self.active_record_class ||= find_active_record_class_from_shim
|
12
13
|
|
13
14
|
if active_record_class.blank?
|
14
15
|
raise "No ActiveRecord Class found for #{liquid_drop_class.name}"
|
@@ -37,6 +38,13 @@ module Dropkiq
|
|
37
38
|
rescue NameError
|
38
39
|
end
|
39
40
|
|
41
|
+
# https://github.com/Shopify/liquid/pull/568
|
42
|
+
def find_active_record_class_from_shim
|
43
|
+
namespaces = liquid_drop_class.name.split("::")
|
44
|
+
namespaces[0..-2].join("::").constantize
|
45
|
+
rescue NameError
|
46
|
+
end
|
47
|
+
|
40
48
|
def find_drop_method_params
|
41
49
|
default_methods = (Liquid::Drop.instance_methods + Object.instance_methods)
|
42
50
|
instance_methods = (liquid_drop_class.instance_methods - default_methods)
|
data/lib/dropkiq/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dropkiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Darrah
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.11.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: minitest-focus
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.1.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.1.2
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: activerecord
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|