dpl 1.5.7 → 1.5.8.travis.303.1
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 +13 -5
- data/Gemfile +9 -8
- data/README.md +13 -0
- data/lib/dpl/provider.rb +1 -0
- data/lib/dpl/provider/modulus.rb +23 -0
- data/lib/dpl/provider/s3.rb +3 -1
- data/spec/provider/modulus_spec.rb +29 -0
- data/spec/provider/s3_spec.rb +6 -0
- metadata +17 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
MWE3NzVjZWU5MDNiOWQxYTc4MGI4ZDliYzUwZDU2NzI2ZjZmZjA1ZQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
MDdiNTA4NTU4ODE5MjRlZGZlMGNjZWI1YWRhOGQyOGNmZmE3ZTc2NQ==
|
|
5
7
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
MTkzODdlMWI2ZTZjZmQzOThiZGQ4NzlmZTFlYzA1OTMxODU5Njc4M2UzNDAy
|
|
10
|
+
ZjM0YWYyMjFkNTg5MWE1MWVjZmI0MzJkY2M2YTdmNWQ3YjFiZjk4MGE3ZGYw
|
|
11
|
+
YWEwOWYxOTRmNTNiNWMxYzRjMTFlNThlY2VkMjI0NjI2ZTdkNGU=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
YTg1ZWNhYTk4OTYwY2VkMjQ0Yzc4YmU5MzMzMDNiY2I0OGJmZmZiZWJiODIy
|
|
14
|
+
M2MyODU1MWYzYWVjZDIxZmVhMTAwMWM1MzUwOTc3NDNlY2JlNmU2MDhlYWQx
|
|
15
|
+
ZTY1OGU4NTVhOTU2M2U3NmFiNmJjZmVmY2U4MTZjNmY3YzFhYzc=
|
data/Gemfile
CHANGED
|
@@ -2,29 +2,30 @@ source 'https://rubygems.org'
|
|
|
2
2
|
gemspec
|
|
3
3
|
|
|
4
4
|
group :cloudfoundry do
|
|
5
|
-
gem 'cf'
|
|
5
|
+
gem 'cf', '~> 5.4.5'
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
group :heroku do
|
|
9
|
-
gem 'rendezvous'
|
|
10
|
-
gem 'heroku-api'
|
|
11
|
-
gem 'anvil-cli'
|
|
9
|
+
gem 'rendezvous', '~> 0.0.2'
|
|
10
|
+
gem 'heroku-api', '~> 0.3.16'
|
|
11
|
+
gem 'anvil-cli', '~> 0.16.1'
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
group :openshift do
|
|
15
15
|
gem 'rhc'
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
group :appfog do
|
|
19
|
+
gem 'af'
|
|
20
|
+
end
|
|
21
21
|
|
|
22
22
|
group :rubygems do
|
|
23
|
-
gem 'gems'
|
|
23
|
+
gem 'gems'
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
group :sss do
|
|
27
27
|
gem 'aws-sdk'
|
|
28
|
+
gem 'mime-types'
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
group :cloud_files do
|
data/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Dpl supports the following providers:
|
|
|
19
19
|
* [Divshot.io](#divshotio)
|
|
20
20
|
* [Rackspace Cloud Files](#rackspace-cloud-files)
|
|
21
21
|
* [AWS OpsWorks](#opsworks)
|
|
22
|
+
* [Modulus](#modulus)
|
|
22
23
|
|
|
23
24
|
## Installation:
|
|
24
25
|
|
|
@@ -72,6 +73,18 @@ As a rule of thumb, you should switch to the Git strategy if you run into issues
|
|
|
72
73
|
#### Examples:
|
|
73
74
|
dpl --provider=nodejitsu --username=<username> --api-key=<api-key>
|
|
74
75
|
|
|
76
|
+
|
|
77
|
+
### Modulus
|
|
78
|
+
|
|
79
|
+
#### Options:
|
|
80
|
+
|
|
81
|
+
* **api-key** Modulus Authentication Token
|
|
82
|
+
* **project-name** Modulus Project to Deploy
|
|
83
|
+
|
|
84
|
+
#### Example:
|
|
85
|
+
dpl --provider=modulus --api-key=<api-key> --project-name=<project-name>
|
|
86
|
+
|
|
87
|
+
|
|
75
88
|
### Engine Yard:
|
|
76
89
|
|
|
77
90
|
#### Options:
|
data/lib/dpl/provider.rb
CHANGED
|
@@ -20,6 +20,7 @@ module DPL
|
|
|
20
20
|
autoload :Divshot, 'dpl/provider/divshot'
|
|
21
21
|
autoload :CloudFiles, 'dpl/provider/cloud_files'
|
|
22
22
|
autoload :OpsWorks, 'dpl/provider/ops_works'
|
|
23
|
+
autoload :Modulus, 'dpl/provider/modulus'
|
|
23
24
|
|
|
24
25
|
def self.new(context, options)
|
|
25
26
|
return super if self < Provider
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module DPL
|
|
2
|
+
class Provider
|
|
3
|
+
class Modulus < Provider
|
|
4
|
+
npm_g 'modulus'
|
|
5
|
+
|
|
6
|
+
def check_auth
|
|
7
|
+
raise Error, "must supply an api key" unless option(:api_key)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def check_app
|
|
11
|
+
raise Error, "must supply a project name" unless option(:project_name)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def needs_key?
|
|
15
|
+
false
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def push_app
|
|
19
|
+
context.shell "MODULUS_TOKEN=#{option(:api_key)} modulus deploy -p #{option(:project_name)}"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/dpl/provider/s3.rb
CHANGED
|
@@ -4,6 +4,7 @@ module DPL
|
|
|
4
4
|
class Provider
|
|
5
5
|
class S3 < Provider
|
|
6
6
|
requires 'aws-sdk'
|
|
7
|
+
requires 'mime-types'
|
|
7
8
|
|
|
8
9
|
def api
|
|
9
10
|
@api ||= AWS::S3.new
|
|
@@ -33,7 +34,8 @@ module DPL
|
|
|
33
34
|
def push_app
|
|
34
35
|
Dir.chdir(options.fetch(:local_dir, Dir.pwd)) do
|
|
35
36
|
Dir.glob("**/*") do |filename|
|
|
36
|
-
|
|
37
|
+
content_type = MIME::Types.type_for(filename).first.to_s
|
|
38
|
+
api.buckets[option(:bucket)].objects.create(upload_path(filename), File.read(filename), :content_type => content_type) unless File.directory?(filename)
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'dpl/provider/modulus'
|
|
3
|
+
|
|
4
|
+
describe DPL::Provider::Modulus do
|
|
5
|
+
subject :provider do
|
|
6
|
+
described_class.new(DummyContext.new, :api_key => 'test-token', :project_name => 'test-project')
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
describe :check_auth do
|
|
10
|
+
it 'should require an api key' do
|
|
11
|
+
provider.options.update(:api_key => nil)
|
|
12
|
+
expect{ provider.check_auth }.to raise_error("must supply an api key")
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
describe :check_app do
|
|
17
|
+
it 'should require a project name' do
|
|
18
|
+
provider.options.update(:project_name => nil)
|
|
19
|
+
expect{ provider.check_app }.to raise_error("must supply a project name")
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
describe :push_app do
|
|
24
|
+
it 'should include the api key and project name specified' do
|
|
25
|
+
provider.context.should_receive(:shell).with("MODULUS_TOKEN=test-token modulus deploy -p test-project")
|
|
26
|
+
provider.push_app
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
data/spec/provider/s3_spec.rb
CHANGED
|
@@ -60,6 +60,12 @@ describe :needs_key? do
|
|
|
60
60
|
Dir.should_receive(:chdir).with('BUILD')
|
|
61
61
|
provider.push_app
|
|
62
62
|
end
|
|
63
|
+
|
|
64
|
+
example "Sends MIME type" do
|
|
65
|
+
Dir.should_receive(:glob).and_yield(__FILE__)
|
|
66
|
+
AWS::S3::ObjectCollection.any_instance.should_receive(:create).with(anything(), anything(), hash_including(:content_type => 'application/x-ruby'))
|
|
67
|
+
provider.push_app
|
|
68
|
+
end
|
|
63
69
|
end
|
|
64
70
|
|
|
65
71
|
describe :api do
|
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.5.
|
|
4
|
+
version: 1.5.8.travis.303.1
|
|
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: 2014-01-19 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
|
|
@@ -95,6 +95,7 @@ files:
|
|
|
95
95
|
- lib/dpl/provider/heroku.rb
|
|
96
96
|
- lib/dpl/provider/heroku/anvil.rb
|
|
97
97
|
- lib/dpl/provider/heroku/git.rb
|
|
98
|
+
- lib/dpl/provider/modulus.rb
|
|
98
99
|
- lib/dpl/provider/nodejitsu.rb
|
|
99
100
|
- lib/dpl/provider/npm.rb
|
|
100
101
|
- lib/dpl/provider/openshift.rb
|
|
@@ -114,6 +115,7 @@ files:
|
|
|
114
115
|
- spec/provider/dotcloud_spec.rb
|
|
115
116
|
- spec/provider/heroku_anvil_spec.rb
|
|
116
117
|
- spec/provider/heroku_git_spec.rb
|
|
118
|
+
- spec/provider/modulus_spec.rb
|
|
117
119
|
- spec/provider/npm.rb
|
|
118
120
|
- spec/provider/openshift_spec.rb
|
|
119
121
|
- spec/provider/ops_works_spec.rb
|
|
@@ -132,35 +134,18 @@ require_paths:
|
|
|
132
134
|
- lib
|
|
133
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
134
136
|
requirements:
|
|
135
|
-
- - '>='
|
|
137
|
+
- - ! '>='
|
|
136
138
|
- !ruby/object:Gem::Version
|
|
137
139
|
version: 1.8.7
|
|
138
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
141
|
requirements:
|
|
140
|
-
- - '
|
|
142
|
+
- - ! '>'
|
|
141
143
|
- !ruby/object:Gem::Version
|
|
142
|
-
version:
|
|
144
|
+
version: 1.3.1
|
|
143
145
|
requirements: []
|
|
144
146
|
rubyforge_project:
|
|
145
|
-
rubygems_version: 2.
|
|
147
|
+
rubygems_version: 2.2.1
|
|
146
148
|
signing_key:
|
|
147
149
|
specification_version: 4
|
|
148
150
|
summary: deploy tool
|
|
149
|
-
test_files:
|
|
150
|
-
- spec/cli_spec.rb
|
|
151
|
-
- spec/provider/appfog_spec.rb
|
|
152
|
-
- spec/provider/cloud_files_spec.rb
|
|
153
|
-
- spec/provider/cloudcontrol_spec.rb
|
|
154
|
-
- spec/provider/divshot_spec.rb
|
|
155
|
-
- spec/provider/dotcloud_spec.rb
|
|
156
|
-
- spec/provider/heroku_anvil_spec.rb
|
|
157
|
-
- spec/provider/heroku_git_spec.rb
|
|
158
|
-
- spec/provider/npm.rb
|
|
159
|
-
- spec/provider/openshift_spec.rb
|
|
160
|
-
- spec/provider/ops_works_spec.rb
|
|
161
|
-
- spec/provider/pypi_spec.rb
|
|
162
|
-
- spec/provider/rubygems_spec.rb
|
|
163
|
-
- spec/provider/s3_spec.rb
|
|
164
|
-
- spec/provider_spec.rb
|
|
165
|
-
- spec/spec_helper.rb
|
|
166
|
-
has_rdoc:
|
|
151
|
+
test_files: []
|