minicron 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,77 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Minicron::Transport::Client do
4
+ describe '#initialize' do
5
+ context 'when path is root' do
6
+ it 'should set the correct instance variables and call the parent init' do
7
+ client = Minicron::Transport::Client.new('http', 'example.com', 99, '/')
8
+
9
+ expect(client.instance_variable_get(:@scheme)).to eq 'http'
10
+ expect(client.instance_variable_get(:@host)).to eq 'example.com'
11
+ expect(client.instance_variable_get(:@port)).to eq 99
12
+ expect(client.instance_variable_get(:@path)).to eq '/faye'
13
+ expect(client.instance_variable_get(:@seq)).to eq 1
14
+ end
15
+ end
16
+
17
+ context 'when path is not root' do
18
+ it 'should set the correct instance variables and call the parent init' do
19
+ client = Minicron::Transport::Client.new('https', 'test.com', 139, '/test')
20
+
21
+ expect(client.instance_variable_get(:@scheme)).to eq 'https'
22
+ expect(client.instance_variable_get(:@host)).to eq 'test.com'
23
+ expect(client.instance_variable_get(:@port)).to eq 139
24
+ expect(client.instance_variable_get(:@path)).to eq '/test/faye'
25
+ expect(client.instance_variable_get(:@seq)).to eq 1
26
+ end
27
+ end
28
+ end
29
+
4
30
  describe '#setup' do
5
- it 'should send a setup message and ensure its delivery' # do
31
+ # before(:each) do
32
+ # let(:client) do
33
+ # client = Minicron::Transport::Client.new('https', 'test.com', 139, '/test')
34
+ # client.stub(:ensure_delivery)
35
+ # client.instance_variable_set(:@responses, {[
36
+ # :body => :channel
37
+ # ]})
38
+ # end
6
39
  # end
40
+
41
+ it 'should call #publish with the correct params'
42
+ end
43
+
44
+ describe '#send' do
45
+ it 'should call #publish with the correct params' do
46
+ client = Minicron::Transport::Client.new('http', 'example.com', 99, '/')
47
+
48
+ client.should_receive(:publish).with('/job/1/2/output', 'test')
49
+
50
+ client.send(
51
+ :job_id => 1,
52
+ :execution_id => 2,
53
+ :type => :output,
54
+ :message => 'test'
55
+ )
56
+ end
57
+ end
58
+
59
+ describe '#publish' do
60
+ it 'should call #request with the correct params' do
61
+ client = Minicron::Transport::Client.new('https', 'test.com', 139, '/test')
62
+ client.stub(:request)
63
+
64
+ json = { :channel => '/job/1/2/status', :data => {
65
+ :ts => Time.now.utc.strftime('%Y-%m-%d %H:%M:%S'),
66
+ :message => 'test',
67
+ :seq => 1
68
+ } }.to_json
69
+
70
+ client.should_receive(:request).with(:message => json)
71
+
72
+ client.publish('/job/1/2/status', 'test')
73
+
74
+ expect(client.instance_variable_get(:@seq)).to eq 2
75
+ end
7
76
  end
8
77
  end
@@ -12,30 +12,9 @@ describe Minicron::Transport::FayeClient do
12
12
  end
13
13
  end
14
14
 
15
- describe '#ensure_em_running' do
16
- context 'when eventmachine is not running' do
17
- it 'should start eventmachine' # do
18
- # eventmachine.stub(:reactor_running?).and_return(false, true)
19
- # eventmachine.stub(:run)
20
- # eventmachine.should_receive(:reactor_running?).twice
21
- # eventmachine.should_receive(:run).once
22
-
23
- # client.new('http://127.0.0.1/test').ensure_em_running
24
- # end
25
- end
26
-
27
- context 'when eventmachine is running' do
28
- it 'should not start eventmachine' # do
29
- # eventmachine.stub(:reactor_running?).and_return true
30
- # eventmachine.should_receive(:reactor_running?).twice
31
-
32
- # client.new('http://127.0.0.1/test').ensure_em_running
33
- # end
34
- end
35
- end
36
-
37
15
  describe '#ensure_delivery' do
