http-pulse 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/http-pulse +11 -1
- metadata +4 -4
data/Rakefile
CHANGED
data/bin/http-pulse
CHANGED
@@ -23,6 +23,11 @@ OptionParser.new do |opts|
|
|
23
23
|
options[:action] = :delete
|
24
24
|
options[:url] = action.to_s
|
25
25
|
end
|
26
|
+
|
27
|
+
opts.on("--register [TOKEN]", "The token you got at signup") do |token|
|
28
|
+
options[:action] = :register
|
29
|
+
options[:token] = token.to_s
|
30
|
+
end
|
26
31
|
end.parse!
|
27
32
|
|
28
33
|
begin
|
@@ -38,6 +43,11 @@ begin
|
|
38
43
|
else
|
39
44
|
puts "Unable to locate #{options[:url]} for your user"
|
40
45
|
end
|
46
|
+
when :register
|
47
|
+
File.open(File.expand_path("~/.http-pulse"), 'w') do |fp|
|
48
|
+
fp.puts(options[:token])
|
49
|
+
end
|
50
|
+
puts "Added your token, now try running 'http-pulse' to see your monitors"
|
41
51
|
else
|
42
52
|
response = api.get
|
43
53
|
if response.any?
|
@@ -61,7 +71,7 @@ rescue => e
|
|
61
71
|
puts e.class.to_s
|
62
72
|
puts e.message
|
63
73
|
$stderr.puts "Please get your API token from http://http-pulse.heroku.com"
|
64
|
-
$stderr.puts "Once you have it,
|
74
|
+
$stderr.puts "Once you have it, use http-pulse --register to add it"
|
65
75
|
exit(1)
|
66
76
|
end
|
67
77
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http-pulse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Donohoe
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-23 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|