http-pulse 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/bin/http-pulse +11 -1
  3. metadata +4 -4
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'spec/rake/spectask'
6
6
 
7
7
  spec = Gem::Specification.new do |s|
8
8
  s.name = "http-pulse"
9
- s.version = "0.0.3"
9
+ s.version = "0.0.4"
10
10
  s.author = "Corey Donohoe"
11
11
  s.email = "atmos@atmos.org"
12
12
  s.homepage = "http://www.atmos.org/http-pulse"
@@ -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, drop it in ~/.http-pulse"
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
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-15 00:00:00 -07:00
18
+ date: 2010-08-23 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency