event_sourced_accounting 0.1.0

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.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +23 -0
  3. data/README.markdown +37 -0
  4. data/Rakefile +11 -0
  5. data/app/assets/javascripts/esa/application.js +15 -0
  6. data/app/assets/stylesheets/esa/application.css +13 -0
  7. data/app/assets/stylesheets/esa/main.css.scss +86 -0
  8. data/app/models/esa/account.rb +80 -0
  9. data/app/models/esa/accounts/asset.rb +22 -0
  10. data/app/models/esa/accounts/equity.rb +22 -0
  11. data/app/models/esa/accounts/expense.rb +22 -0
  12. data/app/models/esa/accounts/liability.rb +22 -0
  13. data/app/models/esa/accounts/revenue.rb +22 -0
  14. data/app/models/esa/amount.rb +27 -0
  15. data/app/models/esa/amounts/credit.rb +12 -0
  16. data/app/models/esa/amounts/debit.rb +12 -0
  17. data/app/models/esa/associations/amounts_extension.rb +79 -0
  18. data/app/models/esa/associations/events_extension.rb +33 -0
  19. data/app/models/esa/associations/flags_extension.rb +35 -0
  20. data/app/models/esa/associations/transactions_extension.rb +7 -0
  21. data/app/models/esa/chart.rb +41 -0
  22. data/app/models/esa/context.rb +218 -0
  23. data/app/models/esa/context_provider.rb +52 -0
  24. data/app/models/esa/context_providers/account_context_provider.rb +21 -0
  25. data/app/models/esa/context_providers/accountable_context_provider.rb +22 -0
  26. data/app/models/esa/context_providers/accountable_type_context_provider.rb +21 -0
  27. data/app/models/esa/context_providers/date_context_provider.rb +33 -0
  28. data/app/models/esa/contexts/account_context.rb +26 -0
  29. data/app/models/esa/contexts/accountable_context.rb +26 -0
  30. data/app/models/esa/contexts/accountable_type_context.rb +24 -0
  31. data/app/models/esa/contexts/created_at_context.rb +26 -0
  32. data/app/models/esa/contexts/date_context.rb +71 -0
  33. data/app/models/esa/contexts/empty_context.rb +19 -0
  34. data/app/models/esa/contexts/filter_context.rb +11 -0
  35. data/app/models/esa/contexts/open_close_context.rb +15 -0
  36. data/app/models/esa/event.rb +33 -0
  37. data/app/models/esa/filters/account_filter.rb +42 -0
  38. data/app/models/esa/filters/accountable_filter.rb +58 -0
  39. data/app/models/esa/filters/accountable_type_filter.rb +26 -0
  40. data/app/models/esa/filters/chart_filter.rb +17 -0
  41. data/app/models/esa/filters/context_filter.rb +35 -0
  42. data/app/models/esa/filters/date_time_filter.rb +52 -0
  43. data/app/models/esa/flag.rb +70 -0
  44. data/app/models/esa/ruleset.rb +175 -0
  45. data/app/models/esa/traits/accountable.rb +21 -0
  46. data/app/models/esa/traits/extendable.rb +93 -0
  47. data/app/models/esa/traits/or_scope.rb +35 -0
  48. data/app/models/esa/traits/union_scope.rb +24 -0
  49. data/app/models/esa/transaction.rb +74 -0
  50. data/config/backtrace_silencers.rb +7 -0
  51. data/config/database.yml +5 -0
  52. data/config/inflections.rb +10 -0
  53. data/config/mime_types.rb +5 -0
  54. data/config/routes.rb +6 -0
  55. data/config/secret_token.rb +7 -0
  56. data/config/session_store.rb +8 -0
  57. data/lib/esa/balance_checker.rb +17 -0
  58. data/lib/esa/blocking_processor.rb +158 -0
  59. data/lib/esa/config.rb +55 -0
  60. data/lib/esa/subcontext_checker.rb +15 -0
  61. data/lib/esa/version.rb +3 -0
  62. data/lib/esa.rb +8 -0
  63. data/lib/generators/esa/USAGE +11 -0
  64. data/lib/generators/esa/esa_generator.rb +26 -0
  65. data/lib/generators/esa/templates/migration.rb +142 -0
  66. data/spec/factories/account_factory.rb +51 -0
  67. data/spec/factories/amount_factory.rb +19 -0
  68. data/spec/factories/chart_factory.rb +7 -0
  69. data/spec/factories/transaction_factory.rb +11 -0
  70. data/spec/lib/esa_spec.rb +0 -0
  71. data/spec/models/account_spec.rb +31 -0
  72. data/spec/models/amount_spec.rb +8 -0
  73. data/spec/models/asset_spec.rb +9 -0
  74. data/spec/models/chart_spec.rb +52 -0
  75. data/spec/models/credit_amount_spec.rb +9 -0
  76. data/spec/models/debit_amount_spec.rb +9 -0
  77. data/spec/models/equity_spec.rb +9 -0
  78. data/spec/models/expense_spec.rb +9 -0
  79. data/spec/models/liability_spec.rb +9 -0
  80. data/spec/models/revenue_spec.rb +9 -0
  81. data/spec/models/transaction_spec.rb +118 -0
  82. data/spec/rcov.opts +2 -0
  83. data/spec/spec.opts +4 -0
  84. data/spec/spec_helper.rb +16 -0
  85. data/spec/support/account_shared_examples.rb +57 -0
  86. data/spec/support/amount_shared_examples.rb +21 -0
  87. metadata +306 -0
