meow-deploy 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/examples/god.conf +59 -3
- data/lib/meow-deploy/capistrano_integration.rb +1 -1
- data/lib/meow-deploy/version.rb +1 -1
- metadata +10 -9
data/CHANGELOG
ADDED
data/examples/god.conf
CHANGED
@@ -33,19 +33,70 @@ end script
|
|
33
33
|
|
34
34
|
|
35
35
|
# /etc/god.conf
|
36
|
-
# Basic god.conf to load currently configured sites on reboot
|
36
|
+
# Basic god.conf to load currently configured sites on reboot and the custom condition
|
37
37
|
|
38
|
+
God.load "/etc/god.d/*.rb"
|
38
39
|
God.load "/home/deploy/sites/god/*.conf"
|
39
40
|
|
41
|
+
# /etc/god.d/file_touched.rb
|
42
|
+
# Custom condition necessary until God > 0.13.1 is released
|
43
|
+
module God
|
44
|
+
module Conditions
|
45
|
+
|
46
|
+
# Condition Symbol :file_touched
|
47
|
+
# Type: Poll
|
48
|
+
#
|
49
|
+
# Trigger when a specified file is touched.
|
50
|
+
#
|
51
|
+
# Paramaters
|
52
|
+
# Required
|
53
|
+
# +path+ is the path to the file to watch.
|
54
|
+
#
|
55
|
+
# Examples
|
56
|
+
#
|
57
|
+
# Trigger if 'tmp/restart.txt' file is touched (from a Watch):
|
58
|
+
#
|
59
|
+
# on.condition(:file_touched) do |c|
|
60
|
+
# c.path = 'tmp/restart.txt'
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
class FileTouched < PollCondition
|
64
|
+
attr_accessor :path
|
65
|
+
|
66
|
+
def initialize
|
67
|
+
super
|
68
|
+
self.path = nil
|
69
|
+
end
|
70
|
+
|
71
|
+
def valid?
|
72
|
+
valid = true
|
73
|
+
valid &= complain("Attribute 'path' must be specified", self) if self.path.nil?
|
74
|
+
valid
|
75
|
+
end
|
76
|
+
|
77
|
+
def test
|
78
|
+
if File.exists?(self.path)
|
79
|
+
(Time.now - File.mtime(self.path)) <= self.interval
|
80
|
+
else
|
81
|
+
false
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
|
40
89
|
# app/config/god.conf
|
41
90
|
# App specific file for god, goes under your app root.
|
42
91
|
# Gets symlinked to god_conf_path
|
43
92
|
|
93
|
+
site_root = '/home/deploy/sites/app'
|
94
|
+
|
44
95
|
God.watch do |w|
|
45
96
|
w.name = "app"
|
46
|
-
w.dir = "/
|
97
|
+
w.dir = "#{site_root}/current"
|
47
98
|
w.interval = 30.seconds
|
48
|
-
w.log =
|
99
|
+
w.log = "#{site_root}/shared/log/god.log"
|
49
100
|
w.env =
|
50
101
|
{ 'HOME' => "/home/deploy",
|
51
102
|
'RAILS_ENV' => 'production' }
|
@@ -63,6 +114,11 @@ God.watch do |w|
|
|
63
114
|
c.times = 2
|
64
115
|
c.notify = 'kris'
|
65
116
|
end
|
117
|
+
|
118
|
+
on.condition(:file_touched) do |c|
|
119
|
+
c.interval = 5.seconds
|
120
|
+
c.path = "#{site_root}/shared/restart.txt"
|
121
|
+
end
|
66
122
|
end
|
67
123
|
|
68
124
|
w.transition(:up, :start) do |on|
|
data/lib/meow-deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meow-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kristjan Rang
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
|
-
none: false
|
21
|
-
name: capistrano
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
25
26
|
requirements:
|
26
27
|
- - ! '>='
|
27
28
|
- !ruby/object:Gem::Version
|
28
29
|
version: '0'
|
29
|
-
none: false
|
30
30
|
description: Tasks for deploying to a stack running god, rbenv and whatever rails
|
31
31
|
server
|
32
32
|
email: mail@kristjanrang.eu
|
@@ -35,6 +35,7 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
|
+
- CHANGELOG
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE.txt
|
40
41
|
- README.md
|
@@ -51,17 +52,17 @@ rdoc_options: []
|
|
51
52
|
require_paths:
|
52
53
|
- lib
|
53
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
54
56
|
requirements:
|
55
57
|
- - ! '>='
|
56
58
|
- !ruby/object:Gem::Version
|
57
59
|
version: '0'
|
58
|
-
none: false
|
59
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
60
62
|
requirements:
|
61
63
|
- - ! '>='
|
62
64
|
- !ruby/object:Gem::Version
|
63
65
|
version: '0'
|
64
|
-
none: false
|
65
66
|
requirements: []
|
66
67
|
rubyforge_project:
|
67
68
|
rubygems_version: 1.8.23
|