iruby-dependencies 2.0.3 → 2.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51fc39fcfb589ece989811211d7a8ef6679cc4a5
4
- data.tar.gz: e471e7aa05596d47f4bb50e468cf17d08a87a998
3
+ metadata.gz: 280b976207b3706948e35bf332b2545f3ee3b30c
4
+ data.tar.gz: 8224d4654adcf62f648c61bbb03074cf3d451095
5
5
  SHA512:
6
- metadata.gz: 759d54ba40e218a198e7ec560c2926f31ff9fb7f0471d2fd1f95072580823ceea5c5ff55945591218e2229e16680b2f823bae81a889e1839648c3bd190fae62d
7
- data.tar.gz: 66019111a11b111797bd78a7cef4b9532c611e7245b19265a688ab7d2f251eaa486a7bcf539c435a409a25ce61a91496709bea9450226e99576ad20058acf91e
6
+ metadata.gz: 723dea17bcbb150a47179005b8bcfa6a064b1699a15a5aae9979978503e2183777bdec7abc36eab65dec5384ce70c00190f9c0a9d62f88fbcc70a7b54456e9bf
7
+ data.tar.gz: 239d46655bdb6f8f413abd0099c1e00e68da199e4e300a43635de7f9d37ca5672d51b3c36ce250a24bc1127f5cca5574f6a67af9426733c513a1a0be5c8006c9
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["kylejking@gmail.com"]
11
11
 
12
12
  spec.summary = %q{IRuby::Dependencies is a module for injecting Ruby dependencies into Jupyter Notebooks}
13
- spec.homepage = "https://github.com/kylekyle/iruby-dependencies"
13
+ spec.homepage = "https://github.com/jupyter-gallery/iruby-dependencies"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
16
  spec.bindir = "exe"
@@ -4,24 +4,24 @@ require 'iruby/dependencies/unload'
4
4
  require 'iruby/dependencies/version'
5
5
 
6
6
  # require 'mypki' if requested so it is an active gem
7
- require 'mypki' if Bundler.settings['dependencies.mypki']
7
+ if Bundler.settings['dependencies.mypki']
8
+ require 'mypki'
9
+ require 'erector'
10
+ end
8
11
 
9
12
  module IRuby
10
13
  module Dependencies
11
- paths = Gem.path.map {|p| File.join p, 'gems'}
14
+ ACTIVE_GEMS = {}
12
15
 
13
16
  # activate default gems
14
17
  %w[bigdecimal io-console json psych rdoc].each {|g| gem g}
15
18
 
16
- ACTIVE_GEMS = $LOAD_PATH.each_with_object({}) do |path,hash|
17
- paths.each do |gem_path|
18
- match = path.match /#{gem_path}\/((?:\w|-)+)-((?:\d+\.?)+)/
19
- hash.merge! Hash[*match.captures] unless match.nil?
20
- end
21
- end
22
-
23
19
  # this code is taken from bundler/inline with small changes
24
20
  def self.dependencies verbose: false, &gemfile
21
+ if ACTIVE_GEMS.empty?
22
+ ACTIVE_GEMS.merge! Gem.loaded_specs.map{|n,s| [n,s.version.to_s]}.to_h
23
+ end
24
+
25
25
  Bundler.unload!
26
26
 
27
27
  Bundler.ui = verbose ? Bundler::UI::Shell.new : nil
@@ -1,5 +1,5 @@
1
1
  module IRuby
2
2
  module Dependencies
3
- VERSION = "2.0.3"
3
+ VERSION = "2.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iruby-dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle King
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iruby
@@ -86,7 +86,7 @@ files:
86
86
  - lib/iruby/dependencies/dsl.rb
87
87
  - lib/iruby/dependencies/unload.rb
88
88
  - lib/iruby/dependencies/version.rb
89
- homepage: https://github.com/kylekyle/iruby-dependencies
89
+ homepage: https://github.com/jupyter-gallery/iruby-dependencies
90
90
  licenses: []
91
91
  metadata: {}
92
92
  post_install_message: