itrigga-cap_deploy 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/itrigga/cap_deploy/cap_tasks.rb +4 -3
- data/lib/itrigga/cap_deploy/filesystem_utils.rb +11 -2
- metadata +11 -11
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
@@ -84,10 +84,11 @@ configuration.load do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
task :resymlink_monit do
|
87
|
+
monit_file = "#{web_dir}/config/monit/monit.#{File.basename(itrigga_config_file)}.config"
|
87
88
|
std_monit_file = "/etc/monit/conf.d/#{application_stub}"
|
88
89
|
puts "re-symlinking monit config"
|
89
90
|
run "(test -L #{std_monit_file} && #{sudo} rm #{std_monit_file}) || echo 'no existing link'"
|
90
|
-
run "#{sudo} ln -s #{
|
91
|
+
run "#{sudo} ln -s #{monit_file} #{std_monit_file} "
|
91
92
|
end
|
92
93
|
|
93
94
|
task :reload_monit do
|
@@ -103,11 +104,11 @@ configuration.load do
|
|
103
104
|
end
|
104
105
|
|
105
106
|
task :resymlink_logrotate do
|
106
|
-
logrotate_config_file = "#{web_dir}/config/log_rotate/log_rotate.#{File.basename(
|
107
|
+
logrotate_config_file = "#{web_dir}/config/log_rotate/log_rotate.#{File.basename(itrigga_config_file)}.config"
|
107
108
|
std_logrotate_file = "/etc/logrotate.d/#{application_stub}"
|
108
109
|
puts "re-symlinking logrotate config"
|
109
110
|
run "(test -L #{std_logrotate_file} && #{sudo} rm #{std_logrotate_file}) || echo nothing to remove"
|
110
|
-
run "#{sudo} ln -s #{
|
111
|
+
run "#{sudo} ln -s #{logrotate_config_file} #{std_logrotate_file} "
|
111
112
|
end
|
112
113
|
|
113
114
|
task :chown_entire_project_dir do
|
@@ -33,11 +33,20 @@
|
|
33
33
|
run "(test -d #{dir} && #{sudo} rm -rf #{dir}) || echo 'no existing #{dir} dir to remove'"
|
34
34
|
end
|
35
35
|
|
36
|
+
def set_permissions_on_dir( opts )
|
37
|
+
if opts[:ownership]
|
38
|
+
run "(test -d #{opts[:dir]} && #{sudo} chown #{opts[:ownership]} ) || echo couldnt find #{opts[:dir]}"
|
39
|
+
end
|
40
|
+
if opts[:permissions]
|
41
|
+
run "(test -d #{opts[:dir]} && #{sudo} chmod #{opts[:permissions]} ) || echo couldnt find #{opts[:dir]}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
36
45
|
def set_permissions_on_files_in_dir( opts )
|
37
46
|
if opts[:ownership]
|
38
|
-
run "(test -d #{opts[:dir]} &&
|
47
|
+
run "(test -d #{opts[:dir]} && find #{opts[:dir]} -mindepth 1 | xargs #{sudo} chown #{opts[:ownership]} ) || echo couldnt find #{opts[:dir]}"
|
39
48
|
end
|
40
49
|
if opts[:permissions]
|
41
|
-
run "(test -d #{opts[:dir]} &&
|
50
|
+
run "(test -d #{opts[:dir]} && find #{opts[:dir]} -mindepth 1 | xargs #{sudo} chmod #{opts[:permissions]} ) || echo couldnt find #{opts[:dir]}"
|
42
51
|
end
|
43
52
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itrigga-cap_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Al Davidson
|
@@ -15,11 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-29 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
type: :development
|
23
22
|
prerelease: false
|
24
23
|
name: bundler
|
25
24
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -34,8 +33,8 @@ dependencies:
|
|
34
33
|
- 0
|
35
34
|
version: 1.0.0
|
36
35
|
requirement: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
36
|
type: :development
|
37
|
+
- !ruby/object:Gem::Dependency
|
39
38
|
prerelease: false
|
40
39
|
name: jeweler
|
41
40
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
@@ -50,8 +49,8 @@ dependencies:
|
|
50
49
|
- 4
|
51
50
|
version: 1.6.4
|
52
51
|
requirement: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
52
|
type: :development
|
53
|
+
- !ruby/object:Gem::Dependency
|
55
54
|
prerelease: false
|
56
55
|
name: rcov
|
57
56
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
@@ -64,8 +63,8 @@ dependencies:
|
|
64
63
|
- 0
|
65
64
|
version: "0"
|
66
65
|
requirement: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
66
|
type: :development
|
67
|
+
- !ruby/object:Gem::Dependency
|
69
68
|
prerelease: false
|
70
69
|
name: jeweler
|
71
70
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
@@ -80,8 +79,8 @@ dependencies:
|
|
80
79
|
- 4
|
81
80
|
version: 1.6.4
|
82
81
|
requirement: *id004
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
82
|
type: :development
|
83
|
+
- !ruby/object:Gem::Dependency
|
85
84
|
prerelease: false
|
86
85
|
name: rspec
|
87
86
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
@@ -94,8 +93,8 @@ dependencies:
|
|
94
93
|
- 0
|
95
94
|
version: "0"
|
96
95
|
requirement: *id005
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
96
|
type: :development
|
97
|
+
- !ruby/object:Gem::Dependency
|
99
98
|
prerelease: false
|
100
99
|
name: capistrano
|
101
100
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
@@ -108,8 +107,8 @@ dependencies:
|
|
108
107
|
- 0
|
109
108
|
version: "0"
|
110
109
|
requirement: *id006
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
110
|
type: :development
|
111
|
+
- !ruby/object:Gem::Dependency
|
113
112
|
prerelease: false
|
114
113
|
name: capistrano-ext
|
115
114
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
@@ -122,6 +121,7 @@ dependencies:
|
|
122
121
|
- 0
|
123
122
|
version: "0"
|
124
123
|
requirement: *id007
|
124
|
+
type: :development
|
125
125
|
description: "Provides\n - handy filesystem utility methods\n - common capistrano tasks\n - common hooks for deployment \n "
|
126
126
|
email: aldavidson@itrigga.com
|
127
127
|
executables: []
|