bundler-common_gemfile 0.0.2 → 0.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bundler-common_gemfile.rb +15 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f5357b789f0c2d9ff84036539678bcb05fd59d5e7a7195dabdc04f8c7cda2d1
4
- data.tar.gz: 1cbe53e26dc74e0c026750e934fb6120aa3c539791fd4370977a54b077949403
3
+ metadata.gz: a07f918c87b73fcf5ea8099212fa5cf65791df0f32d5ae9845f854311bfc5f36
4
+ data.tar.gz: 410d0310eb18455764241a49d24973ebb7c253d8e12ede2e0f55d2210355a046
5
5
  SHA512:
6
- metadata.gz: 13647177378b1b410372190bf69399a3de343a0dea476d0d5789cc188df55fd2f4228106505a0219a5ff45e238642fbad2eac22ac30f7f7f985c249fc2136060
7
- data.tar.gz: a8b4b6924b5e7d95665604d4a464397c4a388d008f1bdbee190e8c20e47a31c6c034191a95a8628d21ed315ddb5bf83c419248f5bdb66a10724d7eae11f1adef
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
- # eval_gemfile(gemfile_common_path) # ('', content)
23
- eval(File.read(gemfile_common_path))
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-common_gemfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrzej Bisewski