Class: DPL::Provider::NPM
Constant Summary
collapse
- NPMRC_FILE =
'~/.npmrc'
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
apt_get, #cleanup, #commit_msg, context, #create_key, #deploy, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
10
11
|
# File 'lib/dpl/provider/npm.rb', line 10
def check_app
end
|
#check_auth ⇒ Object
20
21
22
23
|
# File 'lib/dpl/provider/npm.rb', line 20
def check_auth
setup_auth
log "Authenticated with email #{option(:email)}"
end
|
#needs_key? ⇒ Boolean
6
7
8
|
# File 'lib/dpl/provider/npm.rb', line 6
def needs_key?
false
end
|
#push_app ⇒ Object
25
26
27
|
# File 'lib/dpl/provider/npm.rb', line 25
def push_app
context.shell "npm publish"
end
|
#setup_auth ⇒ Object
13
14
15
16
17
18
|
# File 'lib/dpl/provider/npm.rb', line 13
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
|