bundler-common_gemfile 0.0.1

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 +7 -0
  2. data/lib/bundler-common_gemfile.rb +32 -0
  3. metadata +43 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '07139109e4cc9c4f5d91bcd160e1f30fe44233c90ea782adbcb219170755d3b4'
4
+ data.tar.gz: 8f15fcc19e15651a275a0e02a5b7676d4071f1047619f1f3fa7ca51a8571ac70
5
+ SHA512:
6
+ metadata.gz: 0cecee0b6458fdb77b32c97f76c9cb66b3cfedb0413b9c8ed108807688350bcecb4eb512dd66b69d56a6b673d01ae69cccbe4013eca7a6f6f92b472e987d3b16
7
+ data.tar.gz: dd21d79236f5e99b8b4453b6480952805d8ac5b24e6eae812cdc647728043e4cc252264f79f99782d18b4e45c6a8d04db2ce392f70a5bf70a026b05c6a89d82c
@@ -0,0 +1,32 @@
1
+ class Bundler
2
+ class CommonGemfile
3
+ def self.load_other
4
+ puts 'SUPER BUNDLER START'
5
+ evaled = []
6
+
7
+ while true
8
+ number_of_evaled = evaled.size
9
+ sources = @sources.all_sources
10
+
11
+ sources.select { |s| s.is_a?(Bundler::Source::Git) || s.is_a?(Bundler::Source::Path) }.each do |source|
12
+ 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')
20
+ if !evaled.include?(gemfile_common_path) && File.exist?(gemfile_common_path)
21
+ evaled << gemfile_common_path
22
+ # eval_gemfile(gemfile_common_path) # ('', content)
23
+ eval(File.read(gemfile_common_path))
24
+ end
25
+ end
26
+
27
+ break if evaled.size == number_of_evaled
28
+ end
29
+ puts 'SUPER BUNDLER END'
30
+ end
31
+ end
32
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bundler-common_gemfile
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Andrzej Bisewski
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: commont gemfile
14
+ email: andrzej@bisewski.dev
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/bundler-common_gemfile.rb
20
+ homepage:
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.1.4
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: common gemfile
43
+ test_files: []