38
16
  before(:each) { eventmachine.stub(:stop) }
17
+
39
18
  it 'should block until the queue hash is empty and return nil' do
40
19
  client_instance = client.new('http', '127.0.0.1', '80', '/test')
41
20
  client_instance.stub(:queue).and_return({ :a => 1 }, { :a => 1, :b => 2 }, { :b => 2 }, {})
@@ -45,9 +24,44 @@ describe Minicron::Transport::FayeClient do
45
24
  end
46
25
  end
47
26
 
48
- describe '#tidy_up'
49
- it 'should stop eventmachine' do
50
- eventmachine.should_receive(:stop)
51
- client.new('http', '127.0.0.1', '80', '/test').tidy_up
52
- end
27
+ # describe '#ensure_em_running' do
28
+ # context 'when eventmachine is not running' do
29
+ # it 'should start eventmachine' do
30
+ # eventmachine.stub(:reactor_running?).and_return(false, true)
31
+ # eventmachine.stub(:run)
32
+ # eventmachine.should_receive(:reactor_running?).twice
33
+ # eventmachine.should_receive(:run).once
34
+
35
+ # client.new('http', '127.0.0.1', '80', '/test').ensure_em_running
36
+ # end
37
+ # end
38
+
39
+ # context 'when eventmachine is running' do
40
+ # it 'should not start eventmachine' do
41
+ # eventmachine.stub(:reactor_running?).and_return true
42
+ # eventmachine.should_receive(:reactor_running?).twice
43
+
44
+ # client.new('http', '127.0.0.1', '80', '/test').ensure_em_running
45
+ # end
46
+ # end
47
+ # end
48
+
49
+ describe '#tidy_up' do
50
+ context 'when eventmachine is running' do
51
+ it 'should stop eventmachine' do
52
+ eventmachine.should_receive(:reactor_running?).and_return true
53
+ eventmachine.should_receive(:stop)
54
+
55
+ client.new('http', '127.0.0.1', '80', '/test').tidy_up
56
+ end
57
+ end
58
+
59
+ context 'when eventmachine is not running' do
60
+ it 'should do nothing' do
61
+ eventmachine.should_receive(:reactor_running?).and_return false
62
+
63
+ client.new('http', '127.0.0.1', '80', '/test').tidy_up
64
+ end
65
+ end
66
+ end
53
67
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Minicron::Transport::Server do
4
- let(:server) { Minicron::Transport::Server.new }
4
+ let(:server) { Minicron::Transport::Server }
5
5
  let(:thin_server) { Thin::Server }
6
6
 
7
7
  describe '#start!' do
@@ -17,7 +17,7 @@ describe Minicron::Transport::Server do
17
17
  context 'when the server is not running' do
18
18
  it 'should return true' do
19
19
  server.should_receive(:running?).and_return false
20
- thin_server.should_receive(:new).and_return thin_server
20
+ thin_server.should_receive(:new).and_return thin_server
21
21
  thin_server.stub(:start)
22
22
 
23
23
  expect(server.start!('127.0.0.1', 1337, '/lol')).to eq true
@@ -28,6 +28,7 @@ describe Minicron::Transport::Server do
28
28
  describe '#stop!' do
29
29
  context 'when the server is not running' do
30
30
  it 'should return false' do
31
+ server.server = nil
31
32
  server.should_receive(:running?).and_return false
32
33
 
33
34
  expect(server.stop!).to eq false
@@ -36,9 +37,8 @@ describe Minicron::Transport::Server do
36
37
 
37
38
  context 'when the server is running' do
38
39
  it 'should return true' do
40
+ server.server = thin_server
39
41
  server.should_receive(:running?).and_return true
40
- server.should_receive(:server).and_return thin_server
41
- server.should_receive(:server).and_return thin_server
42
42
  thin_server.should_receive(:stop).and_return true
43
43
 
44
44
  expect(server.stop!).to eq true
