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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8e38b014b97e24becc3213bd2d0368b9bb5b3f64
4
- data.tar.gz: fc8820a692f32e8aaf8bbe2d6e36c508f3915a71
2
+ SHA256:
3
+ metadata.gz: a5aef54e7948f5d8216a8ba523218300dedc1fca53c1bf4e5e2bfb9bb7fe40a0
4
+ data.tar.gz: dfdd02f5adab8fbb13e35d3e307ac1880bc5b7a491bfde60691e440768213286
5
5
  SHA512:
6
- metadata.gz: 93e9acd830e7d63ff32e4933146c7433692865bfb081fff812324f6c87785c22d2ecc4b6db277850df98996ed1d4699d6bdf43ee661ee5da03b160bdacdcf374
7
- data.tar.gz: a2535a7dd3f6d0a421dbdd6b917cb9f74d52079747f01b7f33aea9a0c49d2252f8433ef28ff408546c8c026ca5935def58086218fe6d4ac690dde1a103399b73
6
+ metadata.gz: b38cc7a35e3d6032fa57c153b18702adeafe48b20f016a372fe51b6f25fc1c03d159eb3510b7c84314fb251b2623c185a3b84079d95d4ab603f9565d5d378f12
7
+ data.tar.gz: 49219ce0ba63bd3b76044713ac77d0bb2b83b8614c94d33e39d6b08682593a92df717d42b227be0446bf26c9d33a89bcbc24ef6423c6b88c4b18fc469e764bd4
data/README.md CHANGED
@@ -39,6 +39,7 @@ set :logrotate_logs_keep, -> { 12 }
39
39
  set :logrotate_interval, -> { 'daily' }
40
40
  set :logrotate_user, -> { fetch(:user) }
41
41
  set :logrotate_group, -> { fetch(:user) }
42
+ set :logrotate_template_path, -> { :default }
42
43
  ```
43
44
 
44
45
  ## Development
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Logrotate
3
- VERSION = "0.3.0"
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -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
- path = File.expand_path("../../templates/logrotate.erb", __FILE__)
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?(path)
25
- erb = File.read(path)
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.3.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-03-24 00:00:00.000000000 Z
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.6.11
108
+ rubygems_version: 2.7.3
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Logrotate integration for Capistrano.