rock_books 0.11.0 → 0.12.0

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
  SHA256:
3
- metadata.gz: 1a8a97b91bfab197a09e82f35e6561831edb0870e25c612344c98b262664bee4
4
- data.tar.gz: 0dafb32fa34cf005ad0f2d967919ae00ff943fe11c5ab0326876172af2ce982d
3
+ metadata.gz: c589f9f4d14bfd6f46b7a8ee583137b019b9edadb880771f5da53c84ab2b1c89
4
+ data.tar.gz: 4ce008185ecb726bba7b4b5cc4a76f29070d39f923f02d37fb3d08957d4e4af9
5
5
  SHA512:
6
- metadata.gz: bb122c867c07f9ec2ee5d7fc1b5951b90ee13eeb3472830660959588927ca20ddc84555240f197297d8a9d120970523872464dd6349ce05921d392c9c3f9d1f1
7
- data.tar.gz: c5cdd3272ae72c67c28e011d4c57710289f78cd7b396a809c6875eb442d9665be23a2eb5f2ba54b2e4e61af9659ffb490ec83e80bdab80cb711708c40d771aed
6
+ metadata.gz: dc57866bc651ec72584e6d38e3d1c0e253bf72b8888dbc20a475c96344d0a6a6ef04505389e9273844c3b5673577e837fcffa47fe4595e4145f5a00e0bda7c03
7
+ data.tar.gz: c0fdc71bd1070360285e78eb31c1cb3b80df27d03b120219f9e0c6d973b924e1f6f5c3b8727753aabaa9ab4db54792fdc816ee388f3eb62f565dc1ba3df95dcd
data/RELEASE_NOTES.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  [[go to README](README.md)]
4
4
 
5
+ ### v0.12.0
6
+
7
+ * Fix balance sheet grand total computation.
8
+ * Update bundler version constraint to ">= 2.2.33" as per dependabot.
9
+
10
+
5
11
  ### v0.11.0
6
12
 
7
13
  * Add and fix documentation, especially addition of REPORTS.md about viewing the generated reports.
@@ -23,17 +23,21 @@ class BsIsData
23
23
  BsIsSectionData.new(type, context, journals_acct_totals).fetch
24
24
  end
25
25
 
26
+ def grand_total(sections)
27
+ (sections[:asset][:total] - sections[:liability][:total] - sections[:equity][:total]).round(2)
28
+ end
26
29
 
27
30
  def bal_sheet_data
31
+ sections = {
32
+ asset: section_data(:asset),
33
+ liability: section_data(:liability),
34
+ equity: section_data(:equity),
35
+ }
28
36
  {
29
37
  end_date: end_date,
30
38
  entity: context.entity,
31
- sections: {
32
- asset: section_data(:asset),
33
- liability: section_data(:liability),
34
- equity: section_data(:equity),
35
- },
36
- grand_total: journals_acct_totals.values.sum.round(2)
39
+ sections: sections,
40
+ grand_total: grand_total(sections)
37
41
  }
38
42
  end
39
43
 
@@ -1,4 +1,4 @@
1
1
  module RockBooks
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.0'
3
3
  PROJECT_URL = 'https://github.com/keithrbennett/rock_books'
4
4
  end
data/rock_books.gemspec CHANGED
@@ -1,42 +1,41 @@
1
1
 
2
- lib = File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "rock_books/version"
4
+ require 'rock_books/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "rock_books"
7
+ spec.name = 'rock_books'
8
8
  spec.version = RockBooks::VERSION
9
- spec.authors = ["Keith Bennett"]
10
- spec.email = ["keithrbennett@gmail.com"]
9
+ spec.authors = ['Keith Bennett']
10
+ spec.email = ['keithrbennett@gmail.com']
11
11
 
12
12
  spec.summary = %q{Very basic accounting package.}
13
13
  spec.description = %q{Extremely primitive accounting software.}
14
- spec.homepage = "http://example.com"
15
- spec.license = "MIT"
14
+ spec.homepage = 'http://example.com'
15
+ spec.license = 'MIT'
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
19
19
  # if spec.respond_to?(:metadata)
20
- # spec.metadata["allowed_push_host"] = ": Set to 'http://mygemserver.com'"
20
+ # spec.metadata['allowed_push_host'] = ': Set to 'http://mygemserver.com''
21
21
  # else
