When I released the pre-release version 2.3.0.pre.1 it fails when running:
gem install platform-api --pre
$ ruby -e 'require "platform-api"'
Loading file /Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/lib/platform-api.rb
Loading file /Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/config/client-config.rb
Traceback (most recent call last):
2: from -e:1:in `<main>'
1: from /Users/rschneeman/.rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/rschneeman/.rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- platform-api (LoadError)
9: from -e:1:in `<main>'
8: from /Users/rschneeman/.rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
7: from /Users/rschneeman/.rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
6: from /Users/rschneeman/.rubies/ruby-2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
5: from /Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/lib/platform-api.rb:20:in `<top (required)>'
4: from /Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/lib/platform-api.rb:20:in `require_relative'
3: from /Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/config/client-config.rb:9:in `<top (required)>'
2: from /Users/rschneeman/.gem/ruby/2.7.1/gems/heroics-0.1.1/lib/heroics.rb:16:in `default_configuration'
1: from /Users/rschneeman/.gem/ruby/2.7.1/gems/heroics-0.1.1/lib/heroics.rb:16:in `tap'
/Users/rschneeman/.gem/ruby/2.7.1/gems/platform-api-2.3.0.pre.1/config/client-config.rb:29:in `block in <top (required)>': uninitialized constant PlatformAPI::VERSION (NameError)
This failure wasn't showing up in the tests because the file lib/platform-api/version.rb is manually being loaded in the Gemspec which is executed before specs.
To test this behavior (of requiring the lib from a new project) we can use an unbundled env and manually set the require path:
When I released the pre-release version 2.3.0.pre.1 it fails when running:
This failure wasn't showing up in the tests because the file
lib/platform-api/version.rb
is manually being loaded in the Gemspec which is executed before specs.To test this behavior (of requiring the lib from a new project) we can use an unbundled env and manually set the require path: