Skip to content

Commit

Permalink
Merge branch 'release/v0.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbulat committed Jan 15, 2014
2 parents 16f6f52 + b90b5a6 commit 65bab08
Show file tree
Hide file tree
Showing 40 changed files with 958 additions and 1,573 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: ruby
rvm:
- 1.9.2
- 1.9.3
- 2.0
- 2.1
script: rake
162 changes: 78 additions & 84 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,114 +1,108 @@
PATH
remote: .
specs:
plutus (0.7.4)
rails (~> 3.1)
plutus (0.8.0)
rails (~> 4.0)

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.0.0)
diff-lcs (1.1.3)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.2)
activesupport (= 4.0.2)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
diff-lcs (1.2.5)
erubis (2.7.0)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
railties (>= 3.0.0)
hike (1.2.1)
i18n (0.6.0)
json (1.7.3)
mail (2.3.3)
i18n (>= 0.4.0)
hike (1.2.3)
i18n (0.6.9)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.22)
multi_json (1.3.5)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.4)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
redcarpet (2.1.1)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
rspec-mocks (~> 2.10.0)
rspec-core (2.10.0)
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
rspec-rails (2.10.1)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
redcarpet (3.0.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rspec-rails (2.14.1)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.10.0)
sprockets (2.0.4)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.12)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
yard (0.8.1)
tzinfo (0.3.38)
yard (0.8.7.3)

PLATFORMS
ruby
Expand Down
11 changes: 10 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ Plutus

The Plutus plugin is a Ruby on Rails Engine which provides a double entry accounting system for your application.

### NOTE: This version of Plutus is compatible with RAILS 3.1
Compatibility
=============

* Ruby versions: MRI 1.9.3, MRI 2.0, MRI 2.1
* Rails versions: ~> 4.0

For the rails 3 version, you can go here:

[https://github.com/mbulat/plutus](https://github.com/mbulat/plutus/tree/rails3)

For the rails 2 version, you can go here:

[https://github.com/mbulat/plutus/tree/rails2](https://github.com/mbulat/plutus/tree/rails2)

Gems in RubyGems.org >= 0.5.0 support Rails 3
Gems in RubyGems.org >= 0.8.0 support Rails 4

Installation
============
Expand Down
2 changes: 0 additions & 2 deletions app/models/plutus/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ module Plutus
#
# @author Michael Bulat
class Account < ActiveRecord::Base
attr_accessible :name, :contra

has_many :credit_amounts, :extend => AmountsExtension
has_many :debit_amounts, :extend => AmountsExtension
has_many :credit_transactions, :through => :credit_amounts, :source => :transaction
Expand Down
2 changes: 0 additions & 2 deletions app/models/plutus/amount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module Plutus
#
# @author Michael Bulat
class Amount < ActiveRecord::Base
attr_accessible :account, :amount, :transaction

belongs_to :transaction
belongs_to :account

Expand Down
2 changes: 1 addition & 1 deletion app/models/plutus/asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def balance
# @return [BigDecimal] The decimal value balance
def self.balance
accounts_balance = BigDecimal.new('0')
accounts = self.find(:all)
accounts = self.all
accounts.each do |asset|
unless asset.contra
accounts_balance += asset.balance
Expand Down
2 changes: 1 addition & 1 deletion app/models/plutus/equity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def balance
# @return [BigDecimal] The decimal value balance
def self.balance
accounts_balance = BigDecimal.new('0')
accounts = self.find(:all)
accounts = self.all
accounts.each do |equity|
unless equity.contra
accounts_balance += equity.balance
Expand Down
2 changes: 1 addition & 1 deletion app/models/plutus/expense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def balance
# @return [BigDecimal] The decimal value balance
def self.balance
accounts_balance = BigDecimal.new('0')
accounts = self.find(:all)
accounts = self.all
accounts.each do |expense|
unless expense.contra
accounts_balance += expense.balance
Expand Down
2 changes: 1 addition & 1 deletion app/models/plutus/liability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def balance
# => #<BigDecimal:1030fcc98,'0.82875E5',8(20)>
def self.balance
accounts_balance = BigDecimal.new('0')
accounts = self.find(:all)
accounts = self.all
accounts.each do |liability|
unless liability.contra
accounts_balance += liability.balance
Expand Down
2 changes: 1 addition & 1 deletion app/models/plutus/revenue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def balance
# @return [BigDecimal] The decimal value balance
def self.balance
accounts_balance = BigDecimal.new('0')
accounts = self.find(:all)
accounts = self.all
accounts.each do |revenue|
unless revenue.contra
accounts_balance += revenue.balance
Expand Down
2 changes: 0 additions & 2 deletions app/models/plutus/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ module Plutus
#
# @author Michael Bulat
class Transaction < ActiveRecord::Base
attr_accessible :description, :commercial_document

belongs_to :commercial_document, :polymorphic => true
has_many :credit_amounts, :extend => AmountsExtension
has_many :debit_amounts, :extend => AmountsExtension
Expand Down
14 changes: 8 additions & 6 deletions doc/Plutus.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<title>
Module: Plutus

&mdash; Documentation by YARD 0.8.1
&mdash; Documentation by YARD 0.8.7.3

</title>

<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />

<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
Expand Down Expand Up @@ -80,7 +80,7 @@

<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">app/models/plutus/asset.rb<span class="defines">,<br />
app/models/plutus/amount.rb,<br /> app/models/plutus/equity.rb,<br /> app/models/plutus/account.rb,<br /> app/models/plutus/revenue.rb,<br /> app/models/plutus/expense.rb,<br /> app/models/plutus/liability.rb,<br /> app/models/plutus/transaction.rb,<br /> app/models/plutus/debit_amount.rb,<br /> app/models/plutus/credit_amount.rb,<br /> app/controllers/plutus/accounts_controller.rb,<br /> app/controllers/plutus/transactions_controller.rb</span>
app/models/plutus/equity.rb,<br /> app/models/plutus/amount.rb,<br /> app/models/plutus/revenue.rb,<br /> app/models/plutus/account.rb,<br /> app/models/plutus/expense.rb,<br /> app/models/plutus/liability.rb,<br /> app/models/plutus/transaction.rb,<br /> app/models/plutus/debit_amount.rb,<br /> app/models/plutus/credit_amount.rb,<br /> app/models/plutus/amounts_extension.rb,<br /> app/controllers/plutus/accounts_controller.rb,<br /> app/controllers/plutus/transactions_controller.rb</span>
</dd>

</dl>
Expand All @@ -90,6 +90,8 @@ <h2>Defined Under Namespace</h2>
<p class="children">


<strong class="modules">Modules:</strong> <span class='object_link'><a href="Plutus/AmountsExtension.html" title="Plutus::AmountsExtension (module)">AmountsExtension</a></span>



<strong class="classes">Classes:</strong> <span class='object_link'><a href="Plutus/Account.html" title="Plutus::Account (class)">Account</a></span>, <span class='object_link'><a href="Plutus/AccountsController.html" title="Plutus::AccountsController (class)">AccountsController</a></span>, <span class='object_link'><a href="Plutus/Amount.html" title="Plutus::Amount (class)">Amount</a></span>, <span class='object_link'><a href="Plutus/Asset.html" title="Plutus::Asset (class)">Asset</a></span>, <span class='object_link'><a href="Plutus/CreditAmount.html" title="Plutus::CreditAmount (class)">CreditAmount</a></span>, <span class='object_link'><a href="Plutus/DebitAmount.html" title="Plutus::DebitAmount (class)">DebitAmount</a></span>, <span class='object_link'><a href="Plutus/Equity.html" title="Plutus::Equity (class)">Equity</a></span>, <span class='object_link'><a href="Plutus/Expense.html" title="Plutus::Expense (class)">Expense</a></span>, <span class='object_link'><a href="Plutus/Liability.html" title="Plutus::Liability (class)">Liability</a></span>, <span class='object_link'><a href="Plutus/Revenue.html" title="Plutus::Revenue (class)">Revenue</a></span>, <span class='object_link'><a href="Plutus/Transaction.html" title="Plutus::Transaction (class)">Transaction</a></span>, <span class='object_link'><a href="Plutus/TransactionsController.html" title="Plutus::TransactionsController (class)">TransactionsController</a></span>
Expand All @@ -108,9 +110,9 @@ <h2>Defined Under Namespace</h2>
</div>

<div id="footer">
Generated on Tue May 15 12:38:13 2012 by
Generated on Wed Jan 15 16:34:44 2014 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.1 (ruby-1.9.3).
0.8.7.3 (ruby-2.1.0).
</div>

</body>
Expand Down
Loading

0 comments on commit 65bab08

Please sign in to comment.