capistrano-logrotate 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -0
- data/lib/capistrano/logrotate/version.rb +1 -1
- data/lib/capistrano/tasks/logrotate.rake +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a5aef54e7948f5d8216a8ba523218300dedc1fca53c1bf4e5e2bfb9bb7fe40a0
|
4
|
+
data.tar.gz: dfdd02f5adab8fbb13e35d3e307ac1880bc5b7a491bfde60691e440768213286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38cc7a35e3d6032fa57c153b18702adeafe48b20f016a372fe51b6f25fc1c03d159eb3510b7c84314fb251b2623c185a3b84079d95d4ab603f9565d5d378f12
|
7
|
+
data.tar.gz: 49219ce0ba63bd3b76044713ac77d0bb2b83b8614c94d33e39d6b08682593a92df717d42b227be0446bf26c9d33a89bcbc24ef6423c6b88c4b18fc469e764bd4
|
data/README.md
CHANGED
@@ -7,6 +7,7 @@ namespace :load do
|
|
7
7
|
set :logrotate_interval, -> { 'daily' }
|
8
8
|
set :logrotate_user, -> { fetch(:user) }
|
9
9
|
set :logrotate_group, -> { fetch(:user) }
|
10
|
+
set :logrotate_template_path, -> { :default }
|
10
11
|
end
|
11
12
|
end
|
12
13
|
|
@@ -19,10 +20,13 @@ namespace :logrotate do
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def upload_logrotate_template
|
22
|
-
|
23
|
+
logrotate_template_path = fetch(:logrotate_template_path)
|
24
|
+
if logrotate_template_path == :default
|
25
|
+
logrotate_template_path = File.expand_path("../../templates/logrotate.erb", __FILE__)
|
26
|
+
end
|
23
27
|
|
24
|
-
if File.file?(
|
25
|
-
erb = File.read(
|
28
|
+
if File.file?(logrotate_template_path)
|
29
|
+
erb = File.read(logrotate_template_path)
|
26
30
|
config_path = File.join(shared_path, 'logrotate_conf')
|
27
31
|
upload! StringIO.new(ERB.new(erb).result(binding)), config_path
|
28
32
|
sudo :mv, config_path, fetch(:logrotate_conf_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-logrotate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jun Lin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.7.3
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Logrotate integration for Capistrano.
|