subbundle 0.1.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 944f9c330643b53a08e92f77dc13aef3a078624190df3b314e563e4b7fbe7cef
4
- data.tar.gz: cd1e370434bfba747791ba249f9ab596046d816a4c09707d903658a92bc7ebdf
3
+ metadata.gz: becbb56b5711721febdcec6b3beb98ce112a836773ba61a8cb243ffd260b5354
4
+ data.tar.gz: 93e1ea03033b96b6af57bebec8a13ca9fe26a3b9eaadf0647fdb70d5790ef942
5
5
  SHA512:
6
- metadata.gz: 6b6b5786910f05b1c073842058a9daddcd28637b5793b3096402ea8827dad1578f7c4ffa126e94b5d27fcbe31f8afbafef4e56dfb894faa813d75e8ecceb77cd
7
- data.tar.gz: 9d70f746de832555e29117815a6a686f0a823cd1afd453d219c8aab4cf843a2525873be0e13cc071b021d093e7cba725756230a2865dc4b50665ec7de9a694f1
6
+ metadata.gz: '058f77db697842bd92bc086df81d58fec633b59e2dcd21f3f9dbd10cbcc837bb2b4f7ca73ee19a376266936a3e585b7ea38436b8736df2651cbc55bcd2d6037b'
7
+ data.tar.gz: c3d15af9d81f1bd96260cca07a6bce13d8b1686ef145b40e318fb66ae71c18ac0f2abf9b77e6e19d60ba54e5719de04ca5da8dc78cb3a73754fdff115ba8ed39
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Subbundle
4
- VERSION = "0.1.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/subbundle.rb CHANGED
@@ -31,6 +31,11 @@ module Subbundle
31
31
  subbundle_lockfile_path.dirname.mkpath
32
32
  subbundle_lockfile_path.write(Bundler.ui.silence { definition.to_lock })
33
33
 
34
+ # Delete old caches.
35
+ Bundler.app_config_path.glob("subbundles/#{name}.*.lock").each do |path|
36
+ path.delete if path != subbundle_lockfile_path
37
+ end
38
+
34
39
  setup_from_subbundle(gems, subbundle_lockfile_path)
35
40
  end
36
41
 
@@ -65,6 +70,9 @@ module Subbundle
65
70
  end
66
71
 
67
72
  def self.setup_runtime(definition)
68
- Bundler.ui.silence { Bundler::Runtime.new(Bundler.root, definition).setup }
73
+ runtime = Bundler::Runtime.new(Bundler.root, definition)
74
+ # This is not ideal, let's revisit later.
75
+ Bundler.instance_variable_set(:@load, runtime)
76
+ Bundler.ui.silence { runtime.setup }
69
77
  end
70
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subbundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham