oysters 0.0.2 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f1def3bc4dbe8a047ab6f8e1f2487913d74e881
4
- data.tar.gz: f8b9843af9aad9cca0918b34c1c322a6c2804ee8
3
+ metadata.gz: a5d3939566273ee19cbdaefe37521518a9655b5f
4
+ data.tar.gz: 1a4aeb3ef58de3d219a85f918f6dd242eabb97a3
5
5
  SHA512:
6
- metadata.gz: 3436d14079022c6fa70ad39558a0fd7040672042acb4f32a4cd11c19e99351990f13573d5dc47e65d4e34d82333af252181f6b3238d87628644ddfe61f419fe7
7
- data.tar.gz: f71e243f3b3fb6753fdee5f9b3bd84a6ce928b1115fd6876138ad0a25abf6ea55a89aaef878cafcbc7736bd9332cbbabed2898218ad4ec5c1ce191d7d654d22b
6
+ metadata.gz: b65b514601c3dcf92981b880dc973dadcc8ceeb250644801e313d61be70519943b4c4c6b192a1545ba9aa54940adc04e3a2f8c4ceeab1eaf6db0750906878721
7
+ data.tar.gz: 6474e3392b8f17735af068bb8ed6b953ace3a4e4ae0bb6ae8736ebdd907ed98deb63d8189f763befe9d5671cfcd5bac26d8ae787b4b6643a30e977dc896858eb
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /*.sublime-*
data/lib/oysters/initd.rb CHANGED
@@ -15,7 +15,6 @@ Oysters.with_configuration do
15
15
  run "mkdir -p #{shared_path}/config"
16
16
  location = File.expand_path('../templates/unicorn_init.sh.erb', __FILE__)
17
17
  config = ERB.new(File.read(location))
18
- puts config.result(binding)
19
18
  text_config = config.result(binding)
20
19
  text_config.gsub!(/(#{su_command}) (.*);/,'\1 "\2";')
21
20
  put text_config, "#{shared_path}/config/#{application}_unicorn_init.sh"
@@ -107,6 +106,19 @@ Oysters.with_configuration do
107
106
  sudo rm -f /etc/init.d/#{application}_kewatcher", pty: true
108
107
  end
109
108
  end
109
+
110
+ namespace :logrotate do
111
+ desc 'Install logrotate config'
112
+ task :install, roles: :app do
113
+ log_path = Pathname.new(shared_path).join('log', "#{rails_env}.log").to_s
114
+ tmp_file = "/tmp/#{application}_logs_#{rand}"
115
+ location = File.expand_path('../templates/logrotate_config.erb', __FILE__)
116
+ config = ERB.new(File.read(location))
117
+
118
+ put config.result(binding), tmp_file
119
+ sudo "mv #{tmp_file} /etc/logrotate.d/#{application}_logs"
120
+ end
121
+ end
110
122
  end
111
123
 
112
124
  end
@@ -0,0 +1,11 @@
1
+ <%= log_path %> {
2
+ daily
3
+ dateext
4
+ dateyesterday
5
+ missingok
6
+ rotate 7
7
+ compress
8
+ delaycompress
9
+ notifempty
10
+ copytruncate
11
+ }
@@ -1,3 +1,3 @@
1
1
  module Oysters
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oysters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Samoilov
@@ -72,6 +72,7 @@ files:
72
72
  - lib/oysters/resque_scheduler.rb
73
73
  - lib/oysters/resque_sliders.rb
74
74
  - lib/oysters/templates/kewatcher_init.sh.erb
75
+ - lib/oysters/templates/logrotate_config.erb
75
76
  - lib/oysters/templates/unicorn_init.sh.erb
76
77
  - lib/oysters/version.rb
77
78
  - oysters.gemspec