canary 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -0
- data/bin/canary +53 -0
- data/canary.rdoc +5 -0
- metadata +78 -0
data/README.rdoc
ADDED
data/bin/canary
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# 1.9 adds realpath to resolve symlinks; 1.8 doesn't
|
3
|
+
# have this method, so we add it so we get resolved symlinks
|
4
|
+
# and compatibility
|
5
|
+
unless File.respond_to? :realpath
|
6
|
+
class File #:nodoc:
|
7
|
+
def self.realpath path
|
8
|
+
return realpath(File.readlink(path)) if symlink?(path)
|
9
|
+
path
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
$: << File.expand_path(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
14
|
+
require 'rubygems'
|
15
|
+
require 'gli'
|
16
|
+
require 'canary_version'
|
17
|
+
|
18
|
+
include GLI
|
19
|
+
|
20
|
+
program_desc 'Describe your application here'
|
21
|
+
|
22
|
+
version Canary::VERSION
|
23
|
+
|
24
|
+
desc 'Add a site to be monitored'
|
25
|
+
arg_name '[url]'
|
26
|
+
command :add do |c|
|
27
|
+
c.action do |global_options,options,args|
|
28
|
+
raise "we haven't actually implemented this..."
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
pre do |global,command,options,args|
|
33
|
+
# Pre logic here
|
34
|
+
# Return true to proceed; false to abort and not call the
|
35
|
+
# chosen command
|
36
|
+
# Use skips_pre before a command to skip this block
|
37
|
+
# on that command only
|
38
|
+
true
|
39
|
+
end
|
40
|
+
|
41
|
+
post do |global,command,options,args|
|
42
|
+
# Post logic here
|
43
|
+
# Use skips_post before a command to skip this
|
44
|
+
# block on that command only
|
45
|
+
end
|
46
|
+
|
47
|
+
on_error do |exception|
|
48
|
+
# Error logic here
|
49
|
+
# return false to skip default error handling
|
50
|
+
true
|
51
|
+
end
|
52
|
+
|
53
|
+
exit GLI.run(ARGV)
|
data/canary.rdoc
ADDED
metadata
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: canary
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Michael Gorsuch
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &8557060 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *8557060
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rdoc
|
27
|
+
requirement: &8556500 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *8556500
|
36
|
+
description:
|
37
|
+
email: michael.gorsuch@gmail.com
|
38
|
+
executables:
|
39
|
+
- canary
|
40
|
+
extensions: []
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README.rdoc
|
43
|
+
- canary.rdoc
|
44
|
+
files:
|
45
|
+
- bin/canary
|
46
|
+
- README.rdoc
|
47
|
+
- canary.rdoc
|
48
|
+
homepage: http://github.com/canary-io
|
49
|
+
licenses: []
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options:
|
52
|
+
- --title
|
53
|
+
- canary
|
54
|
+
- --main
|
55
|
+
- README.rdoc
|
56
|
+
- -ri
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
requirements: []
|
73
|
+
rubyforge_project:
|
74
|
+
rubygems_version: 1.8.11
|
75
|
+
signing_key:
|
76
|
+
specification_version: 3
|
77
|
+
summary: demo
|
78
|
+
test_files: []
|