@@ -49,18 +49,14 @@ describe Minicron::Transport::Server do
49
49
  describe '#running?' do
50
50
  context 'when the server is not running' do
51
51
  it 'should return false' do
52
- server.should_receive(:server).and_return thin_server
53
- server.should_receive(:server).and_return thin_server
54
- thin_server.should_receive(:running?).and_return false
55
-
56
- expect(server.running?).to eq false
52
+ server.server = nil
53
+ expect(Minicron::Transport::Server.running?).to eq false
57
54
  end
58
55
  end
59
56
 
60
57
  context 'when the server is running' do
61
58
  it 'should return true' do
62
- server.should_receive(:server).and_return thin_server
63
- server.should_receive(:server).and_return thin_server
59
+ server.server = thin_server
64
60
  thin_server.should_receive(:running?).and_return true
65
61
 
66
62
  expect(server.running?).to eq true
@@ -63,10 +63,8 @@ describe Minicron do
63
63
  context 'when a valid toml file is passed' do
64
64
  it 'should update the config class variable with the toml file config' do
65
65
  expected_valid_config = {
66
- 'global' => {
67
- 'verbose' => true,
68
- 'trace' => false
69
- },
66
+ 'verbose' => true,
67
+ 'trace' => false,
70
68
  'client' => {
71
69
  'scheme' => 'http',
72
70
  'host' => '127.0.0.1',
@@ -124,11 +122,53 @@ describe Minicron do
124
122
  end
125
123
 
126
124
  context 'when a non existent toml file is passed' do
127
- it 'should update the config class variable with the toml file config' do
125
+ it 'should raise an Exception' do
128
126
  expect do
129
127
  Minicron.parse_file_config('./nowhere/minicron.toml')
130
128
  end.to raise_error Exception
131
129
  end
132
130
  end
131
+
132
+ context 'when a file without read permissions is passed' do
133
+ before (:each) do
134
+ File.write('/tmp/minicron_toml_test', '')
135
+ File.chmod(0200, '/tmp/minicron_toml_test')
136
+ end
137
+
138
+ it 'should raise an Exception' do
139
+ expect do
140
+ Minicron.parse_file_config('/tmp/minicron_toml_test')
141
+ end.to raise_error Exception
142
+ end
143
+
144
+ after (:each) do
145
+ File.delete('/tmp/minicron_toml_test')
146
+ end
147
+ end
148
+ end
149
+
150
+ describe '.generate_ssh_key' do
151
+ it 'should generate an ssh key pub/priv pair' do
152
+ Minicron.generate_ssh_key('rspec', 1337, 'rspec')
153
+
154
+ expect(File.exists?(File.expand_path('~/.ssh/minicron_rspec_1337_rsa'))).to eq true
155
+ expect(File.exists?(File.expand_path('~/.ssh/minicron_rspec_1337_rsa.pub'))).to eq true
156
+ end
157
+
158
+ after (:each) do
159
+ `rm ~/.ssh/minicron_rspec_1337_rsa*`
160
+ end
161
+ end
162
+
163
+ describe '.get_fqdn' do
164
+ it 'should return the fqdn as a string with no newline' do
165
+ expect(Minicron.get_fqdn).to eq `hostname -f`.strip
166
+ end
167
+ end
168
+
169
+ describe '.get_hostname' do
170
+ it 'should return the hostname as a string with no newline' do
171
+ expect(Minicron.get_hostname).to eq `hostname -s`.strip
172
+ end
133
173
  end
134
174
  end
@@ -10,6 +10,7 @@ end
10
10
 
11
11
  require 'rspec'
12
12
  require 'minicron'
13
+ require 'minicron/cli'
13
14
 
14
15
  RSpec.configure do |config|
15
16
  config.color_enabled = true
@@ -1,7 +1,6 @@
1
1
  # Test valid config file
2
2
 
3
3
  # Global options
4
- [global]
5
4
  verbose = true
6
5
  trace = false
7
6
 
metadata CHANGED
@@ -1,457 +1,470 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minicron
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
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-04-02 00:00:00.000000000 Z
11
+ date: 2014-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: commander
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.1'
34
- - - '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 4.1.6
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ~>
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '4.1'
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 4.1.6
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: thin
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.6'
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.6.1
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.6'
64
- - - '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.6.1
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: faye
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ~>
71
+ - - "~>"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '1.0'
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: 1.0.1
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.0'
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 1.0.1
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: eventmachine
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ~>
91
+ - - "~>"
92
92
  - !ruby/object:Gem::Version
93
93
  version: '1.0'
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.0.3
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.0'
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: 1.0.3
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: toml-rb
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - ~>
111
+ - - "~>"
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0.1'
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: 0.1.4
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ~>
121
+ - - "~>"
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0.1'
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: 0.1.4
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: sinatra
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ~>
131
+ - - "~>"
132
132
  - !ruby/object:Gem::Version
133
133
  version: '1.4'
134
- - - '>='
134
+ - - ">="
135
135
  - !ruby/object:Gem::Version
136
136
  version: 1.4.4
137
137
  type: :runtime
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ~>
141
+ - - "~>"
142
142
  - !ruby/object:Gem::Version
143
143
  version: '1.4'
144
- - - '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: 1.4.4
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: erubis
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ~>
151
+ - - "~>"
152
152
  - !ruby/object:Gem::Version
153
153
  version: '2.7'
154
154
  type: :runtime
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - ~>
158
+ - - "~>"
159
159
  - !ruby/object:Gem::Version
160
160
  version: '2.7'
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: activerecord
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ~>
165
+ - - "~>"
166
166
  - !ruby/object:Gem::Version
167
167
  version: '4.0'
168
- - - '>='
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: 4.0.3
171
171
  type: :runtime
172
172
  prerelease: false
173
173
  version_requirements: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - ~>
175
+ - - "~>"
176
176
  - !ruby/object:Gem::Version
177
177
  version: '4.0'
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: 4.0.3
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: sinatra-activerecord
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ~>
185
+ - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '1.6'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ~>
192
+ - - "~>"
193
193
  - !ruby/object:Gem::Version
194
194
  version: '1.6'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: sinatra-assetpack
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ~>
199
+ - - "~>"
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0.3'
202
- - - '>='
202
+ - - ">="
203
203
  - !ruby/object:Gem::Version
204
204
  version: 0.3.2
205
205
  type: :runtime
206
206
  prerelease: false
207
207
  version_requirements: !ruby/object:Gem::Requirement
208
208
  requirements:
209
- - - ~>
209
+ - - "~>"
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0.3'
212
- - - '>='
212
+ - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: 0.3.2
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: sass
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
- - - ~>
219
+ - - "~>"
220
220
  - !ruby/object:Gem::Version
221
221
  version: '3.2'
222
- - - '>='
222
+ - - ">="
223
223
  - !ruby/object:Gem::Version
224
224
  version: 3.2.14
225
225
  type: :runtime
226
226
  prerelease: false
227
227
  version_requirements: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - ~>
229
+ - - "~>"
230
230
  - !ruby/object:Gem::Version
231
231
  version: '3.2'
232
- - - '>='
232
+ - - ">="
233
233
  - !ruby/object:Gem::Version
234
234
  version: 3.2.14
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: oj
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
- - - ~>
239
+ - - "~>"
240
240
  - !ruby/object:Gem::Version
241
241
  version: '2.6'
242
242
  type: :runtime
243
243
  prerelease: false
244
244
  version_requirements: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - ~>
246
+ - - "~>"
247
247
  - !ruby/object:Gem::Version
248
248
  version: '2.6'
249
249
  - !ruby/object:Gem::Dependency
250
250
  name: sshkey
251
251
  requirement: !ruby/object:Gem::Requirement
252
252
  requirements:
253
- - - ~>
253
+ - - "~>"
254
254
  - !ruby/object:Gem::Version
255
255
  version: '1.6'
256
- - - '>='
256
+ - - ">="
257
257
  - !ruby/object:Gem::Version
258
258
  version: 1.6.1
259
259
  type: :runtime
260
260
  prerelease: false
261
261
  version_requirements: !ruby/object:Gem::Requirement
262
262
  requirements:
263
- - - ~>
263
+ - - "~>"
264
264
  - !ruby/object:Gem::Version
265
265
  version: '1.6'
266
- - - '>='
266
+ - - ">="
267
267
  - !ruby/object:Gem::Version
268
268
  version: 1.6.1
269
269
  - !ruby/object:Gem::Dependency
270
270
  name: net-ssh
271
271
  requirement: !ruby/object:Gem::Requirement
272
272
  requirements:
273
- - - ~>
273
+ - - "~>"
274
274
  - !ruby/object:Gem::Version
275
275
  version: '2.8'
276
276
  type: :runtime
277
277
  prerelease: false
278
278
  version_requirements: !ruby/object:Gem::Requirement
279
279
  requirements:
280
- - - ~>
280
+ - - "~>"
281
281
  - !ruby/object:Gem::Version
282
282
  version: '2.8'
283
283
  - !ruby/object:Gem::Dependency
284
284
  name: parse-cron
285
285
  requirement: !ruby/object:Gem::Requirement
286
286
  requirements:
287
- - - ~>
287
+ - - "~>"
288
288
  - !ruby/object:Gem::Version
289
289
  version: '0.1'
290
- - - '>='
290
+ - - ">="
291
291
  - !ruby/object:Gem::Version
292
292
  version: 0.1.4
293
293
  type: :runtime
294
294
  prerelease: false
295
295
  version_requirements: !ruby/object:Gem::Requirement
296
296
  requirements:
297
- - - ~>
297
+ - - "~>"
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0.1'
300
- - - '>='
300
+ - - ">="
301
301
  - !ruby/object:Gem::Version
302
302
  version: 0.1.4
303
303
  - !ruby/object:Gem::Dependency
304
304
  name: mail
305
305
  requirement: !ruby/object:Gem::Requirement
306
306
  requirements:
307
- - - ~>
307
+ - - "~>"
308
308
  - !ruby/object:Gem::Version
309
309
  version: '2.5'
310
- - - '>='
310
+ - - ">="
311
311
  - !ruby/object:Gem::Version
312
312
  version: 2.5.4
313
313
  type: :runtime
314
314
  prerelease: false
315
315
  version_requirements: !ruby/object:Gem::Requirement
316
316
  requirements:
317
- - - ~>
317
+ - - "~>"
318
318
  - !ruby/object:Gem::Version
319
319
  version: '2.5'
320
- - - '>='
320
+ - - ">="
321
321
  - !ruby/object:Gem::Version
322
322
  version: 2.5.4
323
323
  - !ruby/object:Gem::Dependency
324
324
  name: twilio-ruby
325
325
  requirement: !ruby/object:Gem::Requirement
326
326
  requirements:
327
- - - ~>
327
+ - - "~>"
328
328
  - !ruby/object:Gem::Version
329
329
  version: '3.1'
330
- - - '>='
330
+ - - ">="
331
331
  - !ruby/object:Gem::Version
332
332
  version: 3.11.5
333
333
  type: :runtime
334
334
  prerelease: false
335
335
  version_requirements: !ruby/object:Gem::Requirement
336
336
  requirements:
337
- - - ~>
337
+ - - "~>"
338
338
  - !ruby/object:Gem::Version
339
339
  version: '3.1'
340
- - - '>='
340
+ - - ">="
341
341
  - !ruby/object:Gem::Version
342
342
  version: 3.11.5
343
343
  - !ruby/object:Gem::Dependency
344
344
  name: pagerduty
345
345
  requirement: !ruby/object:Gem::Requirement
346
346
  requirements:
347
- - - ~>
347
+ - - "~>"
348
348
  - !ruby/object:Gem::Version
349
349
  version: '1.3'
350
- - - '>='
350
+ - - ">="
351
351
  - !ruby/object:Gem::Version
352
352
  version: 1.3.4
353
353
  type: :runtime
354
354
  prerelease: false
355
355
  version_requirements: !ruby/object:Gem::Requirement
356
356
  requirements:
357
- - - ~>
357
+ - - "~>"
358
358
  - !ruby/object:Gem::Version
359
359
  version: '1.3'
360
- - - '>='
360
+ - - ">="
361
361
  - !ruby/object:Gem::Version
362
362
  version: 1.3.4
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: insidious
365
365
  requirement: !ruby/object:Gem::Requirement
366
366
  requirements:
367
- - - ~>
367
+ - - "~>"
368
368
  - !ruby/object:Gem::Version
369
- version: '0.1'
369
+ version: '0.2'
370
370
  type: :runtime
371
371
  prerelease: false
372
372
  version_requirements: !ruby/object:Gem::Requirement
373
373
  requirements:
374
- - - ~>
374
+ - - "~>"
375
375
  - !ruby/object:Gem::Version
376
- version: '0.1'
376
+ version: '0.2'
377
+ - !ruby/object:Gem::Dependency
378
+ name: escape
379
+ requirement: !ruby/object:Gem::Requirement
380
+ requirements:
381
+ - - '='
382
+ - !ruby/object:Gem::Version
383
+ version: 0.0.4
384
+ type: :runtime
385
+ prerelease: false
386
+ version_requirements: !ruby/object:Gem::Requirement
387
+ requirements:
388
+ - - '='
389
+ - !ruby/object:Gem::Version
390
+ version: 0.0.4
377
391
  - !ruby/object:Gem::Dependency
378
392
  name: mysql2
379
393
  requirement: !ruby/object:Gem::Requirement
380
394
  requirements:
381
- - - ~>
395
+ - - "~>"
382
396
  - !ruby/object:Gem::Version
383
397
  version: '0.3'
384
- - - '>='
398
+ - - ">="
385
399
  - !ruby/object:Gem::Version
386
400
  version: 0.3.15
387
401
  type: :runtime
388
402
  prerelease: false
389
403
  version_requirements: !ruby/object:Gem::Requirement
390
404
  requirements:
391
- - - ~>
405
+ - - "~>"
392
406
  - !ruby/object:Gem::Version
393
407
  version: '0.3'
394
- - - '>='
408
+ - - ">="
395
409
  - !ruby/object:Gem::Version
396
410
  version: 0.3.15
397
411
  - !ruby/object:Gem::Dependency
398
412
  name: bundler
399
413
  requirement: !ruby/object:Gem::Requirement
400
414
  requirements:
401
- - - ~>
415
+ - - "~>"
402
416
  - !ruby/object:Gem::Version
403
417
  version: '1.5'
404
418
  type: :development
405
419
  prerelease: false
406
420
  version_requirements: !ruby/object:Gem::Requirement
407
421
  requirements:
408
- - - ~>
422
+ - - "~>"
409
423
  - !ruby/object:Gem::Version
410
424
  version: '1.5'
411
425
  - !ruby/object:Gem::Dependency
412
426
  name: rake
413
427
  requirement: !ruby/object:Gem::Requirement
414
428
  requirements:
415
- - - ~>
429
+ - - "~>"
416
430
  - !ruby/object:Gem::Version
417
431
  version: '10.1'
418
432
  type: :development
419
433
  prerelease: false
420
434
  version_requirements: !ruby/object:Gem::Requirement
421
435
  requirements:
422
- - - ~>
436
+ - - "~>"
423
437
  - !ruby/object:Gem::Version
424
438
  version: '10.1'
425
439
  - !ruby/object:Gem::Dependency
426
440
  name: rspec
427
441
  requirement: !ruby/object:Gem::Requirement
428
442
  requirements:
429
- - - ~>
443
+ - - "~>"
430
444
  - !ruby/object:Gem::Version
431
445
  version: '2'
432
446
  type: :development
433
447
  prerelease: false
434
448
  version_requirements: !ruby/object:Gem::Requirement
435
449
  requirements:
436
- - - ~>
450
+ - - "~>"
437
451
  - !ruby/object:Gem::Version
438
452
  version: '2'
439
453
  - !ruby/object:Gem::Dependency
440
454
  name: simplecov
441
455
  requirement: !ruby/object:Gem::Requirement
442
456
  requirements:
443
- - - ~>
457
+ - - "~>"
444
458
  - !ruby/object:Gem::Version
445
459
  version: '0.8'
446
460
  type: :development
447
461
  prerelease: false
448
462
  version_requirements: !ruby/object:Gem::Requirement
449
463
  requirements:
450
- - - ~>
464
+ - - "~>"
451
465
  - !ruby/object:Gem::Version
452
466
  version: '0.8'
453
- description: "\n minicron is system that aims to make it easier to manage and monitor
454
- cron jobs.\n\n For more info see the project README on GitHub.\n "
467
+ description:
455
468
  email:
456
469
  - dev.jameswhite+minicron@gmail.com
457
470
  executables:
@@ -469,6 +482,7 @@ files:
469
482
  - lib/minicron/alert/pagerduty.rb
470
483
  - lib/minicron/alert/sms.rb
471
484
  - lib/minicron/cli.rb
485
+ - lib/minicron/cli/commands.rb
472
486
  - lib/minicron/constants.rb
473
487
  - lib/minicron/cron.rb
474
488
  - lib/minicron/hub/app.rb
@@ -500,8 +514,6 @@ files:
500
514
  - lib/minicron/hub/assets/fonts/lato-italic-400.woff
501
515
  - lib/minicron/hub/assets/fonts/lato-regular-400.woff
502
516
  - lib/minicron/hub/assets/js/ansi_up-1.1.1.min.js
503
- - lib/minicron/hub/assets/js/auth/ember-auth-9.0.7.min.js
504
- - lib/minicron/hub/assets/js/auth/ember-auth-request-jquery-1.0.3.min.js
505
517
  - lib/minicron/hub/assets/js/bootstrap-3.1.1.min.js
506
518
  - lib/minicron/hub/assets/js/ember-1.4.1.min.js
507
519
  - lib/minicron/hub/assets/js/ember-data-1.0.0-beta.7.f87cba88.min.js
@@ -546,6 +558,8 @@ files:
546
558
  - lib/minicron/transport/server.rb
547
559
  - lib/minicron/transport/ssh.rb
548
560
  - spec/invalid_config.toml
561
+ - spec/minicron/alert/pagerduty_spec.rb
562
+ - spec/minicron/alert/sms_spec.rb
549
563
  - spec/minicron/cli_spec.rb
550
564
  - spec/minicron/transport/client_spec.rb
551
565
  - spec/minicron/transport/faye/client_spec.rb
@@ -564,22 +578,26 @@ require_paths:
564
578
  - lib
565
579
  required_ruby_version: !ruby/object:Gem::Requirement
566
580
  requirements:
567
- - - '>='
581
+ - - ">="
568
582
  - !ruby/object:Gem::Version
569
583
  version: 1.9.3
570
584
  required_rubygems_version: !ruby/object:Gem::Requirement
571
585
  requirements:
572
- - - '>='
586
+ - - ">="
573
587
  - !ruby/object:Gem::Version
574
588
  version: '0'
575
- requirements: []
589
+ requirements:
590
+ - ruby-dev, you may need this for eventmachine
591
+ - build-essential, you may need this for eventmachine
576
592
  rubyforge_project:
577
593
  rubygems_version: 2.2.2
578
594
  signing_key:
579
595
  specification_version: 4
580
- summary: cli for minicron; a system a to manage and monitor cron jobs
596
+ summary: A system to make it easier to manage and monitor cron jobs
581
597
  test_files:
582
598
  - spec/invalid_config.toml
599
+ - spec/minicron/alert/pagerduty_spec.rb
600
+ - spec/minicron/alert/sms_spec.rb
583
601
  - spec/minicron/cli_spec.rb
584
602
  - spec/minicron/transport/client_spec.rb
585
603
  - spec/minicron/transport/faye/client_spec.rb