minicron 0.5.1 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -5
- data/lib/minicron/constants.rb +1 -1
- data/lib/minicron/hub/app.rb +2 -2
- data/lib/minicron/hub/assets/app/components/schedules.js +1 -1
- data/lib/minicron/hub/db/minicron.sqlite3 +0 -0
- data/lib/minicron/hub/db/schema.rb +5 -5
- data/lib/minicron/hub/db/schema.sql +13 -18
- data/lib/minicron/hub/views/handlebars/schedules.erb +1 -29
- data/lib/minicron/monitor.rb +1 -1
- data/spec/spec_helper.rb +6 -9
- metadata +10 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81882aa99213315c4e93d96357de58fdad252b30
|
4
|
+
data.tar.gz: 8d6b3040f2de6a68767932318efc77947636dc06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b8b6b7423abcc01f6ad4e1327f291998438e44f8a564fc5d93387f54e0c09342b7e6dcc50c933b65fbe4d709d798826b7e727586c0a1046814d6c4fb6264e89
|
7
|
+
data.tar.gz: 2d18caaf08c5b34f9465b5a582ee155cd59f679ceaa6984ee4c55ed21f90b7e7e6584ea14d828cec1304abc2973bf8e035c22a14375fb24a2cd37837860ecb04
|
data/README.md
CHANGED
@@ -69,8 +69,16 @@ Requirements
|
|
69
69
|
|
70
70
|
#### Database
|
71
71
|
|
72
|
-
|
73
|
-
|
72
|
+
**Default**
|
73
|
+
|
74
|
+
- SQLite >= 3.6.16
|
75
|
+
(via the sqlite3 gem which may require libsqlite3-dev or sqlite-devel depending on your OS)
|
76
|
+
|
77
|
+
**Also Supported**
|
78
|
+
|
79
|
+
These databases are also supported but you will need to manaually install the gems for them
|
80
|
+
|
81
|
+
- MySQL via mysql2 (See [here](https://github.com/brianmario/mysql2#compatibility) for compatability info)
|
74
82
|
- Support for PostgreSQL is planned in the future
|
75
83
|
|
76
84
|
#### Web Server / Reverse Proxy
|
@@ -98,7 +106,7 @@ but I encourage you to give it a try in a non critical environment and help me t
|
|
98
106
|
|
99
107
|
2. On some distributions you may need to install the ````ruby-dev```` and ````build-essential```` packages
|
100
108
|
|
101
|
-
3. To install the latest release (currently 0.
|
109
|
+
3. To install the latest release (currently 0.6) you can ````gem install minicron````, depending on your ruby setup
|
102
110
|
you may need to run this with ````sudo````
|
103
111
|
|
104
112
|
4. Set your database configuration options in ````/etc/minicron.toml````, you can use the [minicron.toml](https://github.com/jamesrwhite/minicron/blob/master/config/minicron.toml) as a guide on what options are configurable
|
@@ -283,8 +291,9 @@ Support
|
|
283
291
|
|
284
292
|
Where possible I will try and provide support for minicron, you can get in touch with me via:
|
285
293
|
|
286
|
-
- Twitter [@jamesrwhite](https://twitter.com/jamesrwhite)
|
287
|
-
|
294
|
+
- Twitter: [@jamesrwhite](https://twitter.com/jamesrwhite)
|
295
|
+
or [@minicron_dev](https://twitter.com/minicron_dev)
|
296
|
+
- Email: [dev.jameswhite+minicron@gmail.com](mailto:dev.jameswhite+minicron@gmail.com)
|
288
297
|
|
289
298
|
Or feel free to open an issue and I'll do my best to help.
|
290
299
|
|
data/lib/minicron/constants.rb
CHANGED
data/lib/minicron/hub/app.rb
CHANGED
@@ -27,7 +27,7 @@ module Minicron::Hub
|
|
27
27
|
|
28
28
|
# Used to enable asset compression, currently nothing else
|
29
29
|
# relies on this
|
30
|
-
set :environment, :
|
30
|
+
set :environment, :development
|
31
31
|
|
32
32
|
# Force the encoding to be UTF-8 to prevent assetpack encoding issues
|
33
33
|
Encoding.default_external = Encoding::UTF_8
|
@@ -103,7 +103,7 @@ module Minicron::Hub
|
|
103
103
|
when 'sqlite'
|
104
104
|
# Calculate the realtive path to the db because sqlite or activerecord is
|
105
105
|
# weird and doesn't seem to handle abs paths correctly
|
106
|
-
root = Pathname.new(
|
106
|
+
root = Pathname.new(Dir.pwd)
|
107
107
|
db = Pathname.new(Minicron::HUB_PATH + '/db')
|
108
108
|
db_rel_path = db.relative_path_from(root)
|
109
109
|
|
@@ -256,7 +256,7 @@
|
|
256
256
|
});
|
257
257
|
|
258
258
|
// Handle when one of the 'every n x' is inputs is changed
|
259
|
-
Ember.$('#schedule-editor').find('input[type="number"], input[type="checkbox"]').on('change', function(e) {
|
259
|
+
Ember.$('#schedule-editor').find('input[type="number"], input[type="checkbox"], input[type="radio"]').on('change', function(e) {
|
260
260
|
if (self.get('read_only')) {
|
261
261
|
e.preventDefault();
|
262
262
|
return false;
|
Binary file
|
@@ -79,11 +79,11 @@ ActiveRecord::Schema.define(version: 0) do
|
|
79
79
|
|
80
80
|
create_table "schedules", force: true do |t|
|
81
81
|
t.integer "job_id", null: false
|
82
|
-
t.string "minute", limit:
|
83
|
-
t.string "hour", limit:
|
84
|
-
t.string "day_of_the_month", limit:
|
85
|
-
t.string "month", limit:
|
86
|
-
t.string "day_of_the_week", limit:
|
82
|
+
t.string "minute", limit: 169
|
83
|
+
t.string "hour", limit: 61
|
84
|
+
t.string "day_of_the_month", limit: 83
|
85
|
+
t.string "month", limit: 26
|
86
|
+
t.string "day_of_the_week", limit: 13
|
87
87
|
t.string "special", limit: 9
|
88
88
|
t.datetime "created_at", null: false
|
89
89
|
t.datetime "updated_at", null: false
|
@@ -5,9 +5,9 @@
|
|
5
5
|
# http://www.sequelpro.com/
|
6
6
|
# http://code.google.com/p/sequel-pro/
|
7
7
|
#
|
8
|
-
# Host: 127.0.0.1 (MySQL 5.6.
|
8
|
+
# Host: 127.0.0.1 (MySQL 5.6.17)
|
9
9
|
# Database: minicron
|
10
|
-
# Generation Time: 2014-04
|
10
|
+
# Generation Time: 2014-05-04 22:28:09 +0000
|
11
11
|
# ************************************************************
|
12
12
|
|
13
13
|
|
@@ -34,7 +34,7 @@ CREATE TABLE `alerts` (
|
|
34
34
|
`medium` varchar(9) NOT NULL DEFAULT '',
|
35
35
|
`sent_at` datetime NOT NULL,
|
36
36
|
PRIMARY KEY (`id`),
|
37
|
-
KEY `
|
37
|
+
KEY `alerts_execution_id` (`execution_id`) USING BTREE,
|
38
38
|
KEY `expected_at` (`expected_at`) USING BTREE,
|
39
39
|
KEY `kind` (`kind`) USING BTREE,
|
40
40
|
KEY `medium` (`medium`) USING BTREE,
|
@@ -56,9 +56,9 @@ CREATE TABLE `executions` (
|
|
56
56
|
`finished_at` datetime DEFAULT NULL,
|
57
57
|
`exit_status` int(11) DEFAULT NULL,
|
58
58
|
PRIMARY KEY (`id`),
|
59
|
-
KEY `
|
59
|
+
KEY `executions_created_at` (`created_at`) USING BTREE,
|
60
60
|
KEY `finished_at` (`finished_at`) USING BTREE,
|
61
|
-
KEY `
|
61
|
+
KEY `executions_job_id` (`job_id`) USING BTREE,
|
62
62
|
KEY `started_at` (`started_at`) USING BTREE
|
63
63
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
64
64
|
|
@@ -97,7 +97,7 @@ CREATE TABLE `job_execution_outputs` (
|
|
97
97
|
`output` text NOT NULL,
|
98
98
|
`timestamp` datetime NOT NULL,
|
99
99
|
PRIMARY KEY (`id`),
|
100
|
-
KEY `
|
100
|
+
KEY `job_execution_outputs_execution_id` (`execution_id`) USING BTREE,
|
101
101
|
KEY `seq` (`seq`) USING BTREE
|
102
102
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
103
103
|
|
@@ -119,7 +119,7 @@ CREATE TABLE `jobs` (
|
|
119
119
|
`updated_at` datetime NOT NULL,
|
120
120
|
PRIMARY KEY (`id`),
|
121
121
|
UNIQUE KEY `job_hash` (`job_hash`) USING BTREE,
|
122
|
-
KEY `
|
122
|
+
KEY `jobs_created_at` (`created_at`) USING BTREE,
|
123
123
|
KEY `host_id` (`host_id`) USING BTREE
|
124
124
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
125
125
|
|
@@ -133,11 +133,11 @@ DROP TABLE IF EXISTS `schedules`;
|
|
133
133
|
CREATE TABLE `schedules` (
|
134
134
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
135
135
|
`job_id` int(11) NOT NULL,
|
136
|
-
`minute` varchar(
|
137
|
-
`hour` varchar(
|
138
|
-
`day_of_the_month` varchar(
|
139
|
-
`month` varchar(
|
140
|
-
`day_of_the_week` varchar(
|
136
|
+
`minute` varchar(169) DEFAULT NULL,
|
137
|
+
`hour` varchar(61) DEFAULT NULL,
|
138
|
+
`day_of_the_month` varchar(83) DEFAULT NULL,
|
139
|
+
`month` varchar(26) DEFAULT NULL,
|
140
|
+
`day_of_the_week` varchar(13) DEFAULT NULL,
|
141
141
|
`special` varchar(9) DEFAULT NULL,
|
142
142
|
`created_at` datetime NOT NULL,
|
143
143
|
`updated_at` datetime NOT NULL,
|
@@ -145,7 +145,7 @@ CREATE TABLE `schedules` (
|
|
145
145
|
KEY `day_of_the_month` (`day_of_the_month`) USING BTREE,
|
146
146
|
KEY `day_of_the_week` (`day_of_the_week`) USING BTREE,
|
147
147
|
KEY `hour` (`hour`) USING BTREE,
|
148
|
-
KEY `
|
148
|
+
KEY `schedules_job_id` (`job_id`) USING BTREE,
|
149
149
|
KEY `minute` (`minute`) USING BTREE,
|
150
150
|
KEY `month` (`month`) USING BTREE,
|
151
151
|
KEY `special` (`special`) USING BTREE
|
@@ -158,11 +158,6 @@ CREATE TABLE `schedules` (
|
|
158
158
|
|
159
159
|
DROP TABLE IF EXISTS `schema_migrations`;
|
160
160
|
|
161
|
-
CREATE TABLE `schema_migrations` (
|
162
|
-
`version` varchar(255) NOT NULL,
|
163
|
-
UNIQUE KEY `unique_schema_migrations` (`version`)
|
164
|
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
165
|
-
|
166
161
|
|
167
162
|
|
168
163
|
|
@@ -288,34 +288,6 @@
|
|
288
288
|
</div>
|
289
289
|
</div>
|
290
290
|
</div>
|
291
|
-
<div class="panel panel-default">
|
292
|
-
<a data-toggle="collapse" data-parent="#schedule-editor" href="#schedule-dotw">
|
293
|
-
<div class="panel-heading">
|
294
|
-
<h4 class="panel-title">Day of week</h4>
|
295
|
-
</div>
|
296
|
-
</a>
|
297
|
-
<div id="schedule-special" class="panel-collapse collapse">
|
298
|
-
<div class="panel-body">
|
299
|
-
<ul class="nav nav-tabs">
|
300
|
-
<li class="active"><a href="#every-special" data-toggle="tab">special</a></li>
|
301
|
-
</ul>
|
302
|
-
|
303
|
-
<div class="tab-content">
|
304
|
-
<div class="tab-pane" id="each-selected-special">
|
305
|
-
<div class="btn-group clearfix" data-toggle="buttons">
|
306
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="0"/>Sun</label>
|
307
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="1"/>Mon</label>
|
308
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="2"/>Tue</label>
|
309
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="3"/>Wed</label>
|
310
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="4"/>Thu</label>
|
311
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="5"/>Fri</label>
|
312
|
-
<label class="btn btn-primary"><input type="checkbox" data-value="6"/>Sat</label>
|
313
|
-
</div>
|
314
|
-
</div>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
</div>
|
318
|
-
</div>
|
319
291
|
</div>
|
320
292
|
|
321
293
|
<div class="form-group">
|
@@ -379,4 +351,4 @@
|
|
379
351
|
cancel='cancel'
|
380
352
|
job_id=job.id
|
381
353
|
schedule_id=id}}
|
382
|
-
</script>
|
354
|
+
</script>
|
data/lib/minicron/monitor.rb
CHANGED
@@ -29,7 +29,7 @@ module Minicron
|
|
29
29
|
when 'sqlite'
|
30
30
|
# Calculate the realtive path to the db because sqlite or activerecord is
|
31
31
|
# weird and doesn't seem to handle abs paths correctly
|
32
|
-
root = Pathname.new(
|
32
|
+
root = Pathname.new(Dir.pwd)
|
33
33
|
db = Pathname.new(Minicron::HUB_PATH + '/db')
|
34
34
|
db_rel_path = db.relative_path_from(root)
|
35
35
|
|
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,12 @@ require 'minicron/cli'
|
|
15
15
|
RSpec.configure do |config|
|
16
16
|
config.color_enabled = true
|
17
17
|
config.formatter = 'documentation'
|
18
|
+
|
19
|
+
# Taken from commander gem
|
20
|
+
# prevent paging from actually occurring in test environment
|
21
|
+
config.before(:each) do
|
22
|
+
allow(Commander::UI).to receive(:enable_paging)
|
23
|
+
end
|
18
24
|
end
|
19
25
|
|
20
26
|
# Normalise varied new line usage
|
@@ -23,12 +29,3 @@ class String
|
|
23
29
|
strip.gsub(/\r\n?/, "\n")
|
24
30
|
end
|
25
31
|
end
|
26
|
-
|
27
|
-
# Taken from commander gem
|
28
|
-
# prevent paging from actually occurring in test environment
|
29
|
-
module Commander
|
30
|
-
module UI
|
31
|
-
def enable_paging
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minicron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -30,20 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
34
|
-
- - '>='
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 4.1.6
|
33
|
+
version: '4.2'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - ~>
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '4.
|
44
|
-
- - '>='
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 4.1.6
|
40
|
+
version: '4.2'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: thin
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -408,26 +402,6 @@ dependencies:
|
|
408
402
|
- - '>='
|
409
403
|
- !ruby/object:Gem::Version
|
410
404
|
version: 1.3.8
|
411
|
-
- !ruby/object:Gem::Dependency
|
412
|
-
name: mysql2
|
413
|
-
requirement: !ruby/object:Gem::Requirement
|
414
|
-
requirements:
|
415
|
-
- - ~>
|
416
|
-
- !ruby/object:Gem::Version
|
417
|
-
version: '0.3'
|
418
|
-
- - '>='
|
419
|
-
- !ruby/object:Gem::Version
|
420
|
-
version: 0.3.15
|
421
|
-
type: :runtime
|
422
|
-
prerelease: false
|
423
|
-
version_requirements: !ruby/object:Gem::Requirement
|
424
|
-
requirements:
|
425
|
-
- - ~>
|
426
|
-
- !ruby/object:Gem::Version
|
427
|
-
version: '0.3'
|
428
|
-
- - '>='
|
429
|
-
- !ruby/object:Gem::Version
|
430
|
-
version: 0.3.15
|
431
405
|
- !ruby/object:Gem::Dependency
|
432
406
|
name: bundler
|
433
407
|
requirement: !ruby/object:Gem::Requirement
|
@@ -462,14 +436,14 @@ dependencies:
|
|
462
436
|
requirements:
|
463
437
|
- - ~>
|
464
438
|
- !ruby/object:Gem::Version
|
465
|
-
version: '2'
|
439
|
+
version: '2.1'
|
466
440
|
type: :development
|
467
441
|
prerelease: false
|
468
442
|
version_requirements: !ruby/object:Gem::Requirement
|
469
443
|
requirements:
|
470
444
|
- - ~>
|
471
445
|
- !ruby/object:Gem::Version
|
472
|
-
version: '2'
|
446
|
+
version: '2.1'
|
473
447
|
- !ruby/object:Gem::Dependency
|
474
448
|
name: simplecov
|
475
449
|
requirement: !ruby/object:Gem::Requirement
|
@@ -608,8 +582,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
608
582
|
- !ruby/object:Gem::Version
|
609
583
|
version: '0'
|
610
584
|
requirements:
|
611
|
-
-
|
612
|
-
|
585
|
+
- libsqlite3-dev or sqlite-devel (sqlite3 dependencies for debian/ubuntu and redhat/centos/fedora
|
586
|
+
respectively)
|
587
|
+
- ruby-dev (you may need this to be able to install eventmachine)
|
588
|
+
- build-essential (you may need this to be able to install eventmachine)
|
613
589
|
rubyforge_project:
|
614
590
|
rubygems_version: 2.2.2
|
615
591
|
signing_key:
|