google-cloud-core 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e684de5ea2e3883f6b03ea50daf2d65d3c3f0a8f6b2d7895eb7a32babf738e80
4
- data.tar.gz: d7e9f920f7184834883fd2d42fdc704a21d306c9cf23f3a19bcf3d0caf4d7f49
3
+ metadata.gz: f32ca008375d4ef2bcb7390f0e83552cfef3bc17742071d204a7fc95e874959b
4
+ data.tar.gz: 88ac872ed434f61e756a2804eff44692b0443b8f3a495db6412a81d70ac033ed
5
5
  SHA512:
6
- metadata.gz: 3e48036052d490d1aaf559f5c6af68d1f8391afa829023d1a05bed332eab97f917ac8c1fa66e01378b233405484090de28346dee2ec60cd5d5ebd1cdd046a8c4
7
- data.tar.gz: 1a430e420b4044505369614a93001977f19e3386554e0b36e380adc83a0e539ffb24105711e15987499cd0ebdfd64246d24fcff0f53819c5431667f51a0809d6
6
+ metadata.gz: 58850905b09f8ee7eac62a0c9fe54533b25d7c782f69347c16726bda05d1838991d2b7550717dd1378b96012914ccd12e426dc53e05cfda9411eb82558991dd7
7
+ data.tar.gz: b0538835819e1522d59de64d11ba8ed99ac33b26bf46b589237947821687f4a45f0324b459726c7500644c57971ad1bfd358daf9db591e173bd1ce5ab8e2db99
@@ -189,17 +189,28 @@ module Google
189
189
  # @private
190
190
  #
191
191
  def self.auto_load_gems
192
- previously_loaded_files = Array(caller).map do |backtrace_line|
193
- File.realpath backtrace_line.split(":").first
194
- end.uniq
192
+ currently_loaded_files = loaded_files
195
193
 
196
194
  auto_load_files.each do |auto_load_file|
197
195
  auto_load_file = File.realpath auto_load_file
198
- next if previously_loaded_files.include? auto_load_file
196
+ next if currently_loaded_files.include? auto_load_file
199
197
  require auto_load_file
200
198
  end
201
199
  end
202
200
 
201
+ ##
202
+ # Find files that are currently loaded.
203
+ # @private
204
+ #
205
+ def self.loaded_files
206
+ files = Array(caller).map do |backtrace_line|
207
+ backtrace_line.split(":").first
208
+ end
209
+ files.uniq!
210
+ files.select! { |file| File.file? file }
211
+ files.map { |file| File.realpath file }
212
+ end
213
+
203
214
  ##
204
215
  # Find all google-cloud-* files for available gems.
205
216
  # @private
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Core
19
- VERSION = "1.2.4".freeze
19
+ VERSION = "1.2.5".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-10 00:00:00.000000000 Z
12
+ date: 2018-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-env