bundler-common_gemfile 0.0.4 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bundler-common_gemfile.rb +19 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52c642a330e453eee7d2eca8831181656f1792580cbd1bba2e51cb3a647859a6
4
- data.tar.gz: 80ac14d753990cb1ca20b57ee77da2f2b1833bdfd7e8da32a6ed66c2f3c896f6
3
+ metadata.gz: e1d622352d2332ad3ae9988efab9ad5580b9e7c121eec99666b60111804754f5
4
+ data.tar.gz: b6d58d87c622a24029068d60f24320bc45c530e798cf515b60e7d349b45a11d4
5
5
  SHA512:
6
- metadata.gz: 006feb4ac12040db32ac2159f040bd43942a46552705afb34fa8eb4f86c249d52f112f36d68fcc1a15f9a51bdd5ecea9f8f8553c2a6732001c790c1eecc42ec3
7
- data.tar.gz: f826b92abe868331bfdc1ed7208c0b99b0e527c692adefff6fffbb428b1ce85b30cd47bc11833a74016e50fe6da7cdb2286d4c9b63d555c1020cdb008510cdcc
6
+ metadata.gz: 9ea3c85dfca5cf838befe18f563f6621ad8333262ae25ea6a867abc9b4239875b0cbf800c59231cd4b68788756c8bc5d243ce2715f7931c4cd97b5bff5e2acdf
7
+ data.tar.gz: fccda69f3691b7dcba6a62e41e3a8e2186f7b1a03cd257e2ffdfb988b60695847aa2bbab990becd73cb45c7ddfde4dd927eab986356ae9e74d53619f09779aa2
@@ -1,32 +1,38 @@
1
1
  module Bundler
2
2
  class CommonGemfile
3
3
  def self.load_other(context)
4
- puts 'SUPER BUNDLER START'
5
4
  evaled = []
6
5
 
7
6
  while true
8
7
  number_of_evaled = evaled.size
9
8
  sources = context.instance_variable_get('@sources').all_sources
10
-
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
- # source.specs # dobre do odświerzenia cache bundlera
14
- gemfile_common_path = if source.respond_to?('install_path')
15
- source.install_path
16
- # source.specs # (taki ala robi bundle install wtf XD, samo pobiera z gita)
17
- else
18
- source.path
19
- end.join('Gemfile-common.rb')
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
- # eval_gemfile(gemfile_common_path) # ('', content)
23
- context.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.4
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrzej Bisewski