bundler-common_gemfile 0.0.2 → 0.0.7
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 +15 -9
- 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: a07f918c87b73fcf5ea8099212fa5cf65791df0f32d5ae9845f854311bfc5f36
|
4
|
+
data.tar.gz: 410d0310eb18455764241a49d24973ebb7c253d8e12ede2e0f55d2210355a046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f392d9e658518444779269c68a12102ca736e9aa49a37011be735b3fb02078f8a74df5a9fb03c15aede6b2c1ebfd33deb425bc9996bb50bbe72b4551e89c0dda
|
7
|
+
data.tar.gz: bc13e38f9b87390ba171030ec647769955f5756839802688b691da89436d6e7dd35757663e28507166394d4404ca173b66c25faa9e938b0559abe42698dce8ac
|
@@ -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
|
8
|
+
sources = context.instance_variable_get('@sources').all_sources
|
10
9
|
|
11
10
|
sources.select { |s| s.is_a?(Bundler::Source::Git) || s.is_a?(Bundler::Source::Path) }.each do |source|
|
12
11
|
source.instance_variable_set('@allow_cached', true)
|
13
|
-
# source.specs # dobre do odświerzenia cache bundlera
|
14
12
|
gemfile_common_path = if source.respond_to?('install_path')
|
15
13
|
source.install_path
|
16
|
-
# source.specs # (taki ala robi bundle install wtf XD, samo pobiera z gita)
|
17
14
|
else
|
18
15
|
source.path
|
19
16
|
end.join('Gemfile-common.rb')
|
17
|
+
gem_path = File.dirname(gemfile_common_path)
|
18
|
+
|
19
|
+
if !File.exist?(gem_path) && source.is_a?(Bundler::Source::Git)
|
20
|
+
puts " fetching \e[1m\e[92m#{source.name}\e[0m"
|
21
|
+
source.specs
|
22
|
+
end
|
23
|
+
|
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
|