bundler-common_gemfile 0.0.1 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bundler-common_gemfile.rb +22 -16
- 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: e1d622352d2332ad3ae9988efab9ad5580b9e7c121eec99666b60111804754f5
|
4
|
+
data.tar.gz: b6d58d87c622a24029068d60f24320bc45c530e798cf515b60e7d349b45a11d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ea3c85dfca5cf838befe18f563f6621ad8333262ae25ea6a867abc9b4239875b0cbf800c59231cd4b68788756c8bc5d243ce2715f7931c4cd97b5bff5e2acdf
|
7
|
+
data.tar.gz: fccda69f3691b7dcba6a62e41e3a8e2186f7b1a03cd257e2ffdfb988b60695847aa2bbab990becd73cb45c7ddfde4dd927eab986356ae9e74d53619f09779aa2
|
@@ -1,32 +1,38 @@
|
|
1
|
-
|
1
|
+
module Bundler
|
2
2
|
class CommonGemfile
|
3
|
-
def self.load_other
|
4
|
-
puts 'SUPER BUNDLER START'
|
3
|
+
def self.load_other(context)
|
5
4
|
evaled = []
|
6
5
|
|
7
6
|
while true
|
8
7
|
number_of_evaled = evaled.size
|
9
|
-
sources = @sources.all_sources
|
10
|
-
|
8
|
+
sources = context.instance_variable_get('@sources').all_sources
|
11
9
|
sources.select { |s| s.is_a?(Bundler::Source::Git) || s.is_a?(Bundler::Source::Path) }.each do |source|
|
10
|
+
|
12
11
|
source.instance_variable_set('@allow_cached', true)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
gem_path = if source.respond_to?('install_path')
|
13
|
+
source.install_path
|
14
|
+
else
|
15
|
+
source.expanded_original_path
|
16
|
+
end
|
17
|
+
|
18
|
+
gemfile_common_path = gem_path.join('Gemfile-common.rb')
|
19
|
+
|
20
|
+
if !File.exist?(gem_path) && source.is_a?(Bundler::Source::Git)
|
21
|
+
puts " fetching \e[1m\e[92m#{source.name}\e[0m is search of common-gemfile"
|
22
|
+
source.specs
|
23
|
+
end
|
20
24
|
if !evaled.include?(gemfile_common_path) && File.exist?(gemfile_common_path)
|
21
25
|
evaled << gemfile_common_path
|
22
|
-
|
23
|
-
|
26
|
+
puts "Evaling \e[1m\e[92m#{gemfile_common_path}\e[0m"
|
27
|
+
content = File.read(gemfile_common_path)
|
28
|
+
puts content if ENV['DEBUG_GEMFILE_COMMOM']
|
29
|
+
context.send(:eval, content)
|
30
|
+
puts "Evaling \e[1m\e[92m#{'done'}\e[0m"
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
27
34
|
break if evaled.size == number_of_evaled
|
28
35
|
end
|
29
|
-
puts 'SUPER BUNDLER END'
|
30
36
|
end
|
31
37
|
end
|
32
|
-
end
|
38
|
+
end
|