domesticate_monkeys 0.0.2 → 0.0.3
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/bin/domesticate_monkeys +4 -0
- data/lib/domesticate_monkeys/version.rb +1 -1
- data/lib/domesticate_monkeys.rb +15 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f902eff70d48a89d2483cf1f41381dfab4fc139a729e492006ba34ed1ea14ff
|
4
|
+
data.tar.gz: 8a638249a12af0b8719c4ca175c4b636b996935ae5e46ac56999def8d07cac11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83416e748a909aa85cb993f7255224eb662bda9c910068dcc0ad4183f54d8977b6b20d55476814257a0f5287035710f921395f1e5f2cd914f2a6a7bf4f4ab124
|
7
|
+
data.tar.gz: 0dbbc129cd9b32ca6a5d55c0e0a03a98a4b56c7e4a2b9b41c050d9d170e723c898207d6c832f9d45c6913479a2953f7b113c515ef70bde40869507fea00b1adc
|
data/bin/domesticate_monkeys
CHANGED
@@ -34,6 +34,10 @@ module DomesticateMonkeys
|
|
34
34
|
# load application
|
35
35
|
load MainApp
|
36
36
|
|
37
|
+
# validate that no gems that are known to break domesticate_monkeys are present
|
38
|
+
# (through overwriting our crucial Kernel .method_added monkey patch)
|
39
|
+
validate
|
40
|
+
|
37
41
|
# show results
|
38
42
|
dm_view = View.new
|
39
43
|
dm_view.send(view)
|
data/lib/domesticate_monkeys.rb
CHANGED
@@ -3,8 +3,9 @@ require "domesticate_monkeys/version"
|
|
3
3
|
|
4
4
|
module DomesticateMonkeys
|
5
5
|
|
6
|
-
Root
|
7
|
-
MainApp
|
6
|
+
Root = File.expand_path('../', __dir__)
|
7
|
+
MainApp = Root + "/lib/domesticate_monkeys/boot/main_app.rb"
|
8
|
+
ForbiddenDependencies = %w[debug]
|
8
9
|
|
9
10
|
autoload :Track, "domesticate_monkeys/constants/track"
|
10
11
|
autoload :View, "domesticate_monkeys/constants/view"
|
@@ -14,4 +15,16 @@ module DomesticateMonkeys
|
|
14
15
|
require "domesticate_monkeys/initializers/global_variables"
|
15
16
|
require "domesticate_monkeys/initializers/module"
|
16
17
|
|
18
|
+
class << self
|
19
|
+
|
20
|
+
def validate
|
21
|
+
ForbiddenDependencies.each do |dep|
|
22
|
+
if Gem.loaded_specs[dep].present?
|
23
|
+
raise StandardError, "Can't run datagaze with dependency #{dep}, since it overwrites our required Kernel monkey patch."
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
17
30
|
end
|