@@ -0,0 +1,52 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ describe Chart do
5
+ let(:chart) { FactoryGirl.build(:chart) }
6
+ subject { chart }
7
+
8
+ its(:trial_balance) { should be_kind_of BigDecimal }
9
+
10
+ context "when given no transactions" do
11
+ its(:trial_balance) { should == 0 }
12
+ end
13
+
14
+ context "when given correct transactions" do
15
+ before {
16
+ # credit accounts
17
+ liability = FactoryGirl.create(:liability)
18
+ equity = FactoryGirl.create(:equity)
19
+ revenue = FactoryGirl.create(:revenue)
20
+ contra_asset = FactoryGirl.create(:asset, :contra => true)
21
+ contra_expense = FactoryGirl.create(:expense, :contra => true)
22
+ # credit amounts
23
+ ca1 = FactoryGirl.build(:credit_amount, :account => liability, :amount => 100000)
24
+ ca2 = FactoryGirl.build(:credit_amount, :account => equity, :amount => 1000)
25
+ ca3 = FactoryGirl.build(:credit_amount, :account => revenue, :amount => 40404)
26
+ ca4 = FactoryGirl.build(:credit_amount, :account => contra_asset, :amount => 2)
27
+ ca5 = FactoryGirl.build(:credit_amount, :account => contra_expense, :amount => 333)
28
+
29
+ # debit accounts
30
+ asset = FactoryGirl.create(:asset)
31
+ expense = FactoryGirl.create(:expense)
32
+ contra_liability = FactoryGirl.create(:liability, :contra => true)
33
+ contra_equity = FactoryGirl.create(:equity, :contra => true)
34
+ contra_revenue = FactoryGirl.create(:revenue, :contra => true)
35
+ # debit amounts
36
+ da1 = FactoryGirl.build(:debit_amount, :account => asset, :amount => 100000)
37
+ da2 = FactoryGirl.build(:debit_amount, :account => expense, :amount => 1000)
38
+ da3 = FactoryGirl.build(:debit_amount, :account => contra_liability, :amount => 40404)
39
+ da4 = FactoryGirl.build(:debit_amount, :account => contra_equity, :amount => 2)
40
+ da5 = FactoryGirl.build(:debit_amount, :account => contra_revenue, :amount => 333)
41
+
42
+ FactoryGirl.create(:transaction, :amounts => [ca1, da1])
43
+ FactoryGirl.create(:transaction, :amounts => [ca2, da2])
44
+ FactoryGirl.create(:transaction, :amounts => [ca3, da3])
45
+ FactoryGirl.create(:transaction, :amounts => [ca4, da4])
46
+ FactoryGirl.create(:transaction, :amounts => [ca5, da5])
47
+ }
48
+
49
+ its(:trial_balance) { should == 0 }
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Amounts
5
+ describe Credit do
6
+ it_behaves_like 'a ESA::Amount subtype', kind: :credit_amount
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Amounts
5
+ describe Debit do
6
+ it_behaves_like 'a ESA::Amount subtype', kind: :debit_amount
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Accounts
5
+ describe Equity do
6
+ it_behaves_like 'a ESA::Account subtype', kind: :equity, normal_balance: :credit
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Accounts
5
+ describe Expense do
6
+ it_behaves_like 'a ESA::Account subtype', kind: :expense, normal_balance: :debit
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Accounts
5
+ describe Liability do
6
+ it_behaves_like 'a ESA::Account subtype', kind: :liability, normal_balance: :credit
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ module Accounts
5
+ describe Revenue do
6
+ it_behaves_like 'a ESA::Account subtype', kind: :revenue, normal_balance: :credit
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,118 @@
1
+ require 'spec_helper'
2
+
3
+ module ESA
4
+ describe Transaction do
5
+ let(:transaction) { FactoryGirl.build(:transaction) }
6
+ subject { transaction }
7
+
8
+ it { should_not be_valid }
9
+
10
+ context "with credit and debit" do
11
+ let(:transaction) { FactoryGirl.build(:transaction_with_credit_and_debit) }
12
+ it { should be_valid }
13
+
14
+ it "should require a description" do
15
+ transaction.description = nil
16
+ transaction.should_not be_valid
17
+ end
18
+ end
19
+
20
+ context "with a debit" do
21
+ before {
22
+ transaction.amounts << FactoryGirl.build(:debit_amount, transaction: transaction)
23
+ }
24
+ it { should_not be_valid }
25
+
26
+ context "with an invalid credit" do
27
+ before {
28
+ transaction.amounts << FactoryGirl.build(:credit_amount, transaction: transaction, amount: nil)
29
+ }
30
+ it { should_not be_valid }
31
+ end
32
+ end
33
+
34
+ context "with a credit" do
35
+ before {
36
+ transaction.amounts << FactoryGirl.build(:credit_amount, transaction: transaction)
37
+ }
38
+ it { should_not be_valid }
39
+
40
+ context "with an invalid debit" do
41
+ before {
42
+ transaction.amounts << FactoryGirl.build(:debit_amount, transaction: transaction, amount: nil)
43
+ }
44
+ it { should_not be_valid }
45
+ end
46
+ end
47
+
48
+ it "should require the debit and credit amounts to cancel" do
49
+ transaction.amounts << FactoryGirl.build(:credit_amount, :amount => 100, :transaction => transaction)
50
+ transaction.amounts << FactoryGirl.build(:debit_amount, :amount => 200, :transaction => transaction)
51
+ transaction.should_not be_valid
52
+ transaction.errors['base'].should == ["The credit and debit amounts are not equal"]
53
+ end
54
+
55
+ it "should require the debit and credit amounts to cancel even with fractions" do
56
+ transaction = FactoryGirl.build(:transaction)
57
+ transaction.amounts << FactoryGirl.build(:credit_amount, :amount => 100.1, :transaction => transaction)
58
+ transaction.amounts << FactoryGirl.build(:debit_amount, :amount => 100.2, :transaction => transaction)
59
+ transaction.should_not be_valid
60
+ transaction.errors['base'].should == ["The credit and debit amounts are not equal"]
61
+ end
62
+
63
+ it "should have a polymorphic commercial document associations" do
64
+ mock_document = FactoryGirl.create(:asset) # one would never do this, but it allows us to not require a migration for the test
65
+ transaction = FactoryGirl.build(:transaction_with_credit_and_debit, accountable: mock_document)
66
+ transaction.save!
67
+ saved_transaction = Transaction.find(transaction.id)
68
+ saved_transaction.accountable.should == mock_document
69
+ end
70
+
71
+ context "given a set of accounts" do
72
+ let(:mock_document) { FactoryGirl.create(:asset) }
73
+ let!(:accounts_receivable) { FactoryGirl.create(:asset, name: "Accounts Receivable") }
74
+ let!(:sales_revenue) { FactoryGirl.create(:revenue, name: "Sales Revenue") }
75
+ let!(:sales_tax_payable) { FactoryGirl.create(:liability, name: "Sales Tax Payable") }
76
+
77
+ shared_examples_for 'a built-from-hash ESA::Transaction' do
78
+ its(:amounts) { should_not be_empty }
79
+ it { should be_valid }
80
+
81
+ context "when saved" do
82
+ before { transaction.save! }
83
+ its(:id) { should_not be_nil }
84
+
85
+ context "when reloaded" do
86
+ let(:saved_transaction) { Transaction.find(transaction.id) }
87
+ subject { saved_transaction }
88
+ it("should have the correct commercial document") {
89
+ saved_transaction.accountable == mock_document
90
+ }
91
+ end
92
+ end
93
+ end
94
+
95
+ describe ".new" do
96
+ let(:transaction) { Transaction.new(hash) }
97
+ subject { transaction }
98
+
99
+ context "when given a credit/debits hash with :account => Account" do
100
+ let(:hash) {
101
+ {
102
+ description: "Sold some widgets",
103
+ accountable: mock_document,
104
+ debits: [{account: accounts_receivable, amount: 50}],
105
+ credits: [
106
+ {account: sales_revenue, amount: 45},
107
+ {account: sales_tax_payable, amount: 5}
108
+ ]
109
+ }
110
+ }
111
+ include_examples 'a built-from-hash ESA::Transaction'
112
+ end
113
+ end
114
+ end
115
+
116
+
117
+ end
118
+ end
data/spec/rcov.opts ADDED
@@ -0,0 +1,2 @@
1
+ --exclude "spec/*,gems/*"
2
+ --rails
data/spec/spec.opts ADDED
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
@@ -0,0 +1,16 @@
1
+ require 'factory_girl'
2
+
3
+ ENV["RAILS_ENV"] ||= 'test'
4
+ require File.expand_path(File.dirname(__FILE__) + "/../fixture_rails_root/config/environment")
5
+ require Rails.root.join('db/schema').to_s
6
+ require 'rspec/rails'
7
+
8
+ $: << File.expand_path(File.dirname(__FILE__) + '/../lib/')
9
+ require 'esa'
10
+
11
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'factories','**','*.rb'))].each {|f| require f}
12
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
13
+
14
+ RSpec.configure do |config|
15
+ config.use_transactional_fixtures = true
16
+ end
@@ -0,0 +1,57 @@
1
+ shared_examples_for 'a ESA::Account subtype' do |elements|
2
+ let(:contra) { false }
3
+ let(:account) { FactoryGirl.create(elements[:kind], contra: contra)}
4
+ subject { account }
5
+
6
+ describe "instance methods" do
7
+ its(:balance) { should be_kind_of(BigDecimal) }
8
+ its(:normal_balance) { should be_kind_of(Enumerize::Value) }
9
+
10
+ it { should respond_to(:transactions) }
11
+ end
12
+
13
+ it "requires a name" do
14
+ account.name = nil
15
+ account.should_not be_valid
16
+ end
17
+
18
+ # Figure out which way credits and debits should apply
19
+ if elements[:normal_balance] == :debit
20
+ contra_balance = :credit
21
+ debit_condition = :>
22
+ credit_condition = :<
23
+ else
24
+ contra_balance = :debit
25
+ credit_condition = :>
26
+ debit_condition = :<
27
+ end
28
+
29
+ describe "stored normal balance" do
30
+ its(:normal_balance) { should eq(elements[:normal_balance].to_s) }
31
+
32
+ describe "on a contra account" do
33
+ let(:contra) { true }
34
+ its(:normal_balance) { should eq(contra_balance.to_s) }
35
+ end
36
+ end
37
+
38
+ describe "when given a debit" do
39
+ before { FactoryGirl.create(:debit_amount, account: account) }
40
+ its(:balance) { should be.send(debit_condition, 0) }
41
+
42
+ describe "on a contra account" do
43
+ let(:contra) { true }
44
+ its(:balance) { should be.send(credit_condition, 0) }
45
+ end
46
+ end
47
+
48
+ describe "when given a credit" do
49
+ before { FactoryGirl.create(:credit_amount, account: account) }
50
+ its(:balance) { should be.send(credit_condition, 0) }
51
+
52
+ describe "on a contra account" do
53
+ let(:contra) { true }
54
+ its(:balance) { should be.send(debit_condition, 0) }
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,21 @@
1
+ shared_examples_for 'a ESA::Amount subtype' do |elements|
2
+ let(:amount) { FactoryGirl.build(elements[:kind]) }
3
+ subject { amount }
4
+
5
+ it { should be_valid }
6
+
7
+ it "should require an amount" do
8
+ amount.amount = nil
9
+ amount.should_not be_valid
10
+ end
11
+
12
+ it "should require a transaction" do
13
+ amount.transaction = nil
14
+ amount.should_not be_valid
15
+ end
16
+
17
+ it "should require an account" do
18
+ amount.account = nil
19
+ amount.should_not be_valid
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,306 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: event_sourced_accounting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Lenno Nagel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: enumerize
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: multipluck
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.4
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '2.6'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '2.6'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '2.6'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '2.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ version: '2.6'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '2.6'
111
+ - !ruby/object:Gem::Dependency
112
+ name: factory_girl
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: factory_girl_rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: '1.1'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: '1.1'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: redcarpet
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: The Event-Sourced Accounting plugin provides an event-sourced double
168
+ entry accounting system for use in any Ruby on Rails application.
169
+ email: lenno@nagel.ee
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files:
173
+ - LICENSE
174
+ - README.markdown
175
+ files:
176
+ - app/models/esa/chart.rb
177
+ - app/models/esa/amounts/debit.rb
178
+ - app/models/esa/amounts/credit.rb
179
+ - app/models/esa/amount.rb
180
+ - app/models/esa/account.rb
181
+ - app/models/esa/associations/events_extension.rb
182
+ - app/models/esa/associations/amounts_extension.rb
183
+ - app/models/esa/associations/transactions_extension.rb
184
+ - app/models/esa/associations/flags_extension.rb
185
+ - app/models/esa/accounts/expense.rb
186
+ - app/models/esa/accounts/asset.rb
187
+ - app/models/esa/accounts/liability.rb
188
+ - app/models/esa/accounts/revenue.rb
189
+ - app/models/esa/accounts/equity.rb
190
+ - app/models/esa/context_providers/account_context_provider.rb
191
+ - app/models/esa/context_providers/date_context_provider.rb
192
+ - app/models/esa/context_providers/accountable_context_provider.rb
193
+ - app/models/esa/context_providers/accountable_type_context_provider.rb
194
+ - app/models/esa/traits/extendable.rb
195
+ - app/models/esa/traits/or_scope.rb
196
+ - app/models/esa/traits/union_scope.rb
197
+ - app/models/esa/traits/accountable.rb
198
+ - app/models/esa/event.rb
199
+ - app/models/esa/context_provider.rb
200
+ - app/models/esa/flag.rb
201
+ - app/models/esa/transaction.rb
202
+ - app/models/esa/ruleset.rb
203
+ - app/models/esa/filters/chart_filter.rb
204
+ - app/models/esa/filters/accountable_type_filter.rb
205
+ - app/models/esa/filters/context_filter.rb
206
+ - app/models/esa/filters/date_time_filter.rb
207
+ - app/models/esa/filters/accountable_filter.rb
208
+ - app/models/esa/filters/account_filter.rb
209
+ - app/models/esa/contexts/account_context.rb
210
+ - app/models/esa/contexts/accountable_type_context.rb
211
+ - app/models/esa/contexts/created_at_context.rb
212
+ - app/models/esa/contexts/accountable_context.rb
213
+ - app/models/esa/contexts/date_context.rb
214
+ - app/models/esa/contexts/filter_context.rb
215
+ - app/models/esa/contexts/empty_context.rb
216
+ - app/models/esa/contexts/open_close_context.rb
217
+ - app/models/esa/context.rb
218
+ - app/assets/stylesheets/esa/main.css.scss
219
+ - app/assets/stylesheets/esa/application.css
220
+ - app/assets/javascripts/esa/application.js
221
+ - config/routes.rb
222
+ - config/mime_types.rb
223
+ - config/backtrace_silencers.rb
224
+ - config/session_store.rb
225
+ - config/database.yml
226
+ - config/secret_token.rb
227
+ - config/inflections.rb
228
+ - lib/esa/subcontext_checker.rb
229
+ - lib/esa/version.rb
230
+ - lib/esa/config.rb
231
+ - lib/esa/balance_checker.rb
232
+ - lib/esa/blocking_processor.rb
233
+ - lib/generators/esa/esa_generator.rb
234
+ - lib/generators/esa/templates/migration.rb
235
+ - lib/generators/esa/USAGE
236
+ - lib/esa.rb
237
+ - LICENSE
238
+ - Rakefile
239
+ - README.markdown
240
+ - spec/models/debit_amount_spec.rb
241
+ - spec/models/expense_spec.rb
242
+ - spec/models/amount_spec.rb
243
+ - spec/models/account_spec.rb
244
+ - spec/models/transaction_spec.rb
245
+ - spec/models/chart_spec.rb
246
+ - spec/models/credit_amount_spec.rb
247
+ - spec/models/revenue_spec.rb
248
+ - spec/models/asset_spec.rb
249
+ - spec/models/liability_spec.rb
250
+ - spec/models/equity_spec.rb
251
+ - spec/rcov.opts
252
+ - spec/support/account_shared_examples.rb
253
+ - spec/support/amount_shared_examples.rb
254
+ - spec/spec.opts
255
+ - spec/spec_helper.rb
256
+ - spec/lib/esa_spec.rb
257
+ - spec/factories/transaction_factory.rb
258
+ - spec/factories/amount_factory.rb
259
+ - spec/factories/account_factory.rb
260
+ - spec/factories/chart_factory.rb
261
+ homepage: https://github.com/lnagel/event-sourced-accounting
262
+ licenses: []
263
+ metadata: {}
264
+ post_install_message:
265
+ rdoc_options: []
266
+ require_paths:
267
+ - lib
268
+ required_ruby_version: !ruby/object:Gem::Requirement
269
+ requirements:
270
+ - - '>='
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
273
+ required_rubygems_version: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - '>='
276
+ - !ruby/object:Gem::Version
277
+ version: 1.3.6
278
+ requirements: []
279
+ rubyforge_project:
280
+ rubygems_version: 2.0.3
281
+ signing_key:
282
+ specification_version: 3
283
+ summary: A Plugin providing a Event-Sourced Accounting Engine for Rails
284
+ test_files:
285
+ - spec/models/debit_amount_spec.rb
286
+ - spec/models/expense_spec.rb
287
+ - spec/models/amount_spec.rb
288
+ - spec/models/account_spec.rb
289
+ - spec/models/transaction_spec.rb
290
+ - spec/models/chart_spec.rb
291
+ - spec/models/credit_amount_spec.rb
292
+ - spec/models/revenue_spec.rb
293
+ - spec/models/asset_spec.rb
294
+ - spec/models/liability_spec.rb
295
+ - spec/models/equity_spec.rb
296
+ - spec/rcov.opts
297
+ - spec/support/account_shared_examples.rb
298
+ - spec/support/amount_shared_examples.rb
299
+ - spec/spec.opts
300
+ - spec/spec_helper.rb
301
+ - spec/lib/esa_spec.rb
302
+ - spec/factories/transaction_factory.rb
303
+ - spec/factories/amount_factory.rb
304
+ - spec/factories/account_factory.rb
305
+ - spec/factories/chart_factory.rb
306
+ has_rdoc: