sumodev 1.6.2 → 1.6.3
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 +4 -4
- data/lib/sumodev/command.rb +1 -4
- data/lib/sumodev/commands/box.rb +7 -5
- data/lib/sumodev/commands/project.rb +11 -31
- data/lib/sumodev/commands/push.rb +15 -13
- data/lib/sumodev/commands/ssh.rb +0 -1
- data/lib/sumodev/generator.rb +1 -1
- data/lib/sumodev/version.rb +1 -1
- data/lib/sumodev.rb +0 -2
- metadata +2 -4
- data/lib/sumodev/application.rb +0 -25
- data/lib/sumodev/commands/factr.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4d0319a0df90be24f0ab99802598b71c86870a3
|
4
|
+
data.tar.gz: 8bc82ee8ff6806df9a7af8aaebdf06031572784b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ce822a8684c9493ebc9c26c84ecd4c122ef5f3720b0287fa0d1d0a2c53adafae37d516057d8f33a079061736b8c698c604cb9484aad714b9f40b7c120583405
|
7
|
+
data.tar.gz: b169f77ae72267e4536bc02bb33d8b7078acdc3e2e38c4dc7b2e2072db2994246fcf33585db98b19eb48e9bc6f518a106ac73243e368967bcd2c2cbb2196d80f
|
data/lib/sumodev/command.rb
CHANGED
@@ -34,10 +34,7 @@ class Sumodev::Command < Thor
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def colorize(message)
|
37
|
-
message
|
38
|
-
.gsub(/\*(.*)\*/) { "\033[33m\033[1m#{$1}\033[22m\033[0m" }
|
39
|
-
|
40
|
-
return message
|
37
|
+
message.gsub(/\*(.*)\*/) { "\033[33m\033[1m#{$1}\033[22m\033[0m" }
|
41
38
|
end
|
42
39
|
end
|
43
40
|
end
|
data/lib/sumodev/commands/box.rb
CHANGED
@@ -57,11 +57,13 @@ class Sumodev::Commands::Box < Sumodev::Command
|
|
57
57
|
%x(vagrant plugin install vagrant-berkshelf)
|
58
58
|
|
59
59
|
# install .sumorc file
|
60
|
-
File.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
unless File.exists?(File.expand_path("~/.sumorc"))
|
61
|
+
File.open(File.expand_path("~/.sumorc"), 'w') do |f|
|
62
|
+
f.write <<-SUMORC
|
63
|
+
export SUMO_VAGRANT_PATH=""
|
64
|
+
SUMORC
|
65
|
+
end
|
66
|
+
end
|
65
67
|
|
66
68
|
# setup resolver
|
67
69
|
File.open("/tmp/vagrant-resolver", 'w') do |f|
|
@@ -169,11 +169,11 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
169
169
|
|
170
170
|
no_commands do
|
171
171
|
def get_client(path)
|
172
|
-
|
172
|
+
get_var(path, "client")
|
173
173
|
end
|
174
174
|
|
175
175
|
def get_project(path)
|
176
|
-
|
176
|
+
get_var(path, "project")
|
177
177
|
end
|
178
178
|
|
179
179
|
def get_var(path, field)
|
@@ -227,10 +227,7 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
227
227
|
raise "No project found in the Capfile"
|
228
228
|
end
|
229
229
|
|
230
|
-
|
231
|
-
get_client(path),
|
232
|
-
get_project(path)
|
233
|
-
]
|
230
|
+
[get_client(path), get_project(path)]
|
234
231
|
end
|
235
232
|
|
236
233
|
def populate_capfile(path, client, project, repo, errbit_api_key)
|
@@ -250,17 +247,13 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
250
247
|
end
|
251
248
|
|
252
249
|
def install_bundles(path)
|
253
|
-
unless File.file?("#{path}/Gemfile")
|
254
|
-
return
|
255
|
-
end
|
250
|
+
return unless File.file?("#{path}/Gemfile")
|
256
251
|
|
257
252
|
run_command_without_output("bundle install", path, "--> Installing gems")
|
258
253
|
end
|
259
254
|
|
260
255
|
def install_node_modules(path)
|
261
|
-
unless File.file?("#{path}/package.json")
|
262
|
-
return
|
263
|
-
end
|
256
|
+
return unless File.file?("#{path}/package.json")
|
264
257
|
|
265
258
|
run_command_without_output(
|
266
259
|
[
|
@@ -271,9 +264,7 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
271
264
|
end
|
272
265
|
|
273
266
|
def create_npm_shrinkwrap(path)
|
274
|
-
unless File.file?("#{path}/package.json")
|
275
|
-
return
|
276
|
-
end
|
267
|
+
return unless File.file?("#{path}/package.json")
|
277
268
|
|
278
269
|
run_command_without_output([
|
279
270
|
"npm shrinkwrap --dev",
|
@@ -283,23 +274,16 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
283
274
|
end
|
284
275
|
|
285
276
|
def install_bower_packages(path)
|
286
|
-
unless File.file?("#{path}/bower.json")
|
287
|
-
return
|
288
|
-
end
|
277
|
+
return unless File.file?("#{path}/bower.json")
|
289
278
|
|
290
279
|
run_command_without_output("bower install", path, "--> Installing bower packages")
|
291
280
|
end
|
292
281
|
|
293
282
|
def install_composer_packages(path, run_scripts)
|
294
|
-
unless File.file?("#{path}/composer.json")
|
295
|
-
return
|
296
|
-
end
|
283
|
+
return unless File.file?("#{path}/composer.json")
|
297
284
|
|
298
285
|
cmd = "composer install"
|
299
|
-
|
300
|
-
if !run_scripts
|
301
|
-
cmd = "#{cmd} --no-scripts"
|
302
|
-
end
|
286
|
+
cmd = "#{cmd} --no-scripts" unless run_scripts
|
303
287
|
|
304
288
|
run_command_without_output(cmd, path, "--> Installing composer dependencies")
|
305
289
|
end
|
@@ -319,9 +303,7 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
319
303
|
end
|
320
304
|
|
321
305
|
def move_project(source, destination)
|
322
|
-
if File.directory?(destination)
|
323
|
-
raise "Project folder already exists."
|
324
|
-
end
|
306
|
+
raise "Project folder already exists." if File.directory?(destination)
|
325
307
|
|
326
308
|
run_command_without_output(
|
327
309
|
[
|
@@ -346,9 +328,7 @@ class Sumodev::Commands::Project < Sumodev::Command
|
|
346
328
|
end
|
347
329
|
|
348
330
|
def mark_as_installed(path)
|
349
|
-
unless File.file?("#{path}/VERSION.md")
|
350
|
-
return
|
351
|
-
end
|
331
|
+
return unless File.file?("#{path}/VERSION.md")
|
352
332
|
|
353
333
|
content = File.read("#{path}/VERSION.md")
|
354
334
|
min_version = Gem::Version.new('3.6')
|
@@ -8,18 +8,20 @@ class Sumodev::Commands::Push < Thor::Group
|
|
8
8
|
|
9
9
|
class_option :group
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
DEV_TEAM = {
|
12
|
+
:Jan => {:groups => ['admin', 'developer', 'root'], :identity => 'jan@defv.be', :key => 'AAAAB3NzaC1kc3MAAACBAP41tq+1L7MqdI2+ugo0wq5IDcLSWpXXxSqHwrDVpqLcNNjpCd1QMnJ0ZY0HaRZ9YVwMFzu/cyDTgD9JZnQjcBjNhKfgOC2GX3IEsJAEM/O2kzmikTK4xFqIeeTdIqqICxlMimrFNqKoXJARueNlPITwGkkEiLy9EydTs9Cj3cHHAAAAFQD7RLZI6BtwVjgRe4XPXZdJBFN2CwAAAIEAvWaJjP0vueLwDYB2FDIm8VT8Wm4glne9Ilo0hylM2HVffdCICqjIIjn+bcYTg3SfzQcXcUYsk1sKQ0nKdICOl+dfiQs3/rTW3NNner1UewDeas9nSJN3e2Y4hyXS1tI9UOXzN76XHJM8GBz7RAhFB4ZHKVeZHsyrG2yXKiQTO8IAAACAUcAms34UNsbBLGZ3MOPJ18A2aYr6ju+N2VPkSd74sC1K6E0DSda/xJPKffZUPCWqmEdjhkXDvnNq73R4YG9x8dvXGCSzdSXMJfr9lYQNt9PT8D18UVUuZHgC8PjKEL7Xw8xbd2yOp58SADMpEZdKSMmhHsgFuW1T2TKGM72Pmd4=', :protocol => 'dss'},
|
13
|
+
:Tijs => {:groups => ['admin', 'developer', 'root'], :identity => 'tijs@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAABIwAAAQEAueoZUITVE/YVZVZVi4cngE7FPK5+a3mt0mTtELdFM4JmXg7UmrQ1On2IwIdHw5Cq+VnrutRgWvQkfp+WaC2tzOrlzccpMeMv5lTRH7bRp6qR4FivJ/Aq7YeUrNJpzncUVTwyeHrveuhfCxEQoOIM2gN0Y54NGDTOp01D7GHApsYkObsw/3N7jgQVoL6xKPwRTMI52tFzUlkv+df78vx87X7bYK05dO4Ol8U0yFyKlV17+BEM4UuI/aTXhkNsBVNCqiksaqQwEGDK8IqyrNFYhbRwYDunTXc8zdd6imYfEJUSNdjOzTXUNUc15ssTMBsGpfvF/2bhYRlHuRWZP9BUqw==', :protocol => 'rsa'},
|
14
|
+
:Jens => {:groups => ['admin', 'root'], :identity => 'jens@dehaese.eu', :key => 'AAAAB3NzaC1yc2EAAAABIwAAAIEAojZQXjhcy3fpHNEBqlj2C3EV+G+vOTSBvcn+U3Sq7eml+NrQqGoasAvC+c6bajJTRB0ZujynsUAWghDM43zY1SIbZl6PC0jdZg7qGjzlpOFdG96b84agiE6Dnz8Mjnb6846tJdslRV2Yyc9Y8iSgW3s3mszmW2hqHpZ4EqbVuPc=', :protocol => 'rsa'},
|
15
|
+
:Mathias => {:groups => ['developer'], :identity => 'mathias@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDLBHWXILbcsYfoDYCgJq4B3Q9ElcZq0hRWo8otXWsOP1pYU8Kq2thWbIB+RkuZr8Y7DMI2XtGXSquWJdx0Beddxt+yVoE/eReorVuB74bnEVXYtcZ8+mNHU6paC1T4XHMWjEXSgaEaSPdxnQxPPzQ+YDuJkYWaCrLxDyWe4sqio0R5SA5CasTkei5dHIfIzj8a16JvTj/FlbNrGHzdSwWY04QoSRdN3rpWJ4krzlHz5NIJmBhUxW15d9NgmKPGJYHmUyY1nfXdb82/zUS1vt6A/46hMJzRXhQuxzNVNBFN2q8d/bXhsNW6AZ467auWO3NLBUOfGHMX+Ga6FQiyCdhd', :protocol => 'rsa'},
|
16
|
+
:Jonas => {:groups => ['developer'], :identity => 'jonas@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCtGlJ6rNof3BcHTh7mPELGfVOThfP9LnRZOXHYnzahok1XjWxhQlafdJYblFyhnC0qpo0IqHO6dqNzYXq3JAXDRT2b3Cuq7M1v9f91Fk3EVtP53k+Q8FdFSgjdGZj/JhrP3Y7yctXKXaUCpqBBTaVd+Wy2KEIPHBAmspCAKHcbrBmOUzuWhREI5+ZU3SQ85c8fkTFifln2Tlrc15StfgwQ/epAMZYuYzWZLwfamBLqQCGTIfUNMF4JdFiuQuDLr5enH3d5gM8GjQr/Z17K8MLZhNmKhqrlTOJfX8egD82TL/SYNpkHgnmyYfj4MF85zu5JuaR2Ab18gAYVyoCJfAzR', :protocol => 'rsa'},
|
17
|
+
:Jelmer => {:groups => ['developer'], :identity => 'jelmer@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDEPm7EZctIAbdiTYIL/Oelaqiu39JjrSqxD0N80m66w/KLdvQiAEPWRinBKPCzBsmcMKuA0MMoDzykTLgNsVoAnR5hzAOJeL96803vN3FC/LeJw09Mcrh1WXoY6T5KLZFcPuaxwwx4IASWgbTEHetmJVtMey423phs1X1feT6QQaHeh3ryAe3qaMs1Z7ksOEsyifUOC67Aa/G0IbP3QJlYOk1wtLvQ+4+uIoyG3BJ9RM17gMrHMTBH2eUc/Tk4kYv/3LPlajwXb1U0fNNqgrWaOcsDoqsHShh+f0dPj83X1KTBp8FspTcm9ww7KaAjgvWwH6B3XIbsSAwgsQHNaWQj', :protocol => 'rsa'},
|
18
|
+
:Wouter => {:groups => ['developer'], :identity => 'wouter@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQDPMmfnXWFuuT9h/CRY+S4apJLbBfMpM6wZ1dcqtIk4O5P0rSmnXIZZpZP9XGxU5dP2+y6KGj+Egr4YZClKTHTgTcVEukW3n73c2ObCg5bCW+wJxvk3ns6G046rWACLIkX+Ben3YhBa09mXnPk0CRtzHUIrnMsExaxnaU/cJ7miF9gJq5pm8gwH0f0Ek7hWHtGVralEJX97wwey4rB/0js7YQqKjYtwtUncnVjRntyrLkIZ/gXnY9FZEqH+GGXho6yhqAT2+VkWdax+cyIZxvimfNcA7mCTStv/1pMSrrygMnONZ6TLDdJm+2THh9tRZ3UoWGQUlWJ1QnV5Ox2cVWvj', :protocol => 'rsa'},
|
19
|
+
:Stijn => {:groups => ['developer'], :identity => 'stijn@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQD6OcLSJGrR8PQ4hCnPVrnyXbhiCQSeB2l8JitV1NcrbwxwZ15wh4xDNKhhUlIlxGnXWLLadOePEhJ2ESUjEm2x5FJ1p06Bj6rsEDGvKBtUjUq5PXFvKY8qoyc6jV1vjz6FXuZBHk7k9X5JIZhORAs1LcwCpOEQwsfjnJ1KGBanvcFbAIpRej4qlzAKcfDtykC8XTODlSgj6GSqLz65LY+SrdTDe2XZ4qHyntVXbnLjX9fRaVWInU8fkoKUkLogUTRXszAKUfqrJBI7em3FQqOu40gRrdzevS4vTbeNu+fe9rodVmlBKEFdbKELhppke7a/kN04vcATazXJOKoGh/v/', :protocol => 'rsa'},
|
20
|
+
:Katrien => {:groups => ['developer'], :identity => 'katrien@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCnIup0Q/3Ja/YQWrpg20yhWARfS3kdL2obssWvwlVOZv08vsxiH4S5KrYLQW5Fn5ethBsuKDb0yuZzFfsVkbv1uXMYRRqmEW+HnlF+tchsRqpVqUKNTWigtw3zeuDHDsk3GJzQHCpUI8ha/1CBZRre0oxYJCHYH8wslji33ZAn3HxbUH9Y+E3XnWjfrgK05oY5SVgbQ6bf0Fn1UZ3uai7+xh1kNPsUM3Rx91vdhhhQi4SesFwaslYB4gnG010fgp0Hn9DTV7P6Vk7AFVWRw12Zvmhi97BC9IglKP9qHYVf60gObbuuoXK5zBlIrRnbytm7ZXt/kVNT5OL+P5H9OLkt', :protocol => 'rsa'},
|
21
|
+
:Dylan => {:groups => ['developer'], :identity => 'dylan@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCmAqNeSwxGcr4xDyR4PvgeoE3d1m5Neqn/PqtQD3+VNLRAdhUmi91+qmN4s1y5wNGbEeAXiKMB/zYBl1+rXYOJlRCerZWjqzakkjzMCLO/d8pjzP4fUng2/SEuLodQ421dUfXlD7W3mSi5Ojtw6MCfmkiRgcCv83aS2H8qaUr+jPZn0HS7+cV8MRb86dq2UPAafrXgDjItTIRJa3guyx4cCfH2eHgBcgyJVlM+01KVWnlHEkHRcbNHHq89/lTPvGiwhEmU2LuJK509SFcfcE9R+qQ+1rUmDkEkKwrIQemRYl1h6Y52OPYH8+T/s5fo9IzMqGFjt0hbrOBLeQmX0LaF', :protocol => 'rsa'},
|
22
|
+
:Bjorn => {:groups => ['developer'], :identity => 'bjorn@sumocoders.be', :key => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCxsXOhEr9xHB6wEcNfSTkKGgppDXbgVrkKLVot8NgF18We+GWVJVDUfCqAn3Eix123JVpFiZm/u3qnymUSQ//r4FNLCwqtUlWbi3bz5O4AMOlMCx+oTBSEiS0fqTyvg/3oZz1Z3tH1wdL/qM9uygxG2adxcIW5AJ1F+sXZCczYGYFhXkImz/1HaozdkWcTSuvuWZcW5dTgcPTpkUlVo/uYKQSlS8z8iSh1xsI94y4SbYj9j3G5aEugjP0w7AjPBqfY0e4WVA2EkTn878dBN9lvI2RkOeb0cHimnjAgko5a2W17ECMZ7eQpAto0tsN8XiohyGZPGOHvcHPBbIvbCjRD', :protocol => 'rsa'}
|
23
|
+
}
|
24
|
+
|
23
25
|
def replace_keys
|
24
26
|
connect do |ssh|
|
25
27
|
say "Pushing SSH keys to #{login}@#{host}"
|
@@ -60,7 +62,7 @@ class Sumodev::Commands::Push < Thor::Group
|
|
60
62
|
end
|
61
63
|
|
62
64
|
def users
|
63
|
-
|
65
|
+
DEV_TEAM.values
|
64
66
|
end
|
65
67
|
|
66
68
|
def authorized_users
|
data/lib/sumodev/commands/ssh.rb
CHANGED
@@ -14,7 +14,6 @@ class Sumodev::Commands::Ssh < Thor::Group
|
|
14
14
|
:mysql => {:login => 'root', :host => 'mysql01.crsolutions.be'},
|
15
15
|
:mail => {:login => 'root', :host => 'mail.crsolutions.be'},
|
16
16
|
:mail2 => {:login => 'root', :host => 'mail02.crsolutions.be'},
|
17
|
-
:factr => {:login => 'factr', :host => 'app01.factr.be'},
|
18
17
|
:sumodev => {:login => 'sites', :host => 'dev.sumocoders.eu'}
|
19
18
|
}
|
20
19
|
|
data/lib/sumodev/generator.rb
CHANGED
data/lib/sumodev/version.rb
CHANGED
data/lib/sumodev.rb
CHANGED
@@ -5,7 +5,6 @@ class Sumodev < Thor
|
|
5
5
|
module Commands
|
6
6
|
autoload :Fork, 'sumodev/commands/fork'
|
7
7
|
autoload :Ssh, 'sumodev/commands/ssh'
|
8
|
-
autoload :Factr, 'sumodev/commands/factr'
|
9
8
|
autoload :Push, 'sumodev/commands/push'
|
10
9
|
autoload :Project, 'sumodev/commands/project'
|
11
10
|
autoload :Box, 'sumodev/commands/box'
|
@@ -14,7 +13,6 @@ class Sumodev < Thor
|
|
14
13
|
|
15
14
|
register Commands::Fork, 'fork', 'fork <command>', 'All commands concerning Fork applications'
|
16
15
|
register Commands::Ssh, 'ssh', 'ssh <server>', 'SSH access to servers'
|
17
|
-
register Commands::Factr, 'factr', 'factr <command>', 'All commands concerning Factr'
|
18
16
|
register Commands::Push, 'push', 'push <server>', 'Push the SSH keys to the server'
|
19
17
|
register Commands::Project, 'project', 'project <command>', 'All commands concerning projects'
|
20
18
|
register Commands::Box, 'box', 'box <command>', 'All commands concerning our Vagrant install'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sumodev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan De Poorter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -78,10 +78,8 @@ files:
|
|
78
78
|
- bin/sumo
|
79
79
|
- lib/sumodev.rb
|
80
80
|
- lib/sumodev/actions.rb
|
81
|
-
- lib/sumodev/application.rb
|
82
81
|
- lib/sumodev/command.rb
|
83
82
|
- lib/sumodev/commands/box.rb
|
84
|
-
- lib/sumodev/commands/factr.rb
|
85
83
|
- lib/sumodev/commands/fork.rb
|
86
84
|
- lib/sumodev/commands/hooks.rb
|
87
85
|
- lib/sumodev/commands/project.rb
|
data/lib/sumodev/application.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/class'
|
2
|
-
require 'sumodev/command'
|
3
|
-
|
4
|
-
class Sumodev::Application < Sumodev::Command
|
5
|
-
include Thor::Actions
|
6
|
-
|
7
|
-
class << self
|
8
|
-
attr_accessor :login, :host, :log_file
|
9
|
-
end
|
10
|
-
|
11
|
-
desc 'log', "Opens the relevant log file"
|
12
|
-
def log
|
13
|
-
remote "less #{self.class.log_file}"
|
14
|
-
end
|
15
|
-
|
16
|
-
desc 'console', "Starts the Rails console"
|
17
|
-
def console
|
18
|
-
remote "\"cd production && rails console production\""
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
def remote command
|
23
|
-
run "ssh -t #{self.class.login}@#{self.class.host} #{command}" # -t forces TTY allocation
|
24
|
-
end
|
25
|
-
end
|