22
- # raise "RubyGems 2.0 or newer is required to protect against " \
23
- # "public gem pushes."
22
+ # raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
24
23
  # end
25
24
 
26
25
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
26
  f.match(%r{^(test|spec|features)/})
28
27
  end
29
- spec.bindir = "exe"
28
+ spec.bindir = 'exe'
30
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
- spec.require_paths = ["lib"]
30
+ spec.require_paths = ['lib']
32
31
 
33
- spec.add_dependency 'amazing_print', '> 0'
34
- spec.add_dependency 'os', '> 1.0.0'
35
- spec.add_dependency 'pry', '> 0.0.0'
36
- spec.add_dependency 'prawn', '>= 2.1'
37
- spec.add_dependency 'tty-progressbar'
32
+ spec.add_dependency 'amazing_print', '>= 1.4.0', '< 2'
33
+ spec.add_dependency 'os', '> 1.0.0', '< 2'
34
+ spec.add_dependency 'pry', '>= 0.14.2', '< 2'
35
+ spec.add_dependency 'prawn', '>= 2.4.0', '< 3'
36
+ spec.add_dependency 'tty-progressbar', '0.18.2', '< 2'
38
37
 
39
- spec.add_development_dependency "bundler", "~> 2.0"
40
- spec.add_development_dependency "rake", ">= 12.3.3"
41
- spec.add_development_dependency "rspec", "~> 3.0"
38
+ spec.add_development_dependency 'bundler', '>= 2.2.33', '< 3'
39
+ spec.add_development_dependency 'rake', '> 13.0.6', '< 14'
40
+ spec.add_development_dependency 'rspec', '> 3.12.0', '< 4'
42
41
  end
@@ -1,64 +1,64 @@
1
- @doc_type: chart_of_accounts
2
- @title: Chart of Accounts - 2018
3
- @entity: XYZ Consulting, Inc.
4
- @start_date: 2018-01-01
5
- @end_date: 2018-12-31
6
-
7
-
8
- # Assets
9
-
10
- ck.hsbc A HSBC Checking
11
- paypal A Paypal
12
- accts.rec A Accounts Receivable
13
-
14
-
15
- # Liabilities
16
-
17
- cc.hsbc.visa L Visa Credit Card
18
- loan.to.sh L Loan Payable to Shareholder
19
-
20
-
21
- # Equity
22
-
23
- own.equity O Owner's Equity
24
- ret.earn O Retained Earnings
25
-
26
-
27
- # Income
28
-
29
- sls.cons I Sales - Consulting
30
-
31
-
32
- # Expenses
33
-
34
- bank.fees E Bank Charges
35
- books.refs E Books, Screencasts, References
36
- conf.fees E Conference Fees
37
- cowork.fees E Coworking Fees
38
- govt.fees E Government Fees
39
- inet.fees E Internet Service, Domain, and Hosting Fees
40
- insurance E Insurance
41
- int.exp E Interest Expense
42
- mktng.exp E Marketing Expenses
43
- meals.ent E Meals & Entertainment
44
- misc.exp E Miscellaneous Expenses
45
- prof.fees E Professional Fees
46
- repair.maint E Repair & Maintenance
47
- ship.exp E Shipping and Mailing Expenses
48
- sw.exp E Software Expense
49
- supplies E Supplies
50
- cc.proc E Credit Card Processing Fees
51
- tr.airfare E Travel - Air Fares
52
- tr.autorent E Travel - Auto Rental
53
- tr.gas.etc E Travel - Gas, Oil, Tolls, etc.
54
- tr.govt E Travel - Government Fees
55
- tr.lodging E Travel - Lodging
56
- tr.m.i E Travel - Meals & Incidentals
57
- tr.mileage E Travel - Mileage Allowance
58
- tr.misc E Travel - Miscellaneous
59
- tr.parking E Travel - Parking
60
- tr.perdiem.mi E Travel - Per Diem (Meals and Incidentals)
61
- tr.taxi E Travel - Taxi
62
- tr.trainfare E Travel - Train Fare
63
- tr.m.e E Meals and Entertainment
64
- tr.unclass E Expenses Not Yet Classified
1
+ @doc_type: chart_of_accounts
2
+ @title: Chart of Accounts - 2018
3
+ @entity: XYZ Consulting, Inc.
4
+ @start_date: 2018-01-01
5
+ @end_date: 2018-12-31
6
+
7
+
8
+ # Assets
9
+
10
+ ck.hsbc A HSBC Checking
11
+ paypal A Paypal
12
+ accts.rec A Accounts Receivable
13
+
14
+
15
+ # Liabilities
16
+
17
+ cc.hsbc.visa L Visa Credit Card
18
+ loan.to.sh L Loan Payable to Shareholder
19
+
20
+
21
+ # Equity
22
+
23
+ own.equity O Owner's Equity
24
+ ret.earn O Retained Earnings
25
+
26
+
27
+ # Income
28
+
29
+ sls.cons I Sales - Consulting
30
+
31
+
32
+ # Expenses
33
+
34
+ bank.fees E Bank Charges
35
+ books.refs E Books, Screencasts, References
36
+ conf.fees E Conference Fees
37
+ cowork.fees E Coworking Fees
38
+ govt.fees E Government Fees
39
+ inet.fees E Internet Service, Domain, and Hosting Fees
40
+ insurance E Insurance
41
+ int.exp E Interest Expense
42
+ mktng.exp E Marketing Expenses
43
+ meals.ent E Meals & Entertainment
44
+ misc.exp E Miscellaneous Expenses
45
+ prof.fees E Professional Fees
46
+ repair.maint E Repair & Maintenance
47
+ ship.exp E Shipping and Mailing Expenses
48
+ sw.exp E Software Expense
49
+ supplies E Supplies
50
+ cc.proc E Credit Card Processing Fees
51
+ tr.airfare E Travel - Air Fares
52
+ tr.autorent E Travel - Auto Rental
53
+ tr.gas.etc E Travel - Gas, Oil, Tolls, etc.
54
+ tr.govt E Travel - Government Fees
55
+ tr.lodging E Travel - Lodging
56
+ tr.m.i E Travel - Meals & Incidentals
57
+ tr.mileage E Travel - Mileage Allowance
58
+ tr.misc E Travel - Miscellaneous
59
+ tr.parking E Travel - Parking
60
+ tr.perdiem.mi E Travel - Per Diem (Meals and Incidentals)
61
+ tr.taxi E Travel - Taxi
62
+ tr.trainfare E Travel - Train Fare
63
+ tr.m.e E Meals and Entertainment
64
+ tr.unclass E Expenses Not Yet Classified
@@ -1,14 +1,14 @@
1
- @doc_type: journal
2
- @title: HSBC Checking Disbursements Journal - 2018
3
- @account_code: ck.hsbc
4
- @debit_or_credit: debit
5
- @short_name: ck.hsbc.disb
6
- @date_prefix: 2018-
7
-
8
- 01-01 -5000.00 own.equity
9
- Initial Deposit from Shareholder
10
-
11
- 01-05 2000.00 cc.hsbc.visa
12
-
13
- 01-07 -10000.00 sls.cons
14
- Invoice #437, Dec. 2017 work, ABC, Inc.
1
+ @doc_type: journal
2
+ @title: HSBC Checking Disbursements Journal - 2018
3
+ @account_code: ck.hsbc
4
+ @debit_or_credit: debit
5
+ @short_name: ck.hsbc.disb
6
+ @date_prefix: 2018-
7
+
8
+ 01-01 -5000.00 own.equity
9
+ Initial Deposit from Shareholder
10
+
11
+ 01-05 2000.00 cc.hsbc.visa
12
+
13
+ 01-07 -10000.00 sls.cons
14
+ Invoice #437, Dec. 2017 work, ABC, Inc.
@@ -1,14 +1,14 @@
1
- @doc_type: general_journal
2
- @title: General Journal - 2018
3
- @date_prefix: 2018-
4
- @short_name: general
5
-
6
- 01-08 tr.airfare 300.00 loan.to.sh -300.00
7
- Phoenix conference air ticket paid on personal credit card
8
-
9
- 01-20 tr.perdiem.mi 495.00 loan.to.sh -495.00
10
- Per diem allowance for Phoenix conference (see worksheet)
11
-
12
- 01-31 tr.mileage 117.70 loan.to.sh -117.70
13
- Mileage reimbursement for business travel of January 2018 (see worksheet)
14
-
1
+ @doc_type: general_journal
2
+ @title: General Journal - 2018
3
+ @date_prefix: 2018-
4
+ @short_name: general
5
+
6
+ 01-08 tr.airfare 300.00 loan.to.sh -300.00
7
+ Phoenix conference air ticket paid on personal credit card
8
+
9
+ 01-20 tr.perdiem.mi 495.00 loan.to.sh -495.00
10
+ Per diem allowance for Phoenix conference (see worksheet)
11
+
12
+ 01-31 tr.mileage 117.70 loan.to.sh -117.70
13
+ Mileage reimbursement for business travel of January 2018 (see worksheet)
14
+
@@ -1,32 +1,32 @@
1
- @doc_type: journal
2
- @title: HSBC Visa Journal - 2018
3
- @account_code: cc.hsbc.visa
4
- @short_name: hsbc_visa
5
- @debit_or_credit: debit
6
- @date_prefix: 2018-
7
-
8
- 01-01 257.25 supplies
9
- Office Supplies
10
- Receipt: 01/2018-01-01-sample-receipt.jpg
11
-
12
- 01-02 750 insurance
13
- Professional insurance for the year 2018, Hartford Insurance
14
- Receipt: 01/2018-01-02-hartford-insurance.pdf
15
-
16
- 01-02 100 cowork.fees
17
- New Work City coworking fee for the month of January
18
- Receipt: 01/2018-01-02-nwc.pdf
19
-
20
- 01-06 500 conf.fees
21
- Phoenix conference registration fee
22
- Receipt: 01/2018-01-06-phoenix-conference-registration.pdf
23
-
24
- 01-20 400 tr.lodging
25
- Hampton Inn Phoenix (conference)
26
- Receipt: 01/2018-01-20-phoenix-hampton.pdf
27
-
28
- 02-01 100 cowork.fees
29
- New Work City coworking fee for the month of February
30
- Receipt: 02/2018-02-01-nwc.pdf
31
-
32
-
1
+ @doc_type: journal
2
+ @title: HSBC Visa Journal - 2018
3
+ @account_code: cc.hsbc.visa
4
+ @short_name: hsbc_visa
5
+ @debit_or_credit: debit
6
+ @date_prefix: 2018-
7
+
8
+ 01-01 257.25 supplies
9
+ Office Supplies
10
+ Receipt: 01/2018-01-01-sample-receipt.jpg
11
+
12
+ 01-02 750 insurance
13
+ Professional insurance for the year 2018, Hartford Insurance
14
+ Receipt: 01/2018-01-02-hartford-insurance.pdf
15
+
16
+ 01-02 100 cowork.fees
17
+ New Work City coworking fee for the month of January
18
+ Receipt: 01/2018-01-02-nwc.pdf
19
+
20
+ 01-06 500 conf.fees
21
+ Phoenix conference registration fee
22
+ Receipt: 01/2018-01-06-phoenix-conference-registration.pdf
23
+
24
+ 01-20 400 tr.lodging
25
+ Hampton Inn Phoenix (conference)
26
+ Receipt: 01/2018-01-20-phoenix-hampton.pdf
27
+
28
+ 02-01 100 cowork.fees
29
+ New Work City coworking fee for the month of February
30
+ Receipt: 02/2018-02-01-nwc.pdf
31
+
32
+
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_books
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Bennett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2023-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.0
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0'
22
+ version: '2'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ">"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '0'
29
+ version: 1.4.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: os
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +37,9 @@ dependencies:
31
37
  - - ">"
