ldgr 0.1.4 → 0.1.5

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: 9413769b4964d7649101571b942c931ab99325e1
4
- data.tar.gz: bb1d1cef5d9f9e7cece4f2ce8f40e76fd61a596e
3
+ metadata.gz: b23b462886e541f96879732e48e5e7dadf33747e
4
+ data.tar.gz: 95e359c7dab832ee97cf9603bdb486526ffa280c
5
5
  SHA512:
6
- metadata.gz: dacde99fbdd340aa1e7f32886a46aecea5adedc4496ff03e7a9cb5484578acaac0078c83e62b9a8bbbf500963459e0716b744c0e4a23786c61a8763eb749a399
7
- data.tar.gz: 747ddba2ece84c1b4eea353b81c62bfec5a270222c592efb9faabaf795c3300bb080c4064aa802e952caea8a70217609cce1335bf9a1bb335e922910ca2dad67
6
+ metadata.gz: 0b4d4549ca799a65ca820a39623f19fb4ab830a5836ca885db265a18b3555ebee45c97904c69b671607f6f4587e0f648b377ed96de651e04f5d36169af18df78
7
+ data.tar.gz: 57cb8ccc05ffb83498e9e3527d6a352a5632600002c03787bac3c8eb7ea0ed4fcfab3df021dfb03c7949e3326e781a4b3ce3b561a01b3ebe96bd8bf456dffa9e
data/README.md CHANGED
@@ -37,6 +37,8 @@ Or install it yourself as:
37
37
 
38
38
  Type `ldgr -h` at the command-line to see available commands and options.
39
39
 
40
+ The CLI defaults the currency to **$**. You can set this yourself by adding a single currency character to `~/.config/ledger/default_currency`.
41
+
40
42
  ## CLI
41
43
  ```sh
42
44
  ldgr add --payee Brandon \
data/lib/ldgr/parser.rb CHANGED
@@ -9,13 +9,13 @@ require 'fileutils'
9
9
 
10
10
  module Ldgr
11
11
  class Parser
12
- DEFAULT_CURRENCY = '¥'
13
12
  FILEBASE = Dir.home + '/.config/ledger/'
14
13
  FILE = FILEBASE + 'transactions.dat'
15
- VERSION = Ldgr::VERSION
14
+ VERSION = Ldgr::VERSION # ~> NameError: uninitialized constant Ldgr::VERSION
16
15
  PROGRAM_NAME = 'ldgr'
17
16
  MATCH = /(?=(\n\d\d\d\d-\d\d-\d\d)(=\d\d\d\d-\d\d-\d\d)*)|\z/
18
17
  OTHER_MATCH = /(?=(\d\d\d\d-\d\d-\d\d)(=\d\d\d\d-\d\d-\d\d)*)/
18
+ DEFAULT_CURRENCY = Pathname(FILEBASE + '/default_currency').exist? ? Pathname(FILEBASE + '/default_currency').read.chomp : '$'
19
19
 
20
20
  def self.parse
21
21
  cli = OptionParser.new do |o|
data/lib/ldgr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ldgr
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Pittman