plutus 0.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +10 -1
- data/app/models/plutus/account.rb +0 -2
- data/app/models/plutus/amount.rb +0 -2
- data/app/models/plutus/asset.rb +1 -1
- data/app/models/plutus/equity.rb +1 -1
- data/app/models/plutus/expense.rb +1 -1
- data/app/models/plutus/liability.rb +1 -1
- data/app/models/plutus/revenue.rb +1 -1
- data/app/models/plutus/transaction.rb +0 -2
- data/lib/plutus.rb +1 -0
- data/lib/plutus/version.rb +1 -1
- metadata +83 -117
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bf3cdae6e8e32c5a301e3ebf57439eaa53fa939f
|
4
|
+
data.tar.gz: f5716055d0d646ac40a78ced23397aa9eab99aff
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2dfd4c4439f3860c052afbe09ffaec483dff8b29e73d4ba096701b427d3b3148ec09a984ccca9efd3c802e97192e86569c7ef44226b87bf4d535d92489fa612a
|
7
|
+
data.tar.gz: 59de77cd255b5d13491d77f79d9b53c129833ee0d406aae4bbb330863820f4d305979342a1daf539401aaa6db8040f055e4c57797acffffed40856a623b35ce2
|
data/README.markdown
CHANGED
@@ -4,13 +4,22 @@ Plutus
|
|
4
4
|
|
5
5
|
The Plutus plugin is a Ruby on Rails Engine which provides a double entry accounting system for your application.
|
6
6
|
|
7
|
-
|
7
|
+
Compatibility
|
8
|
+
=============
|
9
|
+
|
10
|
+
* Ruby versions: MRI 1.9.3, MRI 2.0, MRI 2.1
|
11
|
+
* Rails versions: ~> 4.0
|
12
|
+
|
13
|
+
For the rails 3 version, you can go here:
|
14
|
+
|
15
|
+
[https://github.com/mbulat/plutus](https://github.com/mbulat/plutus/tree/rails3)
|
8
16
|
|
9
17
|
For the rails 2 version, you can go here:
|
10
18
|
|
11
19
|
[https://github.com/mbulat/plutus/tree/rails2](https://github.com/mbulat/plutus/tree/rails2)
|
12
20
|
|
13
21
|
Gems in RubyGems.org >= 0.5.0 support Rails 3
|
22
|
+
Gems in RubyGems.org >= 0.8.0 support Rails 4
|
14
23
|
|
15
24
|
Installation
|
16
25
|
============
|
@@ -30,8 +30,6 @@ module Plutus
|
|
30
30
|
#
|
31
31
|
# @author Michael Bulat
|
32
32
|
class Account < ActiveRecord::Base
|
33
|
-
attr_accessible :name, :contra
|
34
|
-
|
35
33
|
has_many :credit_amounts, :extend => AmountsExtension
|
36
34
|
has_many :debit_amounts, :extend => AmountsExtension
|
37
35
|
has_many :credit_transactions, :through => :credit_amounts, :source => :transaction
|
data/app/models/plutus/amount.rb
CHANGED
data/app/models/plutus/asset.rb
CHANGED
@@ -39,7 +39,7 @@ module Plutus
|
|
39
39
|
# @return [BigDecimal] The decimal value balance
|
40
40
|
def self.balance
|
41
41
|
accounts_balance = BigDecimal.new('0')
|
42
|
-
accounts = self.
|
42
|
+
accounts = self.all
|
43
43
|
accounts.each do |asset|
|
44
44
|
unless asset.contra
|
45
45
|
accounts_balance += asset.balance
|
data/app/models/plutus/equity.rb
CHANGED
@@ -39,7 +39,7 @@ module Plutus
|
|
39
39
|
# @return [BigDecimal] The decimal value balance
|
40
40
|
def self.balance
|
41
41
|
accounts_balance = BigDecimal.new('0')
|
42
|
-
accounts = self.
|
42
|
+
accounts = self.all
|
43
43
|
accounts.each do |equity|
|
44
44
|
unless equity.contra
|
45
45
|
accounts_balance += equity.balance
|
@@ -39,7 +39,7 @@ module Plutus
|
|
39
39
|
# @return [BigDecimal] The decimal value balance
|
40
40
|
def self.balance
|
41
41
|
accounts_balance = BigDecimal.new('0')
|
42
|
-
accounts = self.
|
42
|
+
accounts = self.all
|
43
43
|
accounts.each do |expense|
|
44
44
|
unless expense.contra
|
45
45
|
accounts_balance += expense.balance
|
@@ -34,7 +34,7 @@ module Plutus
|
|
34
34
|
# => #<BigDecimal:1030fcc98,'0.82875E5',8(20)>
|
35
35
|
def self.balance
|
36
36
|
accounts_balance = BigDecimal.new('0')
|
37
|
-
accounts = self.
|
37
|
+
accounts = self.all
|
38
38
|
accounts.each do |liability|
|
39
39
|
unless liability.contra
|
40
40
|
accounts_balance += liability.balance
|
@@ -39,7 +39,7 @@ module Plutus
|
|
39
39
|
# @return [BigDecimal] The decimal value balance
|
40
40
|
def self.balance
|
41
41
|
accounts_balance = BigDecimal.new('0')
|
42
|
-
accounts = self.
|
42
|
+
accounts = self.all
|
43
43
|
accounts.each do |revenue|
|
44
44
|
unless revenue.contra
|
45
45
|
accounts_balance += revenue.balance
|
@@ -22,8 +22,6 @@ module Plutus
|
|
22
22
|
#
|
23
23
|
# @author Michael Bulat
|
24
24
|
class Transaction < ActiveRecord::Base
|
25
|
-
attr_accessible :description, :commercial_document
|
26
|
-
|
27
25
|
belongs_to :commercial_document, :polymorphic => true
|
28
26
|
has_many :credit_amounts, :extend => AmountsExtension
|
29
27
|
has_many :debit_amounts, :extend => AmountsExtension
|
data/lib/plutus.rb
CHANGED
data/lib/plutus/version.rb
CHANGED
metadata
CHANGED
@@ -1,158 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plutus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.8.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Michael Bulat
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '4.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '4.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sqlite3
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '2.6'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '2.6'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec-rails
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '2.6'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '2.6'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: rspec-rails
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ~>
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '2.6'
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
66
|
+
- - "~>"
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '2.6'
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: factory_girl
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
72
|
requirements:
|
99
|
-
- -
|
73
|
+
- - ">="
|
100
74
|
- !ruby/object:Gem::Version
|
101
75
|
version: '0'
|
102
76
|
type: :development
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
79
|
requirements:
|
107
|
-
- -
|
80
|
+
- - ">="
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: '0'
|
110
83
|
- !ruby/object:Gem::Dependency
|
111
84
|
name: factory_girl_rails
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
86
|
requirements:
|
115
|
-
- - ~>
|
87
|
+
- - "~>"
|
116
88
|
- !ruby/object:Gem::Version
|
117
89
|
version: '1.1'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
93
|
requirements:
|
123
|
-
- - ~>
|
94
|
+
- - "~>"
|
124
95
|
- !ruby/object:Gem::Version
|
125
96
|
version: '1.1'
|
126
97
|
- !ruby/object:Gem::Dependency
|
127
98
|
name: yard
|
128
99
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
100
|
requirements:
|
131
|
-
- -
|
101
|
+
- - ">="
|
132
102
|
- !ruby/object:Gem::Version
|
133
103
|
version: '0'
|
134
104
|
type: :development
|
135
105
|
prerelease: false
|
136
106
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
107
|
requirements:
|
139
|
-
- -
|
108
|
+
- - ">="
|
140
109
|
- !ruby/object:Gem::Version
|
141
110
|
version: '0'
|
142
111
|
- !ruby/object:Gem::Dependency
|
143
112
|
name: redcarpet
|
144
113
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
114
|
requirements:
|
147
|
-
- -
|
115
|
+
- - ">="
|
148
116
|
- !ruby/object:Gem::Version
|
149
117
|
version: '0'
|
150
118
|
type: :development
|
151
119
|
prerelease: false
|
152
120
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
121
|
requirements:
|
155
|
-
- -
|
122
|
+
- - ">="
|
156
123
|
- !ruby/object:Gem::Version
|
157
124
|
version: '0'
|
158
125
|
description: The plutus plugin provides a complete double entry accounting system
|
@@ -167,112 +134,111 @@ extra_rdoc_files:
|
|
167
134
|
- LICENSE
|
168
135
|
- README.markdown
|
169
136
|
files:
|
170
|
-
-
|
171
|
-
-
|
172
|
-
-
|
173
|
-
- app/
|
137
|
+
- LICENSE
|
138
|
+
- README.markdown
|
139
|
+
- Rakefile
|
140
|
+
- app/assets/javascripts/plutus/application.js
|
141
|
+
- app/assets/stylesheets/plutus/application.css
|
142
|
+
- app/assets/stylesheets/plutus/main.css.scss
|
143
|
+
- app/controllers/plutus/accounts_controller.rb
|
144
|
+
- app/controllers/plutus/transactions_controller.rb
|
145
|
+
- app/models/plutus/account.rb
|
174
146
|
- app/models/plutus/amount.rb
|
175
147
|
- app/models/plutus/amounts_extension.rb
|
148
|
+
- app/models/plutus/asset.rb
|
176
149
|
- app/models/plutus/credit_amount.rb
|
177
|
-
- app/models/plutus/
|
150
|
+
- app/models/plutus/debit_amount.rb
|
151
|
+
- app/models/plutus/equity.rb
|
178
152
|
- app/models/plutus/expense.rb
|
179
|
-
- app/models/plutus/
|
153
|
+
- app/models/plutus/liability.rb
|
180
154
|
- app/models/plutus/revenue.rb
|
181
|
-
- app/
|
182
|
-
- app/views/plutus/transactions/show.html.erb
|
155
|
+
- app/models/plutus/transaction.rb
|
183
156
|
- app/views/plutus/accounts/index.html.erb
|
184
157
|
- app/views/plutus/accounts/show.html.erb
|
185
|
-
- app/
|
186
|
-
- app/
|
187
|
-
-
|
188
|
-
- app/controllers/plutus/accounts_controller.rb
|
189
|
-
- app/controllers/plutus/transactions_controller.rb
|
190
|
-
- config/session_store.rb
|
191
|
-
- config/secret_token.rb
|
158
|
+
- app/views/plutus/transactions/index.html.erb
|
159
|
+
- app/views/plutus/transactions/show.html.erb
|
160
|
+
- config/backtrace_silencers.rb
|
192
161
|
- config/database.yml
|
193
162
|
- config/inflections.rb
|
194
|
-
- config/backtrace_silencers.rb
|
195
|
-
- config/routes.rb
|
196
163
|
- config/mime_types.rb
|
197
|
-
-
|
198
|
-
-
|
164
|
+
- config/routes.rb
|
165
|
+
- config/secret_token.rb
|
166
|
+
- config/session_store.rb
|
199
167
|
- lib/generators/plutus/USAGE
|
200
|
-
- lib/generators/plutus/templates/migration.rb
|
201
168
|
- lib/generators/plutus/plutus_generator.rb
|
202
|
-
-
|
203
|
-
-
|
204
|
-
-
|
205
|
-
- spec/
|
206
|
-
- spec/
|
207
|
-
- spec/
|
169
|
+
- lib/generators/plutus/templates/migration.rb
|
170
|
+
- lib/plutus.rb
|
171
|
+
- lib/plutus/version.rb
|
172
|
+
- spec/controllers/accounts_controller_spec.rb
|
173
|
+
- spec/controllers/transactions_controller_spec.rb
|
174
|
+
- spec/factories/account_factory.rb
|
175
|
+
- spec/factories/amount_factory.rb
|
176
|
+
- spec/factories/transaction_factory.rb
|
177
|
+
- spec/lib/plutus_spec.rb
|
208
178
|
- spec/models/account_spec.rb
|
209
|
-
- spec/models/
|
179
|
+
- spec/models/amount_spec.rb
|
180
|
+
- spec/models/asset_spec.rb
|
210
181
|
- spec/models/credit_amount_spec.rb
|
211
|
-
- spec/models/expense_spec.rb
|
212
182
|
- spec/models/debit_amount_spec.rb
|
183
|
+
- spec/models/equity_spec.rb
|
184
|
+
- spec/models/expense_spec.rb
|
213
185
|
- spec/models/liability_spec.rb
|
214
|
-
- spec/models/
|
215
|
-
- spec/models/
|
216
|
-
- spec/support/amount_shared_examples.rb
|
217
|
-
- spec/support/account_shared_examples.rb
|
218
|
-
- spec/schema.rb
|
219
|
-
- spec/routing/transactions_routing_spec.rb
|
220
|
-
- spec/routing/accounts_routing_spec.rb
|
186
|
+
- spec/models/revenue_spec.rb
|
187
|
+
- spec/models/transaction_spec.rb
|
221
188
|
- spec/rcov.opts
|
222
|
-
- spec/
|
223
|
-
- spec/
|
224
|
-
- spec/
|
225
|
-
- spec/controllers/accounts_controller_spec.rb
|
226
|
-
- spec/controllers/transactions_controller_spec.rb
|
227
|
-
- spec/lib/plutus_spec.rb
|
189
|
+
- spec/routing/accounts_routing_spec.rb
|
190
|
+
- spec/routing/transactions_routing_spec.rb
|
191
|
+
- spec/schema.rb
|
228
192
|
- spec/spec.opts
|
193
|
+
- spec/spec_helper.rb
|
194
|
+
- spec/support/account_shared_examples.rb
|
195
|
+
- spec/support/amount_shared_examples.rb
|
229
196
|
homepage: http://github.com/mbulat/plutus
|
230
197
|
licenses: []
|
198
|
+
metadata: {}
|
231
199
|
post_install_message:
|
232
200
|
rdoc_options: []
|
233
201
|
require_paths:
|
234
202
|
- lib
|
235
203
|
required_ruby_version: !ruby/object:Gem::Requirement
|
236
|
-
none: false
|
237
204
|
requirements:
|
238
|
-
- -
|
205
|
+
- - ">="
|
239
206
|
- !ruby/object:Gem::Version
|
240
207
|
version: '0'
|
241
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
|
-
none: false
|
243
209
|
requirements:
|
244
|
-
- -
|
210
|
+
- - ">="
|
245
211
|
- !ruby/object:Gem::Version
|
246
212
|
version: 1.3.6
|
247
213
|
requirements: []
|
248
214
|
rubyforge_project:
|
249
|
-
rubygems_version:
|
215
|
+
rubygems_version: 2.2.0
|
250
216
|
signing_key:
|
251
217
|
specification_version: 3
|
252
218
|
summary: A Plugin providing a Double Entry Accounting Engine for Rails
|
253
219
|
test_files:
|
254
|
-
- spec/
|
255
|
-
- spec/
|
220
|
+
- spec/routing/transactions_routing_spec.rb
|
221
|
+
- spec/routing/accounts_routing_spec.rb
|
222
|
+
- spec/schema.rb
|
223
|
+
- spec/support/account_shared_examples.rb
|
224
|
+
- spec/support/amount_shared_examples.rb
|
225
|
+
- spec/factories/amount_factory.rb
|
226
|
+
- spec/factories/transaction_factory.rb
|
227
|
+
- spec/factories/account_factory.rb
|
228
|
+
- spec/spec.opts
|
229
|
+
- spec/models/amount_spec.rb
|
230
|
+
- spec/models/liability_spec.rb
|
256
231
|
- spec/models/equity_spec.rb
|
257
|
-
- spec/models/account_spec.rb
|
258
|
-
- spec/models/revenue_spec.rb
|
259
232
|
- spec/models/credit_amount_spec.rb
|
260
233
|
- spec/models/expense_spec.rb
|
261
|
-
- spec/models/debit_amount_spec.rb
|
262
|
-
- spec/models/liability_spec.rb
|
263
234
|
- spec/models/asset_spec.rb
|
264
|
-
- spec/models/
|
265
|
-
- spec/
|
266
|
-
- spec/
|
267
|
-
- spec/
|
268
|
-
- spec/routing/transactions_routing_spec.rb
|
269
|
-
- spec/routing/accounts_routing_spec.rb
|
235
|
+
- spec/models/transaction_spec.rb
|
236
|
+
- spec/models/account_spec.rb
|
237
|
+
- spec/models/debit_amount_spec.rb
|
238
|
+
- spec/models/revenue_spec.rb
|
270
239
|
- spec/rcov.opts
|
271
|
-
- spec/factories/transaction_factory.rb
|
272
|
-
- spec/factories/amount_factory.rb
|
273
|
-
- spec/factories/account_factory.rb
|
274
|
-
- spec/controllers/accounts_controller_spec.rb
|
275
|
-
- spec/controllers/transactions_controller_spec.rb
|
276
240
|
- spec/lib/plutus_spec.rb
|
277
|
-
- spec/
|
241
|
+
- spec/controllers/transactions_controller_spec.rb
|
242
|
+
- spec/controllers/accounts_controller_spec.rb
|
243
|
+
- spec/spec_helper.rb
|
278
244
|
has_rdoc:
|