ballista 0.0.3 → 0.0.4

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: df187f2848829cd2041ff61c0608e9ef6565cd4d
4
- data.tar.gz: dfe92f7df442936a4663f23a7f0d86948675756d
3
+ metadata.gz: c52126fda344b882a9de292c8c7b6adfa9764267
4
+ data.tar.gz: f80a159cd931a9f4721f7911d37eda082a316a25
5
5
  SHA512:
6
- metadata.gz: 45e390ce041a275e89491de8455016b4b34804a6682e7f24d75d9f29c6227c32af84246af9a610ee392e5af6746ee28c82a4a8f1989486316f0d8e42b054f538
7
- data.tar.gz: c6f2d58b24dcbb3cb8a988f8d89f0b4c9d27e924a01d23bbac3b60fb44996cad8d86a4fb2fa8786108e17de1f67d01072058b215c81a1d153a7c3e2437d2e790
6
+ metadata.gz: 8790abc1a0a8d8036b9ca99471ebc3ee6dba5974486624137f2ebc90fe1d4d3677b15f000d89ba61ae50bc582d4bca180e7dc17b8893551463b5a398eaddd1a7
7
+ data.tar.gz: 52b56e48e7ce02855bf21a8156635559960554acd53eff9b5bd22c72236a3e7ce798bf1d80c64cf2e40086a462d6159e0e03946bb90bf2264ab396ad166ad79b
data/README.md CHANGED
@@ -12,6 +12,37 @@ Helper for projecting based on [Ledger](http://www.ledger-cli.org/) format.
12
12
 
13
13
  ## Usage
14
14
 
15
+ To make a new Projection object, use `Ballista.new(entries: my_config)`. my_config should be a hash of projection entries, like this:
16
+
17
+ ```
18
+ - name: Pay Check
19
+ when:
20
+ - 15
21
+ - 30
22
+ actions:
23
+ Expenses:Taxes:federal_income: $729.26
24
+ Expenses:Taxes:va_income: $215.14
25
+ Expenses:Taxes:social_security: $299.46
26
+ Expenses:Taxes:medicare: $70.04
27
+ Assets:Checking:simple: $2739.10
28
+ Assets:401K:Trad:work: $772.00
29
+ Income:Salary:work: $-4825.00
30
+ - name: Automatic transfer to Savings
31
+ when: 2
32
+ actions:
33
+ Assets:Savings:ally: $1000.00
34
+ Assets:Checking:simple: null
35
+ - name: Rent
36
+ when: 2
37
+ actions:
38
+ Expenses:Bills:rent: $2800.00
39
+ Assets:Checking:simple: null
40
+ ```
41
+
42
+ To do a projection, call `.project(start_dt, end_dt)` on your created object. The dates should be Ruby Date objects.
43
+
44
+ The returned object will be a Ledger journal, courtesy of [libledger](https://github.com/akerl/libledger). As such, you can inspect the .entries as well as use .to_s or puts to print it in ledger text file format.
45
+
15
46
  ## Installation
16
47
 
17
48
  gem install ballista
@@ -39,7 +39,7 @@ module Ballista
39
39
  calendar[fake_day].map do |entry|
40
40
  next if out_of_bounds?(entry, date)
41
41
  build_entry(entry, date)
42
- end
42
+ end.compact
43
43
  end
44
44
  end
45
45
 
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Set the version (needed for Mercenary -v)
3
3
  module Ballista
4
- VERSION = '0.0.3'.freeze
4
+ VERSION = '0.0.4'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ballista
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-25 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libledger