dpl-npm 1.10.14 → 1.10.15.travis.5877.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dpl/provider/npm.rb +6 -2
- data/lib/dpl/version.rb +1 -1
- data/spec/provider/npm_spec.rb +13 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99deb4a947a4d0fff7c8d9baee4d52d54422f795c3014473cc7907231d9049f3
|
4
|
+
data.tar.gz: 44f91f07df5d0001f4ec35247f5184564567d05383cf3a0f7afd7e6b9d5579bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f93d6298d3091d9fe72ca0477009bda2a58d04cb11b15e55b4b81cf36f668c95f6e74c96713a96a763ca472f5aab59fd03508b1b1b57c1cd17f2add53a7c7dca
|
7
|
+
data.tar.gz: 2b1d6991acfbee9b25c00e7b89d0f3cae784057d57e08e9e9b878e06ba088f1fe8cb22da488fea796cb3d4a7822a1fb478cd6556070c22f2129da2a0ceac072c
|
data/lib/dpl/provider/npm.rb
CHANGED
@@ -22,7 +22,7 @@ module DPL
|
|
22
22
|
|
23
23
|
def check_auth
|
24
24
|
setup_auth
|
25
|
-
log "Authenticated with email #{option(:email)} and API key #{
|
25
|
+
log "Authenticated with email #{option(:email)} and API key #{api_key[-4..-1].rjust(20, '*')}"
|
26
26
|
end
|
27
27
|
|
28
28
|
def push_app
|
@@ -30,7 +30,7 @@ module DPL
|
|
30
30
|
log "http://docs.travis-ci.com/user/deployment/npm/"
|
31
31
|
log "#{NPMRC_FILE} size: #{File.size(File.expand_path(NPMRC_FILE))}"
|
32
32
|
|
33
|
-
command = "env NPM_API_KEY=#{
|
33
|
+
command = "env NPM_API_KEY=#{api_key} npm publish"
|
34
34
|
command << " --tag #{option(:tag)}" if options[:tag]
|
35
35
|
context.shell "#{command}"
|
36
36
|
FileUtils.rm(File.expand_path(NPMRC_FILE))
|
@@ -59,6 +59,10 @@ module DPL
|
|
59
59
|
def npm_version
|
60
60
|
`npm --version`
|
61
61
|
end
|
62
|
+
|
63
|
+
def api_key
|
64
|
+
option(:api_key, :api_token)
|
65
|
+
end
|
62
66
|
end
|
63
67
|
end
|
64
68
|
end
|
data/lib/dpl/version.rb
CHANGED
data/spec/provider/npm_spec.rb
CHANGED
@@ -10,6 +10,19 @@ describe DPL::Provider::NPM do
|
|
10
10
|
described_class.new(DummyContext.new, :email => 'foo@blah.com', :api_key => 'test')
|
11
11
|
end
|
12
12
|
|
13
|
+
describe "#api_key" do
|
14
|
+
example do
|
15
|
+
expect(provider).to receive(:api_key).and_return("test")
|
16
|
+
provider.api_key
|
17
|
+
end
|
18
|
+
|
19
|
+
example do
|
20
|
+
alt = described_class.new(DummyContext.new, :api_token => 'test')
|
21
|
+
expect(alt).to receive(:api_key).and_return("test")
|
22
|
+
alt.api_key
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
13
26
|
describe "#check_auth" do
|
14
27
|
example do
|
15
28
|
expect(provider).to receive(:setup_auth)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpl-npm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.15.travis.5877.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dpl
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.10.
|
19
|
+
version: 1.10.15.travis.5877.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.10.
|
26
|
+
version: 1.10.15.travis.5877.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,13 +175,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '2.2'
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - "
|
178
|
+
- - ">"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 1.3.1
|
181
181
|
requirements: []
|
182
|
-
|
182
|
+
rubyforge_project:
|
183
|
+
rubygems_version: 2.7.7
|
183
184
|
signing_key:
|
184
185
|
specification_version: 4
|
185
186
|
summary: deploy tool
|
186
|
-
test_files:
|
187
|
-
- spec/provider/npm_spec.rb
|
187
|
+
test_files: []
|