32
38
  - !ruby/object:Gem::Version
33
39
  version: 1.0.0
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '2'
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,90 +47,129 @@ dependencies:
38
47
  - - ">"
39
48
  - !ruby/object:Gem::Version
40
49
  version: 1.0.0
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '2'
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: pry
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
45
- - - ">"
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.14.2
60
+ - - "<"
46
61
  - !ruby/object:Gem::Version
47
- version: 0.0.0
62
+ version: '2'
48
63
  type: :runtime
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
- - - ">"
67
+ - - ">="
53
68
  - !ruby/object:Gem::Version
54
- version: 0.0.0
69
+ version: 0.14.2
70
+ - - "<"
71
+ - !ruby/object:Gem::Version
72
+ version: '2'
55
73
  - !ruby/object:Gem::Dependency
56
74
  name: prawn
57
75
  requirement: !ruby/object:Gem::Requirement
58
76
  requirements:
59
77
  - - ">="
60
78
  - !ruby/object:Gem::Version
61
- version: '2.1'
79
+ version: 2.4.0
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '3'
62
83
  type: :runtime
63
84
  prerelease: false
64
85
  version_requirements: !ruby/object:Gem::Requirement
65
86
  requirements:
66
87
  - - ">="
67
88
  - !ruby/object:Gem::Version
