hot_catch 0.1.5 → 0.1.5.1

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
2
  SHA1:
3
- metadata.gz: db8e2f32d740a79b8e344f50fa3346a7c8614fee
4
- data.tar.gz: d7a9c3d845ac1bd9109558b1fde39036215de76a
3
+ metadata.gz: 6fac3fb866a894a8ebc659e2591cad9c8b1e74fa
4
+ data.tar.gz: 2805d10c532f13b9b4a7967e90f940610d99d459
5
5
  SHA512:
6
- metadata.gz: c49b96f10cb27a39805080ddc1a854ac475f1ddf27167d92ad6f81add2f94ea900dd77e371c037406121f4620074bef26b40be831dc778ce8c1124d86b0fb3f4
7
- data.tar.gz: d9446c3a2b474e4d611209174774982998cb7245a85878b694d29204444f1780396df98b18bcec720c67b5f19a77222136fcb3180f1cfb483fcf343d69ba7104
6
+ metadata.gz: 79e8587e8520edb3c8042c96c24ae2ca107296e0ba94c4b223fac032ed1e5ce79f4190b40894fd207f5fc7912fb965c5f4f2c3057cc3295658713fce4dfe1e04
7
+ data.tar.gz: ac119a9263d715319a2ad22321b4fe456caafc3ee33eff63c4c4da0e8e7d734a00c0dd17f56326deba682aa8eb209c21ba8447cbdc47f92f202685eadc59f6d1
@@ -34,6 +34,7 @@ module HotCatch
34
34
 
35
35
  def add_initialize_file_for_sender_logs
36
36
  create_file "config/initializers/hot_catch_sender_logs.rb" do
37
+ "require 'sidekiq-cron'\n" +
37
38
  "Rails.application.config.sender_logs = HotCatch::MakeHttpsRequest.new\n" +
38
39
  "Sidekiq::Cron::Job.create(name: 'NginxWorker - every 5min', cron: '*/5 * * * *', class: 'NginxWorker') # execute at every 5 minutes, ex: 12:05, 12:10, 12:15...etc\n"
39
40
  end
@@ -2,7 +2,7 @@ require 'time'
2
2
 
3
3
  def copy_nginx_logs(from_time = (Time.now() - 5 * 60), input_file = 'log/nginx.access.log')
4
4
  str = ""
5
- if File.open(input_file, 'r'){|file| str = file.readlines}
5
+ if File.exist?(input_file) && File.open(input_file, 'r'){|file| str = file.readlines}
6
6
  ind = nil
7
7
 
8
8
  for i in 0 ... str.size
@@ -1,3 +1,3 @@
1
1
  module HotCatch
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot_catch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davhot