@@ -13,7 +13,7 @@ def self.install(*args)
1313
1414 def initialize ( root : Dir . pwd )
1515 @root = Pathname ( root )
16- @test_app_path = @root . join ( ENV [ 'DUMMY_PATH' ] || 'spec/dummy' )
16+ @test_app_path = @root . join ( ENV . fetch ( 'DUMMY_PATH' , 'spec/dummy' ) )
1717 @gemspec = Bundler . load_gemspec ( @root . glob ( "{,*}.gemspec" ) . first )
1818 end
1919
@@ -43,7 +43,7 @@ def install_test_app_task
4343 cd root
4444 end
4545
46- directory ENV [ 'DUMMY_PATH' ] do
46+ directory ENV . fetch ( 'DUMMY_PATH' , nil ) do
4747 Rake ::Task [ 'extension:test_app' ] . invoke
4848 end
4949 end
@@ -61,7 +61,7 @@ def install_rspec_task
6161 require 'rspec/core/rake_task'
6262
6363 namespace :extension do
64- ::RSpec ::Core ::RakeTask . new ( :specs , [ ] => FileList [ ENV [ 'DUMMY_PATH' ] ] ) do |t |
64+ ::RSpec ::Core ::RakeTask . new ( :specs , [ ] => FileList [ ENV . fetch ( 'DUMMY_PATH' , nil ) ] ) do |t |
6565 # Ref: https://circleci.com/docs/2.0/configuration-reference#store_test_results
6666 # Ref: https://github.com/solidusio/circleci-orbs-extensions#test-results-rspec
6767 if ENV [ 'TEST_RESULTS_PATH' ]
@@ -82,7 +82,7 @@ def install_changelog_task
8282
8383 config . user = repo . owner
8484 config . project = repo . name
85- config . future_release = "v#{ ENV [ 'UNRELEASED_VERSION' ] || gemspec . version } "
85+ config . future_release = "v#{ ENV . fetch ( 'UNRELEASED_VERSION' ) { gemspec . version } } "
8686
8787 rescue Octokit ::InvalidRepository
8888 warn <<~WARN
0 commit comments