devpack 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/devpack/gems.rb +8 -1
- data/lib/devpack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d0f6b9fad66aac0d4cbf7d9b2b0ce83de1b9ef159ce568ba74585e387d7ca49
|
4
|
+
data.tar.gz: c9e8dccdebba5fa96bd4e3437f526196ca0ca06f92e29f64c957aef252d24c98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc5fbfee439392e48cbad78dcc427969e3177e74c2d633869e73392c3f32c9e3890eed458e10e1dc40f49c01239711ee172c84941165ee778d59b726d394e05b
|
7
|
+
data.tar.gz: 8255b841d85e24b4b6a0cbf90c5f0d47612654360f3f64ea01e82b37c9dcaed74d0e4c09e0fd502edc95a514b362ba5c7c9c7c284bdd87fd499ff0c930e3d7bb
|
data/README.md
CHANGED
data/lib/devpack/gems.rb
CHANGED
@@ -31,6 +31,7 @@ module Devpack
|
|
31
31
|
def load_gem(name, requirement)
|
32
32
|
[name, activate(name, requirement)]
|
33
33
|
rescue LoadError => e
|
34
|
+
deactivate(name)
|
34
35
|
warn(Messages.failure(name, load_error_message(e)))
|
35
36
|
nil
|
36
37
|
end
|
@@ -38,13 +39,19 @@ module Devpack
|
|
38
39
|
def activate(name, version)
|
39
40
|
spec = GemSpec.new(@gem_glob, name, version)
|
40
41
|
update_load_path(spec.require_paths)
|
41
|
-
|
42
|
+
# NOTE: do this before we require, because some gems use the gemspec to
|
43
|
+
# declare their version...
|
42
44
|
Gem.loaded_specs[name] = spec.gemspec
|
45
|
+
loaded = Kernel.require(name)
|
43
46
|
spec.gemspec&.activated = true
|
44
47
|
spec.gemspec&.instance_variable_set(:@loaded, true)
|
45
48
|
loaded
|
46
49
|
end
|
47
50
|
|
51
|
+
def deactivate(name)
|
52
|
+
Gem.loaded_specs.delete(name)
|
53
|
+
end
|
54
|
+
|
48
55
|
def warn(message)
|
49
56
|
Devpack.warn(message)
|
50
57
|
end
|
data/lib/devpack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|