abcde-sappy 0.1.0 → 0.1.1

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.
data/Rakefile CHANGED
@@ -15,5 +15,5 @@ end
15
15
 
16
16
  desc "Run bacon"
17
17
  task :bacon do
18
- puts `bacon #{Dir["bacon/**/*_bacon.rb"].join(" ")}`
18
+ puts `bacon #{Dir["spec/**/*_bacon.rb"].join(" ")}`
19
19
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -29,14 +29,8 @@ module Sappy
29
29
  end
30
30
 
31
31
  def refresh!
32
- response = request('accountinfo')
33
- @available_monitors = response.available_monitors
34
- @setup_monitors = response.setup_monitors
35
- @sms_alerts = response.sms_alerts
36
- response = request('summarystatistics')
37
- @up_monitors = response.up
38
- @down_monitors = response.down
39
- @inactive_monitors = response.inactive
32
+ refresh_account_info
33
+ refresh_summary_statistics
40
34
  end
41
35
 
42
36
  def monitors(ids = [])
@@ -60,5 +54,19 @@ module Sappy
60
54
  response = request('auth', "Email" => @username, "Password" => @password)
61
55
  @authkey = response.key
62
56
  end
57
+
58
+ def refresh_account_info
59
+ response = request('accountinfo')
60
+ @available_monitors = response.available_monitors
61
+ @setup_monitors = response.setup_monitors
62
+ @sms_alerts = response.sms_alerts
63
+ end
64
+
65
+ def refresh_summary_statistics
66
+ response = request('summarystatistics')
67
+ @up_monitors = response.up
68
+ @down_monitors = response.down
69
+ @inactive_monitors = response.inactive
70
+ end
63
71
  end
64
72
  end
@@ -18,6 +18,10 @@ module Sappy
18
18
  end
19
19
  end
20
20
 
21
+ it "should obtain an auth key" do
22
+ @account.authkey.should == "b7kks5mh1l300v5segaksm8gh3"
23
+ end
24
+
21
25
  describe "with no monitors" do
22
26
  it "has available monitors" do
23
27
  @account.available_monitors.should > 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abcde-sappy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Egan