ol-whisk_deploy 0.6.25 → 0.6.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.markdown +12 -1
- data/lib/whiskey_disk.rb +8 -1
- data/spec/whiskey_disk_spec.rb +8 -1
- data/whisk_deploy.gemspec +5 -2
- metadata +45 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
M2U4Y2VmZDdmNWU5OTRkNzdmZGJhZDNiMjhlN2NlMzNiZjgyOWIxMg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NWNjYjkzZTU2YmM5YjU3ZDdiYzA3MWJiNmY1MTEwZTcyNGE0NWE2Zg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDk2YmFjMGRiNjljMjdhYjVlYTVlODAxOTNmZWI4OTA3MWJmNGU4NjRjZTY0
|
10
|
+
MDJjMmI2NTYxYjZkYjNmZTg0OGE0YzJhZWJhZGM1MmYyZWE0NWExMzFhMTU3
|
11
|
+
YWRkMmJjMzU4MzQyMzE1NDZmNzlmMWNjOTU3MGI4ODkyMmYwNTU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YWEyMTY5M2YyZmYyZmE3OWIyYmM2ZmIwZTJjNGY0NmM5ZjRhMDg4NjNiODBm
|
14
|
+
ODQ2MWY5MTZmZWFhNmU0OWY2NzJlYjdjNzM0YTYyZGRmMzQxYzlkZDRkYWQ0
|
15
|
+
MWMzMDI5Njc2NjUzMTNkYzRmZjlhZWFkZGI3MzYzNmRiZGMyNTk=
|
data/README.markdown
CHANGED
@@ -125,7 +125,7 @@ If you're running on OS X or Linux you probably have all of these installed alre
|
|
125
125
|
|
126
126
|
As a gem:
|
127
127
|
|
128
|
-
% gem install
|
128
|
+
% gem install whisk_deploy
|
129
129
|
|
130
130
|
### Configuration ###
|
131
131
|
|
@@ -227,6 +227,17 @@ If you need special flags passed to ssh for a given domain, specify an array of
|
|
227
227
|
- "-p 443"
|
228
228
|
deploy_to: "/var/www/www.ogtastic.com"
|
229
229
|
repository: "git@ogtastic.com:www.ogtastic.com.git"
|
230
|
+
|
231
|
+
Likewise, if you need special environment variables per domain, specify a hash of `env_vars` names and values:
|
232
|
+
|
233
|
+
|
234
|
+
qa:
|
235
|
+
domain:
|
236
|
+
- name: "ogc@qa.ogtastic.com"
|
237
|
+
env_vars:
|
238
|
+
WORKER_COUNT: 5
|
239
|
+
deploy_to: "/var/www/www.ogtastic.com"
|
240
|
+
repository: "git@ogtastic.com:www.ogtastic.com.git"
|
230
241
|
|
231
242
|
### Specifying domains, with or without roles ###
|
232
243
|
|
data/lib/whiskey_disk.rb
CHANGED
@@ -127,9 +127,16 @@ class WhiskeyDisk
|
|
127
127
|
return '' unless roles and !roles.empty?
|
128
128
|
"export WD_ROLES='#{roles.join(':')}'; "
|
129
129
|
end
|
130
|
+
|
131
|
+
def encode_env_vars(vars)
|
132
|
+
return '' unless vars and !vars.empty?
|
133
|
+
vars.map do |name, val|
|
134
|
+
"export #{name}='#{val}'; "
|
135
|
+
end.join
|
136
|
+
end
|
130
137
|
|
131
138
|
def build_command(domain, cmd)
|
132
|
-
"#{'set -x; ' if debugging?}" + encode_roles(domain['roles']) + cmd
|
139
|
+
"#{'set -x; ' if debugging?}" + encode_env_vars(domain['env_vars']) + encode_roles(domain['roles']) + cmd
|
133
140
|
end
|
134
141
|
|
135
142
|
def rake_command
|
data/spec/whiskey_disk_spec.rb
CHANGED
@@ -1119,7 +1119,14 @@ describe '@whiskey_disk' do
|
|
1119
1119
|
it 'includes domain role settings when the domain has roles' do
|
1120
1120
|
@domain = { 'name' => @domain_name, 'roles' => [ 'web', 'db' ] }
|
1121
1121
|
@whiskey_disk.configuration = { 'domain' => [ @domain ] }
|
1122
|
-
@whiskey_disk.build_command(@domain, 'ls').
|
1122
|
+
expect(@whiskey_disk.build_command(@domain, 'ls')).to match(/export WD_ROLES='web:db'; ls/)
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
it 'incldues other arbitrary env vars when specified' do
|
1126
|
+
@domain = { 'name' => @domain_name, 'roles' => [ 'web', 'db' ], 'env_vars' => { 'WORKER_COUNT' => 5 } }
|
1127
|
+
@whiskey_disk.configuration = { 'domain' => [ @domain ] }
|
1128
|
+
cmd = @whiskey_disk.build_command(@domain, 'ls')
|
1129
|
+
expect(cmd).to include("export WORKER_COUNT='5';")
|
1123
1130
|
end
|
1124
1131
|
end
|
1125
1132
|
|
data/whisk_deploy.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ol-whisk_deploy"
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.26"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rick Bradley", "Jesse R. Adams"]
|
@@ -211,5 +211,8 @@ Gem::Specification.new do |s|
|
|
211
211
|
else
|
212
212
|
s.add_dependency(%q<rake>, [">= 0"])
|
213
213
|
end
|
214
|
+
|
215
|
+
s.add_development_dependency "bacon", ["~> 1.2.0"]
|
216
|
+
s.add_development_dependency "facon", ["~> 0.5.0"]
|
217
|
+
s.add_development_dependency "rspec", ["~> 2.0"]
|
214
218
|
end
|
215
|
-
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ol-whisk_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.26
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rick Bradley
|
@@ -15,7 +14,6 @@ dependencies:
|
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rake
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ! '>='
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,11 +21,52 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ! '>='
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: bacon
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.2.0
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.2.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: facon
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 0.5.0
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.5.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.0'
|
31
70
|
description: Opinionated gem for doing fast git-based server deployments.
|
32
71
|
email: jesse@techno-geeks.org
|
33
72
|
executables:
|
@@ -216,25 +255,24 @@ files:
|
|
216
255
|
- whisk_deploy.gemspec
|
217
256
|
homepage: http://github.com/jesseadams/whiskey
|
218
257
|
licenses: []
|
258
|
+
metadata: {}
|
219
259
|
post_install_message:
|
220
260
|
rdoc_options: []
|
221
261
|
require_paths:
|
222
262
|
- lib
|
223
263
|
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
-
none: false
|
225
264
|
requirements:
|
226
265
|
- - ! '>='
|
227
266
|
- !ruby/object:Gem::Version
|
228
267
|
version: '0'
|
229
268
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
|
-
none: false
|
231
269
|
requirements:
|
232
270
|
- - ! '>='
|
233
271
|
- !ruby/object:Gem::Version
|
234
272
|
version: '0'
|
235
273
|
requirements: []
|
236
274
|
rubyforge_project:
|
237
|
-
rubygems_version:
|
275
|
+
rubygems_version: 2.2.2
|
238
276
|
signing_key:
|
239
277
|
specification_version: 3
|
240
278
|
summary: embarrassingly fast deployments.
|