Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/dpl/provider/npm.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'json'
require 'shellwords'
require 'uri'

module DPL
Expand Down Expand Up @@ -30,8 +31,8 @@ def push_app
log "http://docs.travis-ci.com/user/deployment/npm/"
log "#{NPMRC_FILE} size: #{File.size(File.expand_path(NPMRC_FILE))}"

command = "env NPM_API_KEY=#{option(:api_key)} npm publish"
command << " --tag #{option(:tag)}" if options[:tag]
command = "env NPM_API_KEY=#{option(:api_key).shellescape} npm publish"
command << " --tag #{option(:tag).shellescape}" if options[:tag]
context.shell "#{command}"
FileUtils.rm(File.expand_path(NPMRC_FILE))
end
Expand Down
2 changes: 1 addition & 1 deletion spec/provider/heroku_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
expect(provider).to receive(:faraday).at_least(:once).and_return(faraday)
expect(provider).to receive(:get_url).and_return 'http://example.com/source.tgz'
expect(provider).to receive(:version).and_return 'v1.3.0'
expect(provider.context).to receive(:shell).with("curl -sS https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef -H 'Accept: application/vnd.heroku+json; version=3' -H 'User-Agent: dpl/#{DPL::VERSION}'")
expect(provider.context).to receive(:shell).with("curl https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef -H 'Accept: application/vnd.heroku+json; version=3' -H 'User-Agent: dpl/#{DPL::VERSION}'")
provider.trigger_build
expect(provider.build_id).to eq('01234567-89ab-cdef-0123-456789abcdef')
end
Expand Down