68
- version: '2.1'
89
+ version: 2.4.0
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '3'
69
93
  - !ruby/object:Gem::Dependency
70
94
  name: tty-progressbar
71
95
  requirement: !ruby/object:Gem::Requirement
72
96
  requirements:
73
- - - ">="
97
+ - - '='
74
98
  - !ruby/object:Gem::Version
75
- version: '0'
99
+ version: 0.18.2
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: '2'
76
103
  type: :runtime
77
104
  prerelease: false
78
105
  version_requirements: !ruby/object:Gem::Requirement
79
106
  requirements:
80
- - - ">="
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 0.18.2
110
+ - - "<"
81
111
  - !ruby/object:Gem::Version
82
- version: '0'
112
+ version: '2'
83
113
  - !ruby/object:Gem::Dependency
84
114
  name: bundler
85
115
  requirement: !ruby/object:Gem::Requirement
86
116
  requirements:
87
- - - "~>"
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 2.2.33
120
+ - - "<"
88
121
  - !ruby/object:Gem::Version
89
- version: '2.0'
122
+ version: '3'
90
123
  type: :development
91
124
  prerelease: false
92
125
  version_requirements: !ruby/object:Gem::Requirement
93
126
  requirements:
94
- - - "~>"
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 2.2.33
130
+ - - "<"
95
131
  - !ruby/object:Gem::Version
96
- version: '2.0'
132
+ version: '3'
97
133
  - !ruby/object:Gem::Dependency
98
134
  name: rake
99
135
  requirement: !ruby/object:Gem::Requirement
100
136
  requirements:
101
- - - ">="
137
+ - - ">"
102
138
  - !ruby/object:Gem::Version
103
- version: 12.3.3
139
+ version: 13.0.6
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '14'
104
143
  type: :development
105
144
  prerelease: false
106
145
  version_requirements: !ruby/object:Gem::Requirement
107
146
  requirements:
108
- - - ">="
147
+ - - ">"
148
+ - !ruby/object:Gem::Version
149
+ version: 13.0.6
150
+ - - "<"
109
151
  - !ruby/object:Gem::Version
110
- version: 12.3.3
152
+ version: '14'
111
153
  - !ruby/object:Gem::Dependency
112
154
  name: rspec
113
155
  requirement: !ruby/object:Gem::Requirement
114
156
  requirements:
115
- - - "~>"
157
+ - - ">"
158
+ - !ruby/object:Gem::Version
159
+ version: 3.12.0
160
+ - - "<"
116
161
  - !ruby/object:Gem::Version
117
- version: '3.0'
162
+ version: '4'
118
163
  type: :development
119
164
  prerelease: false
120
165
  version_requirements: !ruby/object:Gem::Requirement
121
166
  requirements:
122
- - - "~>"
167
+ - - ">"
168
+ - !ruby/object:Gem::Version
169
+ version: 3.12.0
170
+ - - "<"
123
171
  - !ruby/object:Gem::Version
124
- version: '3.0'
172
+ version: '4'
125
173
  description: Extremely primitive accounting software.
126
174
  email:
127
175
  - keithrbennett@gmail.com
@@ -480,7 +528,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
480
528
  - !ruby/object:Gem::Version
481
529
  version: '0'
482
530
  requirements: []
483
- rubygems_version: 3.2.3
531
+ rubygems_version: 3.4.7
484
532
  signing_key:
485
533
  specification_version: 4
486
534
  summary: Very basic accounting package.