rb_gemspec 0.2.0 → 0.2.2

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/src/gemspec/metadata.rb +8 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 307b525b78be33384724887b9a41a681b10babb73cc8760e5a8b9a5e44ee2868
4
- data.tar.gz: 054c7203df55284d087b30deda85b09cd46e97e7fbfafcfebff09588caa7a888
3
+ metadata.gz: f330877902941fb483c59c7c943477e3db5f13e6336b3d65cb01b6d5cbde217f
4
+ data.tar.gz: dba66ff634c161bf10d7950ba58c2a26c0539c538260167777ffdc5307c87f35
5
5
  SHA512:
6
- metadata.gz: f605f6afa55dce2335cff2a66bfe0f66dced936eff580df7518d5dd3c7cd42c61d0f663d6e595f1d9bf5e54b2727b80be53512ff696dfe13053e60a26ffd7520
7
- data.tar.gz: 4015c3bbdcc565ea66ddee51ffdd6a77a6f723791ad307253fdccb40af62331047cd20125857da7c81e0361077ca767d7339d7e940ea180fee3de57e824f06d3
6
+ metadata.gz: e99ccc348df2d1ef72aae1f7afe2e5fba67270320a3e13479e2df1f5fcc45ce82d9a6731ea642a9488936c394fe2b0e77c4e7eac7d429d1c2fafa6c0645c4fdd
7
+ data.tar.gz: 44ef330c8f454c3a4da0273c1525bb7b16e70dd5c62bb7a1232050d28ad031af3713001a370a75ab933d0fccb0ccefa6d4f0646275249ab1c88824700c690ebb
@@ -13,16 +13,16 @@ module Gemspec
13
13
  spec = Gem.loaded_specs[@lib_name]
14
14
 
15
15
  # Development: gem loaded from a local path (not from the gems directory).
16
- if spec && !spec.gem_dir.start_with?(Gem.paths.home)
17
- Gem::Specification::load(File.join(spec.gem_dir, "#{@lib_name}.gemspec"))
16
+ gemspec_path = File.join(spec.gem_dir, "#{@lib_name}.gemspec") if spec
17
+ if spec && !spec.gem_dir.start_with?(Gem.paths.home) && File.exist?(gemspec_path)
18
+ Gem::Specification::load(gemspec_path)
18
19
  # Production.
19
20
  else
20
- spec ||
21
- begin
22
- Gem::Specification::find_by_name(@lib_name)
23
- rescue StandardError, Gem::LoadError
24
- nil
25
- end
21
+ spec || begin
22
+ Gem::Specification::find_by_name(@lib_name)
23
+ rescue StandardError, Gem::LoadError, Gem::MissingSpecError
24
+ nil
25
+ end
26
26
  end
27
27
  )
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_gemspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurélien Delogu