dpl 1.4.8.travis.143.2 → 1.4.8.travis.148.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f8bb9fbacc56de4fab59eef4c69c1989b06c2f6c
4
- data.tar.gz: e83f79d26a0b33e8c763ef1adcbbb82997d4d0ae
5
- SHA512:
6
- metadata.gz: 186f5b884ce229c141ce2a9e26bc7806ffd43bc05d2a413936964d2e3d69f11e9237356f26265698c41a78093b0ce66c343fc3b1392d8bb68a0564dac16f2c58
7
- data.tar.gz: db27a9518b92af2e54247f1a2c7da437dd29d7b427cb20aff2572436205ce9249e910f72ee1d9187fb621970e35dc78fd8cd7730d56e93f8572d75cef14237ed
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NDYxYzBkYTU3MTVhN2Y4ZTY3MGFiZTFhMGZlNTdjMjk5MDVlNDgyYw==
5
+ data.tar.gz: !binary |-
6
+ ODA0ZWQzY2QzYWQxYTVhNGIwYTVmNWQyOTIzMTQ4YTkyYzhiNGZkOA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ M2IxZmM2MzMzZTA1ODJmMjM0N2M1NzI3ODMxYjU4ZmFjMTM2NDc1OWI3NmVi
10
+ MmE1NDFlMWQ2NGVmNjhlN2ZjMTFkNDJmZWY1M2Q0OTE5YTRmN2E2OTMzYTdh
11
+ MTJhM2FiM2YwZjdkODNiMzFlZWQ0ZjQzYjA0YWJlNGE4MDUzOGE=
12
+ data.tar.gz: !binary |-
13
+ ZTdiMDMxYmZhZTE3YWVlYjNmMDBkNDY0Njc2NjllNGY3ZTdhNjVhMWY2ZGQ1
14
+ OTUwYWY4YmUyNjk4YzljY2Q3ZjlkNjQzZGFmNGYzYmI0MWFmMWM3NDE3ZGI0
15
+ N2JjOGRiYjhmNTVhNjE1MGI2ZGZlMzg1NmUwMGY0NjBmMGIzNDc=
data/.travis.yml CHANGED
@@ -10,5 +10,5 @@ deploy:
10
10
  secure: ZmZoDL1tilWvQrqRWDm2K4xQ5Grt9eRJzYVZPLANR0P1TM5BJBLk+UhWCWCPkkDVIBWMa5ANsiFYBxtH65Lw+uqMztSpVusk0l0LQXZGv9jMpT9445A8008U3vvfS0ke7IG8Q4bMAC7Sd6VGaiHDyZC7zmNvnqMpmVX7ShcgBME=
11
11
  gem: dpl
12
12
  on:
13
- repo: rkh/dpl
13
+ repo: travis-ci/dpl
14
14
  ruby: 2.0.0
data/README.md CHANGED
@@ -16,3 +16,4 @@ Supported providers:
16
16
  * Engine Yard
17
17
  * Cloud Foundry
18
18
  * dotCloud (experimental)
19
+ * NPM (experimental)
@@ -0,0 +1,31 @@
1
+ module DPL
2
+ class Provider
3
+ class NPM < Provider
4
+ NPMRC_FILE = '~/.npmrc'
5
+ experimental "NPM"
6
+
7
+ def needs_key?
8
+ false
9
+ end
10
+
11
+ def check_app
12
+ end
13
+
14
+ def setup_auth
15
+ File.open(File.expand_path(NPMRC_FILE), 'w') do |f|
16
+ f.puts("_auth = #{option(:api_key)}")
17
+ f.puts("email = #{option(:email)}")
18
+ end
19
+ end
20
+
21
+ def check_auth
22
+ setup_auth
23
+ log "Authenticated with email #{option(:email)}"
24
+ end
25
+
26
+ def push_app
27
+ context.shell "npm publish --force"
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+ require 'dpl/provider/npm'
3
+
4
+ describe DPL::Provider::NPM do
5
+ subject :provider do
6
+ described_class.new(DummyContext.new, :email => 'foo@blah.com', :api_key => 'test')
7
+ end
8
+
9
+ describe :check_auth do
10
+ example do
11
+ provider.should_receive(:setup_auth)
12
+ provider.should_receive(:log).with("Authenticated with email foo@blah.com")
13
+ provider.check_auth
14
+ end
15
+ end
16
+
17
+ describe :push_app do
18
+ example do
19
+ provider.context.should_receive(:shell).with("npm publish --force")
20
+ provider.push_app
21
+ end
22
+ end
23
+
24
+ describe :setup_auth do
25
+ example do
26
+ f = double(:npmrc)
27
+ File.should_receive(:open).with(File.expand_path(DPL::Provider::NPM::NPMRC_FILE)).and_return(f)
28
+ f.should_receive(:puts).with("_auth = test")
29
+ f.should_receive(:puts).with("email = foo@blah.com")
30
+ provider.setup_auth
31
+ end
32
+ end
33
+ end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8.travis.143.2
4
+ version: 1.4.8.travis.148.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-10 00:00:00.000000000 Z
11
+ date: 2013-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: deploy tool abstraction for clients
@@ -93,6 +93,7 @@ files:
93
93
  - lib/dpl/provider/heroku/anvil.rb
94
94
  - lib/dpl/provider/heroku/git.rb
95
95
  - lib/dpl/provider/nodejitsu.rb
96
+ - lib/dpl/provider/npm.rb
96
97
  - lib/dpl/provider/openshift.rb
97
98
  - lib/dpl/provider/pypi.rb
98
99
  - lib/dpl/provider/rubygems.rb
@@ -105,6 +106,7 @@ files:
105
106
  - spec/provider/dotcloud_spec.rb
106
107
  - spec/provider/heroku_anvil_spec.rb
107
108
  - spec/provider/heroku_git_spec.rb
109
+ - spec/provider/npm.rb
108
110
  - spec/provider/openshift_spec.rb
109
111
  - spec/provider/pypi_spec.rb
110
112
  - spec/provider/rubygems_spec.rb
@@ -120,12 +122,12 @@ require_paths:
120
122
  - lib
121
123
  required_ruby_version: !ruby/object:Gem::Requirement
122
124
  requirements:
123
- - - '>='
125
+ - - ! '>='
124
126
  - !ruby/object:Gem::Version
125
127
  version: 1.8.7
126
128
  required_rubygems_version: !ruby/object:Gem::Requirement
127
129
  requirements:
128
- - - '>'
130
+ - - ! '>'
129
131
  - !ruby/object:Gem::Version
130
132
  version: 1.3.1
131
133
  requirements: []