dkron-rb 0.11.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +0 -0
- data/README.md +8 -7
- data/Rakefile +0 -4
- data/dkron-rb.gemspec +10 -11
- data/docs/DefaultApi.md +0 -0
- data/docs/Execution.md +0 -0
- data/docs/ExecutionsApi.md +1 -1
- data/docs/ExecutorConfig.md +0 -0
- data/docs/Job.md +0 -0
- data/docs/JobsApi.md +60 -6
- data/docs/Member.md +0 -0
- data/docs/MembersApi.md +0 -0
- data/docs/Processors.md +0 -0
- data/docs/Status.md +3 -0
- data/git_push.sh +3 -3
- data/lib/dkron-rb.rb +2 -2
- data/lib/dkron-rb/api/default_api.rb +12 -21
- data/lib/dkron-rb/api/executions_api.rb +6 -9
- data/lib/dkron-rb/api/jobs_api.rb +73 -33
- data/lib/dkron-rb/api/members_api.rb +6 -9
- data/lib/dkron-rb/api_client.rb +10 -10
- data/lib/dkron-rb/api_error.rb +2 -2
- data/lib/dkron-rb/configuration.rb +3 -3
- data/lib/dkron-rb/models/execution.rb +7 -11
- data/lib/dkron-rb/models/executor_config.rb +7 -11
- data/lib/dkron-rb/models/job.rb +9 -13
- data/lib/dkron-rb/models/member.rb +7 -11
- data/lib/dkron-rb/models/processors.rb +7 -11
- data/lib/dkron-rb/models/status.rb +37 -11
- data/lib/dkron-rb/version.rb +3 -3
- data/spec/api/default_api_spec.rb +5 -8
- data/spec/api/executions_api_spec.rb +3 -4
- data/spec/api/jobs_api_spec.rb +19 -12
- data/spec/api/members_api_spec.rb +3 -4
- data/spec/api_client_spec.rb +36 -36
- data/spec/configuration_spec.rb +10 -10
- data/spec/models/execution_spec.rb +8 -9
- data/spec/models/executor_config_spec.rb +2 -3
- data/spec/models/job_spec.rb +20 -21
- data/spec/models/member_spec.rb +13 -14
- data/spec/models/processors_spec.rb +2 -3
- data/spec/models/status_spec.rb +20 -3
- data/spec/spec_helper.rb +2 -2
- metadata +18 -45
- data/Gemfile.lock +0 -67
- data/LICENSE +0 -201
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/config.json +0 -5
- data/docs/Agent.md +0 -7
- data/docs/ExecutorShell.md +0 -10
- data/docs/InlineResponse200.md +0 -10
- data/docs/MainApi.md +0 -90
- data/docs/ProcessorFiles.md +0 -9
- data/docs/ProcessorLog.md +0 -8
- data/docs/ProcessorSyslog.md +0 -8
- data/docs/Serf.md +0 -7
- data/docs/Tags.md +0 -7
- data/lib/dkron-rb/cron.rb +0 -152
- data/lib/dkron-rb/models/agent.rb +0 -152
- data/lib/dkron-rb/models/executor_shell.rb +0 -208
- data/lib/dkron-rb/models/inline_response_200.rb +0 -181
- data/lib/dkron-rb/models/processor_files.rb +0 -198
- data/lib/dkron-rb/models/processor_log.rb +0 -189
- data/lib/dkron-rb/models/processor_syslog.rb +0 -189
- data/lib/dkron-rb/models/serf.rb +0 -152
- data/lib/dkron-rb/models/tags.rb +0 -152
- data/lib/dkron-rb/numeric_seconds.rb +0 -48
- data/lib/dkron.rb +0 -9
- data/node_modules/isarray/build/build.js +0 -209
- data/node_modules/mime/build/build.js +0 -11
- data/node_modules/mime/build/test.js +0 -57
@@ -1,57 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Usage: node test.js
|
3
|
-
*/
|
4
|
-
|
5
|
-
var mime = require('../mime');
|
6
|
-
var assert = require('assert');
|
7
|
-
var path = require('path');
|
8
|
-
|
9
|
-
//
|
10
|
-
// Test mime lookups
|
11
|
-
//
|
12
|
-
|
13
|
-
assert.equal('text/plain', mime.lookup('text.txt')); // normal file
|
14
|
-
assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
|
15
|
-
assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
|
16
|
-
assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
|
17
|
-
assert.equal('text/plain', mime.lookup('.txt')); // nameless
|
18
|
-
assert.equal('text/plain', mime.lookup('txt')); // extension-only
|
19
|
-
assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
|
20
|
-
assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
|
21
|
-
assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
|
22
|
-
assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
|
23
|
-
|
24
|
-
//
|
25
|
-
// Test extensions
|
26
|
-
//
|
27
|
-
|
28
|
-
assert.equal('txt', mime.extension(mime.types.text));
|
29
|
-
assert.equal('html', mime.extension(mime.types.htm));
|
30
|
-
assert.equal('bin', mime.extension('application/octet-stream'));
|
31
|
-
assert.equal('bin', mime.extension('application/octet-stream '));
|
32
|
-
assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
|
33
|
-
assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
|
34
|
-
assert.equal('html', mime.extension('text/html; charset=UTF-8'));
|
35
|
-
assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
|
36
|
-
assert.equal('html', mime.extension('text/html;charset=UTF-8'));
|
37
|
-
assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
|
38
|
-
assert.equal(undefined, mime.extension('unrecognized'));
|
39
|
-
|
40
|
-
//
|
41
|
-
// Test node.types lookups
|
42
|
-
//
|
43
|
-
|
44
|
-
assert.equal('application/font-woff', mime.lookup('file.woff'));
|
45
|
-
assert.equal('application/octet-stream', mime.lookup('file.buffer'));
|
46
|
-
assert.equal('audio/mp4', mime.lookup('file.m4a'));
|
47
|
-
assert.equal('font/opentype', mime.lookup('file.otf'));
|
48
|
-
|
49
|
-
//
|
50
|
-
// Test charsets
|
51
|
-
//
|
52
|
-
|
53
|
-
assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
|
54
|
-
assert.equal(undefined, mime.charsets.lookup(mime.types.js));
|
55
|
-
assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
|
56
|
-
|
57
|
-
console.log('\nAll tests passed');
|