watcard 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9661609eb1149caaeed55ce608bbac94c11c73fb
4
- data.tar.gz: 1d5f0f4a35af2a4ed0a5ff82d41094d2f9a4d4a8
3
+ metadata.gz: c946b3c141c0d0328ab669444e0951bc2b00c26c
4
+ data.tar.gz: 7b0d61a8e48afdb344daf73878db59536fa525ef
5
5
  SHA512:
6
- metadata.gz: 832d8d7441444973fbe74fdf784b6810ed6aafd44db08e50b7dc10549f65caa678c03de4b34ecd36a1a291ca08b4f0361874c9e4f3dec4a42793c7b36ff7a06a
7
- data.tar.gz: 71c216a8a29ddfae5686377b55f30860f0c4c28ff537ec38a7fcf918315e6367e794b7ed9e5296844fa3f32cc0934319f5522f33e06f81f368c3fa7513015249
6
+ metadata.gz: c1af6fc7a297b00374378dd5457d4b5fbf6ae651dea5a6b283f0bd97f4cf61ef3dabe3352d295807d6551f0beb2fa4d8693d6bace46b9a8ed6518f271ee5dfab
7
+ data.tar.gz: 46072efbe62a64a58802a15fd2c9faecec9f82e7ba561149d44eabcf3afbf5d31e509f630b8f663536903c3d98c0ad6bf96de1a61618d024610c0ea8dcc019be
data/README.md CHANGED
@@ -27,6 +27,8 @@ accounts:
27
27
  4: ["Expenses:Misc University","Assets:WatCard:Flex"]
28
28
  ```
29
29
 
30
+ *Note: you can find the web UI for setting your pin and online access [here](https://account.watcard.uwaterloo.ca/).*
31
+
30
32
  ## Usage
31
33
 
32
34
  ### History
@@ -35,7 +35,8 @@ module Watcard
35
35
  def parse_loc(loc)
36
36
  return "V1 Cafeteria" if loc =~ /WAT-FS-V1/
37
37
  return "Liquid Assets" if loc =~ /WAT-FS-LA/
38
- "Campus"
38
+ return "V1 Laundry" if loc =~ /V1 LAUNDRY/
39
+ loc
39
40
  end
40
41
 
41
42
  def history(date)
@@ -59,7 +60,9 @@ module Watcard
59
60
  return hist if hist.empty?
60
61
  hist.each do |a|
61
62
  h = a[:time].hour
62
- type = if h < 12
63
+ type = if a[:loc] =~ /laundry/i
64
+ "Laundry"
65
+ elsif h < 11
63
66
  "Breakfast"
64
67
  elsif h < 17
65
68
  "Lunch"
@@ -126,7 +129,7 @@ END
126
129
  meals = fetch_meals(days_ago)
127
130
  total = 0
128
131
  meals.each do |m|
129
- total += m[:amount]
132
+ total += m[:amount] if m[:balance] == 1
130
133
  puts "#{m[:meal]}: $#{sprintf('%.2f', m[:amount])} @ #{m[:loc]}"
131
134
  end
132
135
  budget = @conf['budget']
@@ -1,3 +1,3 @@
1
1
  module Watcard
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watcard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Hume
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-06 00:00:00.000000000 Z
11
+ date: 2014-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri