lita-spendo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e3f11b6bcb6c0e9c1a62fac6d097b2286466022
4
- data.tar.gz: 3805fcb8ae423241a3bb5d0493f0a0a34d667c16
3
+ metadata.gz: 903c08d38803e5588fee8a7fa1b46d2cdba3f333
4
+ data.tar.gz: f4782ea88ba4602f7fe5a46007a9cd0a19f9c8ea
5
5
  SHA512:
6
- metadata.gz: 7a54b2a9a1e48b320892eef6b34e946154bb33ca2bde1cf871c1a57e0b8ca90b9a856ff8164a38506d8420fceacdfe2a543b22db04d4363cbec9767ee4bf453c
7
- data.tar.gz: c49840ae4e3569f5b564a90900a6dc9270a8c4f12ae3d2844b1fb34bcb3835eeee82f7faa5b93136cdc0cbd65dce96f8ebfe54759b2d7a672e74aa675aa972be
6
+ metadata.gz: bfaa4ff6c6f8f07273442e1d765ab8a0467a11c5ff2f37429774a87ee811fdaa11214afb8a22b62882ecc2deedfb37e2d7e3e633c2a49ec57a2412430bd7f291
7
+ data.tar.gz: e856c937f9f4debe417cc99b11454e2b86b1a8b979e17371c8d4e69ea61cf5c95f7013de21e4ef4fc853c01c0a3ea1a16811c4ead65af1f552c61dbc0d7c7f3b
@@ -43,23 +43,23 @@ module Lita
43
43
  alert_level = data['AlertLevel'].to_i
44
44
  categorized_fees = data['FeesByCategory']
45
45
 
46
- message = "@all The current fees alert threshold has been reached.<br>"
47
- message << "<br>Account: #{account}"
48
- message << "<br>Current fees: $#{current_fees}"
49
- message << "<br>Expected monthly fees: $#{expected_fees}" # TODO
50
- message << "<br>Fee level is at #{alert_level * 25}% of expected"
51
- message << "<br><br> Fee Category Breakdown<br><br>"
46
+ message = "@all The current fees alert threshold has been reached.\n"
47
+ message << "\nAccount: #{account}"
48
+ message << "\nCurrent fees: $#{current_fees}"
49
+ message << "\nExpected monthly fees: $#{expected_fees}" # TODO
50
+ message << "\nFee level is at #{alert_level * 25}% of expected"
51
+ message << "\n\n Fee Category Breakdown\n\n"
52
52
 
53
- message << "<table>"
54
53
  categorized_fees.each_pair do |k,v|
55
54
  value = v.to_f
56
- message << "<tr><td>#{k}</td><td align=\"right\"><pre>$#{sprintf('%8.2f', value.round(2))}</pre></td></tr>"
55
+ next if value == 0.0
56
+ message << "#{k.ljust(20)}: $#{sprintf('%8.2f', value.round(2))}\n"
57
57
  end
58
- message << "</table>"
59
58
 
60
- message << config.base_image_url + "/#{alert_level}.jpg"
59
+ url = config.base_image_url + "/#{alert_level}.jpg"
61
60
 
62
61
  response.reply message
62
+ response.reply url
63
63
  end
64
64
 
65
65
  attr_writer :billing_history
data/lita-spendo.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-spendo"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["Chris Chalfant"]
5
5
  spec.email = ["cchalfant@leafsoftwaresolutions.com"]
6
6
  spec.description = "Lita handler for displaying AWS billing"
@@ -25,11 +25,11 @@ describe Lita::Handlers::Spendo, lita_handler: true do
25
25
  end
26
26
 
27
27
  it 'shows the account' do
28
- expect(replies.first).to include("<br>Account: foo")
28
+ expect(replies.first).to include("Account: foo")
29
29
  end
30
30
 
31
31
  it 'shows the url' do
32
- expect(replies.first).to include("http://foo.com/3.jpg")
32
+ expect(replies).to include("http://foo.com/3.jpg")
33
33
  end
34
34
 
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-spendo
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
  - Chris Chalfant