utopia 1.5.1 → 1.5.2
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/utopia/version.rb +1 -1
- data/setup/server/git/hooks/post-receive +9 -5
- data/setup/site/Rakefile +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06bfc0c157a2d299e5fdd106a9019259f3736260
|
4
|
+
data.tar.gz: 351eba6309457b94fa01d76e99ba54583ff5e3db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32c28e94c6c673e2c0f1b727d991e3457e48bbe3c5b44c440d218220abb92be0d284fa5dd2f6cbda8c5b5bae59135d58d00b0ca716cc5310c854179a83fda93f
|
7
|
+
data.tar.gz: dec4cec1acb51120a6dc8b72f35912127225b600a9c70573b6faeede6f98153c50d539ae3152c42992c977b61cda2f863e45e096683c51ff9f1fa444abee85d5
|
data/lib/utopia/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Copyright,
|
3
|
+
# Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -41,12 +41,16 @@ WHOAMI = `whoami`.chomp!
|
|
41
41
|
|
42
42
|
# We should find out if we need to use sudo or not:
|
43
43
|
SUDO = if WHOAMI != DEPLOY_USER
|
44
|
-
["sudo", "-u",
|
44
|
+
["sudo", "-u", DEPLOY_USER]
|
45
45
|
end
|
46
46
|
|
47
|
+
CommandFailure = Class.new(StandardError)
|
48
|
+
|
47
49
|
def sh(command)
|
48
50
|
puts command.join(' ')
|
49
|
-
system(*command)
|
51
|
+
unless system(*command)
|
52
|
+
raise CommandFailure.new("#{command.join(' ')} failed with #{$?}!")
|
53
|
+
end
|
50
54
|
end
|
51
55
|
|
52
56
|
def sudo(command)
|
@@ -56,8 +60,8 @@ end
|
|
56
60
|
puts "Deploying to #{GIT_WORK_TREE} as #{DEPLOY_USER}:#{DEPLOY_GROUP}..."
|
57
61
|
Dir.chdir(GIT_WORK_TREE) do
|
58
62
|
# Pass on our rights to the files we just uploaded to the deployment user/group:
|
59
|
-
sh %W{chmod -Rf ug+rwX .}
|
60
|
-
sh %W{chown -Rf #{DEPLOY_USER}:#{DEPLOY_GROUP} .}
|
63
|
+
sh %W{chmod -Rf ug+rwX .} rescue nil
|
64
|
+
sh %W{chown -Rf #{DEPLOY_USER}:#{DEPLOY_GROUP} .} rescue nil
|
61
65
|
|
62
66
|
sudo %W{git checkout -f}
|
63
67
|
sudo %W{git submodule update -i}
|
data/setup/site/Rakefile
CHANGED
@@ -12,7 +12,7 @@ end
|
|
12
12
|
desc 'Run a server for testing your web application'
|
13
13
|
task :server => :environment do
|
14
14
|
port = ENV.fetch('SERVER_PORT', 9292).to_s
|
15
|
-
exec('puma', '-p', port)
|
15
|
+
exec('puma', '-v', '-p', port)
|
16
16
|
end
|
17
17
|
|
18
18
|
desc 'Start an interactive console for your web application'
|