Class: DPL::Provider::NPM
Constant Summary
collapse
- NPMRC_FILE =
'~/.npmrc'
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
#cleanup, context, #create_key, #deploy, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_ssh, #sha, shell, #uncleanup
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
11
12
|
# File 'lib/dpl/provider/npm.rb', line 11
def check_app
end
|
#check_auth ⇒ Object
21
22
23
24
|
# File 'lib/dpl/provider/npm.rb', line 21
def check_auth
setup_auth
log "Authenticated with email #{option(:email)}"
end
|
#needs_key? ⇒ Boolean
7
8
9
|
# File 'lib/dpl/provider/npm.rb', line 7
def needs_key?
false
end
|
#push_app ⇒ Object
26
27
28
|
# File 'lib/dpl/provider/npm.rb', line 26
def push_app
context.shell "npm publish --force"
end
|
#setup_auth ⇒ Object
14
15
16
17
18
19
|
# File 'lib/dpl/provider/npm.rb', line 14
def setup_auth
File.open(File.expand_path(NPMRC_FILE), 'w') do |f|
f.puts("_auth = #{option(:api_key)}")
f.puts("email = #{option(:email)}")
end
end
|