autocronitor 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +2 -0
- data/autocronitor.gemspec +1 -1
- data/bin/autocronitor +1 -2
- data/test.conf +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b464526f93d9c2ae53c43aae7e2cf67d98af07ea
|
4
|
+
data.tar.gz: 8981f30a4439c66f69df6865088a2cbc8647de41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de45b35f5f8bbfdfddc4f38e9283d4a85568077860c72f947f011f83169bd6730693016d10896d3d06242145bcac95350728b9608abd3c21dc9fedb8569504f6
|
7
|
+
data.tar.gz: aa0905204df3268cb6d48912638e6e9604a238f468cb3916e00baa293306fc6fa77ec1f94e2f7bfb75897fddb4c29c704ed44a0d05e1259ea6992e264e202add
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# autocronitor
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/autocronitor.png)](http://badge.fury.io/rb/autocronitor)
|
4
|
+
|
3
5
|
A CLI tool to parse a standard format crontab file, create monitors in cronitor.io for each job, and automatically add the necessary curl commands to the original crontab.
|
4
6
|
|
5
7
|
It assumes that you are using cronitor's "template" feature to configure notifications for your monitors, and that you have created templates which will then be passed to autocronitor.
|
data/autocronitor.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'autocronitor'
|
5
|
-
gem.version = '0.0.
|
5
|
+
gem.version = '0.0.3'
|
6
6
|
gem.authors = ["Jon Cowie"]
|
7
7
|
gem.email = 'jonlives@gmail.com'
|
8
8
|
gem.homepage = 'https://github.com/jonlives/autocronitor'
|
data/bin/autocronitor
CHANGED
@@ -106,10 +106,9 @@ else
|
|
106
106
|
# Create a new monitor via cronitor's API with the name and rules we've created
|
107
107
|
puts "Creating monitor #{filtered_line}..."
|
108
108
|
monitor_id = helper.monitor_create(filtered_line,rules,template_names)
|
109
|
-
monitor_url = "#{@monitor_url}/#{monitor_id}"
|
110
109
|
|
111
110
|
# Construct the replacement line to be written back to the file
|
112
|
-
cronitored_line = "#{cron_expression} curl #{
|
111
|
+
cronitored_line = "#{cron_expression} curl #{monitor_id + '/run'} -m 10 && #{remaining_line.join(" ")} && curl #{monitor_id + '/complete'} -m 10"
|
113
112
|
new_file_lines << cronitored_line
|
114
113
|
puts ""
|
115
114
|
end
|
data/test.conf
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0 10 * * * curl /https://cronitor.link/aNVGQ6/run -m 10 && /usr/bin/test && curl /https://cronitor.link/aNVGQ6/complete -m 10
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autocronitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Cowie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unirest
|
@@ -63,11 +63,13 @@ extensions: []
|
|
63
63
|
extra_rdoc_files: []
|
64
64
|
files:
|
65
65
|
- .gitignore
|
66
|
+
- CHANGELOG.md
|
66
67
|
- LICENSE
|
67
68
|
- README.md
|
68
69
|
- autocronitor.gemspec
|
69
70
|
- bin/autocronitor
|
70
71
|
- lib/autocronitor/helper.rb
|
72
|
+
- test.conf
|
71
73
|
homepage: https://github.com/jonlives/autocronitor
|
72
74
|
licenses:
|
73
75
|
- MIT
|