dpl-npm 1.10.14 → 1.10.15.travis.5877.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ec6e29046ad2c88cd1e3fc1d895cd91304e4385bb6b4b0506095a931ff0ae43
4
- data.tar.gz: 45a2d5cc2a6eadfd46a604a3f5a93b1ca0a99f720af17c4ca466c80166d637bb
3
+ metadata.gz: 99deb4a947a4d0fff7c8d9baee4d52d54422f795c3014473cc7907231d9049f3
4
+ data.tar.gz: 44f91f07df5d0001f4ec35247f5184564567d05383cf3a0f7afd7e6b9d5579bd
5
5
  SHA512:
6
- metadata.gz: 8aa4df624b0469c89054dd052b9c981c48f5b0291c6225412e8fc1bc3a859c001f55d586adcb808b6c60bb568f3ca3e51afae7e461ba89afd52067d23d336d2c
7
- data.tar.gz: 5f6c8209a305e97637c6739d10b079b3f65ef48278318773523a203f6624ef66f3569fe52f8cb3605259712d347b591d5dd4dfcfeec36a0526b6175ba107cb63
6
+ metadata.gz: f93d6298d3091d9fe72ca0477009bda2a58d04cb11b15e55b4b81cf36f668c95f6e74c96713a96a763ca472f5aab59fd03508b1b1b57c1cd17f2add53a7c7dca
7
+ data.tar.gz: 2b1d6991acfbee9b25c00e7b89d0f3cae784057d57e08e9e9b878e06ba088f1fe8cb22da488fea796cb3d4a7822a1fb478cd6556070c22f2129da2a0ceac072c
@@ -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 #{option(:api_key)[-4..-1].rjust(20, '*')}"
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=#{option(:api_key)} npm publish"
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
@@ -1,3 +1,3 @@
1
1
  module DPL
2
- VERSION = '1.10.14'
2
+ VERSION = '1.10.15.travis.5877.5'
3
3
  end
@@ -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.14
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: 2019-11-20 00:00:00.000000000 Z
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.14
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.14
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: '0'
180
+ version: 1.3.1
181
181
  requirements: []
182
- rubygems_version: 3.0.3
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: []