bundler-common_gemfile 0.0.5 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bundler-common_gemfile.rb +18 -12
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 483b7c8354e685a0dba1b962f97b784ac525a591f5c0cb036587e20dd8d8ce53
4
- data.tar.gz: 399d3025430ca6ba1c9c2e70b43860dc2ee0be2f1647369911e29028c907007c
3
+ metadata.gz: 952b3da2be603744242e05906ef98c83d6a2d955e7d40a7a4d706a7d6e251b8a
4
+ data.tar.gz: 5f8c363ed53b8663099579549d9fe40bc997c5b23ccdd9bfd3ed1abe54462aae
5
5
  SHA512:
6
- metadata.gz: 79c36c71be73d1c09f45afe7dde692e7414606e5ea8e99bd349a62f8bad6c1cd4e935b4db5d59e76058bf59942faa897da77998d02f8632595bb4b22c2fee7bf
7
- data.tar.gz: 0afbac423e7ae3418d0fca3ee3196ed303a00e0429c2255c72820c5908684f2982395f38386fff8ac9327afef6394c8d403c96c77f1a8c2395df7dd2bff951e5
6
+ metadata.gz: 20aa2f15424acfc3d0e665f94deffe31e35923c98fc097f5175de5e5160084de803fd5000a020142adfc1284d2f50caeb3f855ec59bb895ca3e40b39e371b92f
7
+ data.tar.gz: 150a794948999e0f56b59485c85f56e3f1a5a42c82eb1d20c3ce61c2e0e3c7bb0b05265261433820574925f7285e485ed4d4e6eff5cc4cedf42d1dabdd360cde
@@ -6,22 +6,28 @@ module Bundler
6
6
  while true
7
7
  number_of_evaled = evaled.size
8
8
  sources = context.instance_variable_get('@sources').all_sources
9
-
10
9
  sources.select { |s| s.is_a?(Bundler::Source::Git) || s.is_a?(Bundler::Source::Path) }.each do |source|
10
+
11
11
  source.instance_variable_set('@allow_cached', true)
12
- gemfile_common_path = if source.respond_to?('install_path')
13
- source.install_path
14
- else
15
- source.path
16
- end.join('Gemfile-common.rb')
17
- gem_path = File.dirname(gemfile_common_path)
18
- source.specs if !File.exist?(gem_path) && source.is_a?(Bundler::Source::Git)
12
+ gem_path = if source.respond_to?('install_path')
13
+ source.install_path
14
+ else
15
+ source.expanded_original_path
16
+ end
19
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
+ STDERR.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
- puts "Evaling \e[1m\e[92m#{gemfile_common_path}\e[0m"
23
- eval(File.read(gemfile_common_path), context.send(:binding))
24
- puts "Evaling \e[1m\e[92m#{'done'}\e[0m"
26
+ STDERR.puts "Evaling \e[1m\e[92m#{gemfile_common_path}\e[0m"
27
+ content = File.read(gemfile_common_path)
28
+ STDERR.puts content if ENV['DEBUG_GEMFILE_COMMOM']
29
+ context.send(:eval, content)
30
+ STDERR.puts "Evaling \e[1m\e[92m#{'done'}\e[0m"
25
31
  end
26
32
  end
27
33
 
@@ -29,4 +35,4 @@ module Bundler
29
35
  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.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrzej Bisewski
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []
39
- rubygems_version: 3.1.4
39
+ rubygems_version: 3.0.9
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: common gemfile