plutus 0.13 → 0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +5 -5
  2. data/README.markdown +8 -11
  3. data/app/assets/javascripts/plutus/application.js +1 -1
  4. data/app/assets/stylesheets/plutus/application.css +0 -1
  5. data/app/controllers/plutus/accounts_controller.rb +1 -1
  6. data/app/controllers/plutus/reports_controller.rb +1 -1
  7. data/app/models/plutus/account.rb +11 -1
  8. data/app/models/plutus/amount.rb +2 -0
  9. data/app/models/plutus/amounts_extension.rb +1 -1
  10. data/app/models/plutus/asset.rb +1 -1
  11. data/app/models/plutus/credit_amount.rb +1 -1
  12. data/app/models/plutus/debit_amount.rb +1 -1
  13. data/app/models/plutus/equity.rb +1 -1
  14. data/app/models/plutus/expense.rb +1 -1
  15. data/app/models/plutus/liability.rb +1 -1
  16. data/app/models/plutus/revenue.rb +1 -1
  17. data/app/views/layouts/plutus/application.html.erb +0 -1
  18. data/app/views/plutus/reports/balance_sheet.html.erb +1 -1
  19. data/app/views/plutus/reports/income_statement.html.erb +2 -2
  20. data/{lib/generators/plutus/templates/migration.rb → db/migrate/20160422010135_create_plutus_tables.rb} +2 -8
  21. data/lib/plutus.rb +2 -5
  22. data/lib/plutus/engine.rb +5 -0
  23. data/lib/plutus/version.rb +1 -1
  24. data/spec/controllers/reports_controller_spec.rb +2 -2
  25. data/spec/factories/account_factory.rb +6 -6
  26. data/spec/factories/amount_factory.rb +3 -3
  27. data/spec/factories/entry_factory.rb +1 -1
  28. data/spec/factories/tenant_factory.rb +12 -0
  29. data/spec/models/account_spec.rb +7 -0
  30. data/spec/models/amount_spec.rb +5 -0
  31. data/spec/models/tenancy_spec.rb +23 -5
  32. data/spec/spec_helper.rb +2 -2
  33. data/spec/support/shoulda_matchers.rb +8 -0
  34. metadata +41 -53
  35. data/app/assets/javascripts/plutus/reports.js.coffee +0 -2
  36. data/lib/generators/plutus/templates/add_date_migration.rb +0 -6
  37. data/lib/generators/plutus/templates/update_migration.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: baf78f34f534da86425756a8213a9651d531467e
4
- data.tar.gz: a3c1df3ffd80619d1e0522794c03c02324d4cc68
2
+ SHA256:
3
+ metadata.gz: 8d6d53fa47c9c392c0a240fadd36257b8716367a1694642d3597d338f6173a93
4
+ data.tar.gz: a918177e468ee3d2f47acd6fa62eeaceb1e2c604f86161e8c717c9b00927ced4
5
5
  SHA512:
6
- metadata.gz: 1502ce1be2995f71f55c4e902ff27894dd88ff91cfc9a5df02a850998e236e377ef1b5c76febf1312a1540e545d9ed9f2e2f22c10ea0979359a2648b676a8232
7
- data.tar.gz: 9c127eafa076bad39a64c01c913e8db559bc3e2295d9571f1f9b78e7f14c5b5af8287f8ca5f18b9b3c1d330b246bc161e97249670844a287213f89114987f36a
6
+ metadata.gz: d84a78fe7b972cd457d27c9da70fac2c79dfeaf5bea80e26be2d131174c3750d4a59a3254214a96b51f871f1f7895a905811df8b25b2953587d77bce981108b1
7
+ data.tar.gz: cf15cc0e6c2492c7b15f1a2aba067737bc3816fabe59ee57f61f44f74ea84af417b7fc169d6028bf95de6bc693062586433d5fcbf55570c6292b722cdab1a40f
@@ -1,14 +1,14 @@
1
1
  Plutus
2
2
  =================
3
- [![Build Status](https://secure.travis-ci.org/mbulat/plutus.png?branch=master)](http://travis-ci.org/mbulat/plutus)
3
+ [![Build Status](https://travis-ci.org/mbulat/plutus.svg?branch=master)](https://travis-ci.org/mbulat/plutus) [![Coverage Status](https://coveralls.io/repos/github/mbulat/plutus/badge.svg?branch=master)](https://coveralls.io/github/mbulat/plutus?branch=master)
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
8
  =============
9
9
 
10
- * Ruby versions: MRI 2.2.2+ (should work with earlier versions if using Rails 4)
11
- * Rails versions: ~> 5.0, ~> 4.0
10
+ * Ruby versions: MRI 2.5+
11
+ * Rails versions: ~> 6.0
12
12
 
13
13
  For earlier versions, and upgrading, please see the section titled [Previous Versions](https://github.com/mbulat/plutus#previous-versions)
14
14
 
@@ -16,9 +16,7 @@ Installation
16
16
  ============
17
17
 
18
18
  - Add the gem to your Gemfile `gem "plutus"`
19
-
20
- - generate migration files `rails g plutus`
21
-
19
+ - generate migration files `rake plutus:install:migrations`
22
20
  - run migrations `rake db:migrate`
23
21
 
24
22
  Overview
@@ -269,7 +267,7 @@ entry = Plutus::Entry.build(
269
267
  Multitenancy Support
270
268
  =====================
271
269
 
272
- Plutus supports multitenant applications. Multitenancy is acheived by associating all Accounts under `Plutus::Account` with a "Tenant" object (typically some model in your Rails application). To add multi-tenancy support to Plutus, you must do the following:
270
+ Plutus supports multitenant applications. Multitenancy is achieved by associating all Accounts under `Plutus::Account` with a "Tenant" object (typically some model in your Rails application). To add multi-tenancy support to Plutus, you must do the following:
273
271
 
274
272
  - Generate the migration which will add `tenant_id` to the plutus accounts table
275
273
 
@@ -294,8 +292,8 @@ end
294
292
  *NOTE: When building entries, be sure to specify the account directly, rather than use the `account_name` feature. Otherwise you'll probably end up with the wrong account.*
295
293
 
296
294
  ```ruby
297
- debit_account = Plutus::Acount.where(:name => "Cash", :tenant => my_tenant).last
298
- credit_account = Plutus::Acount.where(:name => "Unearned Revenue", :tenant => my_tenant).last
295
+ debit_account = Plutus::Account.where(:name => "Cash", :tenant => my_tenant).last
296
+ credit_account = Plutus::Account.where(:name => "Unearned Revenue", :tenant => my_tenant).last
299
297
  entry = Plutus::Entry.new(
300
298
  :description => "Order placed for widgets",
301
299
  :date => Date.yesterday,
@@ -337,6 +335,7 @@ For the rails 2 version, you can go here:
337
335
  * Gems in RubyGems.org >= 0.5.0 support Rails 3
338
336
  * Gems in RubyGems.org >= 0.8.0 support Rails 4
339
337
  * Gems in RubyGems.org >= 0.9.0 support Rails ~> 4.1
338
+ * Gems in RubyGems.org >= 0.13.0 support Rails ~> 5.0
340
339
 
341
340
  Upgrading from older versions
342
341
  -----------------------------
@@ -373,8 +372,6 @@ Plutus is free software, but if you'd like to support development, feel free to
373
372
 
374
373
  `1QFSdJheyFkLcsV8X428J8e3pYqX1nmW39`
375
374
 
376
- ![bitcoin](https://dl.dropboxusercontent.com/u/8428240/plutus_tip.png)
377
-
378
375
  Also, if anyone is using Plutus for bitcoin related accounting, I'd love to hear about it! Drop me a line.
379
376
 
380
377
  ToDo
@@ -12,5 +12,5 @@
12
12
  //
13
13
  //= require jquery
14
14
  //= require jquery_ujs
15
- //= require jquery-ui/datepicker
15
+ //= require jquery-ui/widgets/datepicker
16
16
  //= require_tree .
@@ -13,7 +13,6 @@
13
13
  *= require_tree .
14
14
  *= require bootstrap.min
15
15
  *= require bootstrap-theme.min
16
- *= require jquery-ui/datepicker
17
16
  *= require_self
18
17
  */
19
18
  body { padding-top: 60px; }
@@ -10,7 +10,7 @@ module Plutus
10
10
  # controller will inherit.
11
11
  #
12
12
  # @author Michael Bulat
13
- class AccountsController < Plutus::ApplicationController
13
+ class AccountsController < ::Plutus::ApplicationController
14
14
  unloadable
15
15
 
16
16
  # @example
@@ -5,7 +5,7 @@ module Plutus
5
5
  # controller will inherit.
6
6
  #
7
7
  # @author Michael Bulat
8
- class ReportsController < Plutus::ApplicationController
8
+ class ReportsController < ::Plutus::ApplicationController
9
9
  unloadable
10
10
 
11
11
  # @example
@@ -41,6 +41,16 @@ module Plutus
41
41
 
42
42
  validates_presence_of :type
43
43
 
44
+ def self.types
45
+ [
46
+ ::Plutus::Asset,
47
+ ::Plutus::Equity,
48
+ ::Plutus::Expense,
49
+ ::Plutus::Liability,
50
+ ::Plutus::Revenue,
51
+ ]
52
+ end
53
+
44
54
  if Plutus.enable_tenancy
45
55
  include Plutus::Tenancy
46
56
  else
@@ -137,7 +147,7 @@ module Plutus
137
147
  if self.new.class == Plutus::Account
138
148
  raise(NoMethodError, "undefined method 'balance'")
139
149
  else
140
- accounts_balance = BigDecimal.new('0')
150
+ accounts_balance = BigDecimal('0')
141
151
  accounts = self.all
142
152
  accounts.each do |account|
143
153
  if account.contra
@@ -12,6 +12,8 @@ module Plutus
12
12
  validates_presence_of :type, :amount, :entry, :account
13
13
  # attr_accessible :account, :account_name, :amount, :entry
14
14
 
15
+ delegate :name, to: :account, prefix: true, allow_nil: true
16
+
15
17
  # Assign an account by name
16
18
  def account_name=(name)
17
19
  self.account = Account.find_by_name!(name)
@@ -30,7 +30,7 @@ module Plutus
30
30
  #
31
31
  # Since this does not use the database for sumation, it may be used on non-persisted records.
32
32
  def balance_for_new_record
33
- balance = BigDecimal.new('0')
33
+ balance = BigDecimal('0')
34
34
  each do |amount_record|
35
35
  if amount_record.amount && !amount_record.marked_for_destruction?
36
36
  balance += amount_record.amount # unless amount_record.marked_for_destruction?
@@ -7,7 +7,7 @@ module Plutus
7
7
  # @see http://en.wikipedia.org/wiki/Asset Assets
8
8
  #
9
9
  # @author Michael Bulat
10
- class Asset < Account
10
+ class Asset < ::Plutus::Account
11
11
 
12
12
  self.normal_credit_balance = false
13
13
 
@@ -5,6 +5,6 @@ module Plutus
5
5
  # credit_amount = Plutus::CreditAmount.new(:account => revenue, :amount => 1000)
6
6
  #
7
7
  # @author Michael Bulat
8
- class CreditAmount < Amount
8
+ class CreditAmount < ::Plutus::Amount
9
9
  end
10
10
  end
@@ -5,6 +5,6 @@ module Plutus
5
5
  # debit_amount = Plutus::DebitAmount.new(:account => cash, :amount => 1000)
6
6
  #
7
7
  # @author Michael Bulat
8
- class DebitAmount < Amount
8
+ class DebitAmount < ::Plutus::Amount
9
9
  end
10
10
  end
@@ -7,7 +7,7 @@ module Plutus
7
7
  # @see http://en.wikipedia.org/wiki/Equity_(finance) Equity
8
8
  #
9
9
  # @author Michael Bulat
10
- class Equity < Account
10
+ class Equity < ::Plutus::Account
11
11
 
12
12
  self.normal_credit_balance = true
13
13
 
@@ -7,7 +7,7 @@ module Plutus
7
7
  # @see http://en.wikipedia.org/wiki/Expense Expenses
8
8
  #
9
9
  # @author Michael Bulat
10
- class Expense < Account
10
+ class Expense < ::Plutus::Account
11
11
 
12
12
  self.normal_credit_balance = false
13
13
 
@@ -7,7 +7,7 @@ module Plutus
7
7
  # @see http://en.wikipedia.org/wiki/Liability_(financial_accounting) Liability
8
8
  #
9
9
  # @author Michael Bulat
10
- class Liability < Account
10
+ class Liability < ::Plutus::Account
11
11
 
12
12
  self.normal_credit_balance = true
13
13
 
@@ -7,7 +7,7 @@ module Plutus
7
7
  # @see http://en.wikipedia.org/wiki/Revenue Revenue
8
8
  #
9
9
  # @author Michael Bulat
10
- class Revenue < Account
10
+ class Revenue < ::Plutus::Account
11
11
 
12
12
  self.normal_credit_balance = true
13
13
 
@@ -4,7 +4,6 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <title>Plutus</title>
6
6
  <%= stylesheet_link_tag "plutus/application", media: "all" %>
7
- <%= javascript_include_tag "plutus/application" %>
8
7
  <%= csrf_meta_tags %>
9
8
  </head>
10
9
  <body>
@@ -5,7 +5,7 @@
5
5
  <%= form_tag({:action => 'balance_sheet'}, {:method => :get, :class => 'form-inline'}) do%>
6
6
  <div class="form-group">
7
7
  <%= label_tag :date, nil, class: 'sr-only'%>
8
- <%= text_field_tag :date, @to_date, :class => 'datepicker form-control' %>
8
+ <%= date_field_tag :date, @to_date, :class => 'form-control' %>
9
9
  </div>
10
10
  <button type="submit" class="btn btn-default">Get Report</button>
11
11
  <% end %>
@@ -5,11 +5,11 @@
5
5
  <%= form_tag({:action => 'income_statement'}, {:method => :get, :class => 'form-inline'}) do%>
6
6
  <div class="form-group">
7
7
  <%= label_tag :from_date, nil, class: 'sr-only'%>
8
- <%= text_field_tag :from_date, @from_date, :class => 'datepicker form-control', :placeholder => "Date" %>
8
+ <%= date_field_tag :from_date, @from_date, :class => 'form-control', :placeholder => "Date" %>
9
9
  </div>
10
10
  <div class="form-group">
11
11
  <%= label_tag :to_date, nil, class: 'sr-only'%>
12
- <%= text_field_tag :to_date, @to_date, :class => 'datepicker form-control', :placeholder => "Date" %>
12
+ <%= date_field_tag :to_date, @to_date, :class => 'form-control', :placeholder => "Date" %>
13
13
  </div>
14
14
  <button type="submit" class="btn btn-default">Get Report</button>
15
15
  <% end %>
@@ -1,9 +1,9 @@
1
1
  class CreatePlutusTables < ActiveRecord::Migration[4.2]
2
- def self.up
2
+ def change
3
3
  create_table :plutus_accounts do |t|
4
4
  t.string :name
5
5
  t.string :type
6
- t.boolean :contra
6
+ t.boolean :contra, default: false
7
7
 
8
8
  t.timestamps
9
9
  end
@@ -30,10 +30,4 @@ class CreatePlutusTables < ActiveRecord::Migration[4.2]
30
30
  add_index :plutus_amounts, [:account_id, :entry_id]
31
31
  add_index :plutus_amounts, [:entry_id, :account_id]
32
32
  end
33
-
34
- def self.down
35
- drop_table :plutus_accounts
36
- drop_table :plutus_entries
37
- drop_table :plutus_amounts
38
- end
39
33
  end
@@ -2,11 +2,6 @@
2
2
  require "rails"
3
3
 
4
4
  module Plutus
5
- class Engine < Rails::Engine
6
- isolate_namespace Plutus
7
- end
8
-
9
-
10
5
  # ------------------------------ tenancy ------------------------------
11
6
  # configuration to enable or disable tenancy
12
7
  mattr_accessor :enable_tenancy
@@ -21,3 +16,5 @@ module Plutus
21
16
  yield(self)
22
17
  end
23
18
  end
19
+
20
+ require "plutus/engine"
@@ -0,0 +1,5 @@
1
+ module Plutus
2
+ class Engine < Rails::Engine
3
+ isolate_namespace Plutus
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Plutus
2
- VERSION = "0.13"
2
+ VERSION = "0.17"
3
3
  end
@@ -12,12 +12,12 @@ module Plutus
12
12
  it "renders when one entry exists" do
13
13
  allow(Entry).to receive_message_chain(:order).and_return([mock_entry])
14
14
  get :balance_sheet
15
- expect(response).to be_success
15
+ assert_template 'reports/balance_sheet'
16
16
  end
17
17
  it "renders when no entries exist" do
18
18
  allow(Entry).to receive_message_chain(:order).and_return([])
19
19
  get :balance_sheet
20
- expect(response).to be_success
20
+ assert_template 'reports/balance_sheet'
21
21
  end
22
22
  end
23
23
  end
@@ -1,32 +1,32 @@
1
1
  FactoryGirl.define do
2
2
  factory :account, :class => Plutus::Account do |account|
3
3
  account.name
4
- account.contra false
4
+ account.contra { false }
5
5
  end
6
6
 
7
7
  factory :asset, :class => Plutus::Asset do |account|
8
8
  account.name
9
- account.contra false
9
+ account.contra { false }
10
10
  end
11
11
 
12
12
  factory :equity, :class => Plutus::Equity do |account|
13
13
  account.name
14
- account.contra false
14
+ account.contra { false }
15
15
  end
16
16
 
17
17
  factory :expense, :class => Plutus::Expense do |account|
18
18
  account.name
19
- account.contra false
19
+ account.contra { false }
20
20
  end
21
21
 
22
22
  factory :liability, :class => Plutus::Liability do |account|
23
23
  account.name
24
- account.contra false
24
+ account.contra { false }
25
25
  end
26
26
 
27
27
  factory :revenue, :class => Plutus::Revenue do |account|
28
28
  account.name
29
- account.contra false
29
+ account.contra { false }
30
30
  end
31
31
 
32
32
  sequence :name do |n|
@@ -1,18 +1,18 @@
1
1
  FactoryGirl.define do
2
2
  factory :amount, :class => Plutus::Amount do |amount|
3
- amount.amount BigDecimal.new('473')
3
+ amount.amount { BigDecimal('473') }
4
4
  amount.association :entry, :factory => :entry_with_credit_and_debit
5
5
  amount.association :account, :factory => :asset
6
6
  end
7
7
 
8
8
  factory :credit_amount, :class => Plutus::CreditAmount do |credit_amount|
9
- credit_amount.amount BigDecimal.new('473')
9
+ credit_amount.amount { BigDecimal('473') }
10
10
  credit_amount.association :entry, :factory => :entry_with_credit_and_debit
11
11
  credit_amount.association :account, :factory => :revenue
12
12
  end
13
13
 
14
14
  factory :debit_amount, :class => Plutus::DebitAmount do |debit_amount|
15
- debit_amount.amount BigDecimal.new('473')
15
+ debit_amount.amount { BigDecimal('473') }
16
16
  debit_amount.association :entry, :factory => :entry_with_credit_and_debit
17
17
  debit_amount.association :account, :factory => :asset
18
18
  end
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :entry, :class => Plutus::Entry do |entry|
3
- entry.description 'factory description'
3
+ entry.description { 'factory description' }
4
4
  factory :entry_with_credit_and_debit, :class => Plutus::Entry do |entry_cd|
5
5
  entry_cd.after_build do |t|
6
6
  t.credit_amounts << FactoryGirl.build(:credit_amount, :entry => t)
@@ -0,0 +1,12 @@
1
+ module Plutus
2
+ class Tenant < ActiveRecord::Base
3
+ end
4
+ end
5
+
6
+ FactoryGirl.define do
7
+ factory :tenant, :class => Plutus::Tenant do
8
+ sequence :name do |n|
9
+ "Tenant #{n}"
10
+ end
11
+ end
12
+ end
@@ -7,6 +7,13 @@ module Plutus
7
7
 
8
8
  it { is_expected.not_to be_valid } # must construct a child type instead
9
9
 
10
+ describe ".types" do
11
+ it "lists the available types" do
12
+ expect(described_class.types).
13
+ to match_array([Asset, Equity, Expense, Liability, Revenue])
14
+ end
15
+ end
16
+
10
17
  describe "when using a child type" do
11
18
  let(:account) { FactoryGirl.create(:account, type: "Finance::Asset") }
12
19
  it { is_expected.to be_valid }
@@ -2,6 +2,11 @@ require 'spec_helper'
2
2
 
3
3
  module Plutus
4
4
  describe Amount do
5
+
6
+ describe "attributes" do
7
+ it { is_expected.to delegate_method(:name).to(:account).with_prefix }
8
+ end
9
+
5
10
  subject { FactoryGirl.build(:amount) }
6
11
  it { is_expected.not_to be_valid } # construct a child class instead
7
12
  end
@@ -3,12 +3,27 @@ require 'spec_helper'
3
3
  module Plutus
4
4
  describe Account do
5
5
  describe 'tenancy support' do
6
+
7
+ before(:all) do
8
+ m = ActiveRecord::Migration.new
9
+ m.verbose = false
10
+ m.create_table :plutus_tenants do |t|
11
+ t.string :name
12
+ end
13
+ end
14
+
15
+ after :all do
16
+ m = ActiveRecord::Migration.new
17
+ m.verbose = false
18
+ m.drop_table :plutus_tenants
19
+ end
20
+
6
21
  before(:each) do
7
22
  ActiveSupportHelpers.clear_model('Account')
8
23
  ActiveSupportHelpers.clear_model('Asset')
9
24
 
10
25
  Plutus.enable_tenancy = true
11
- Plutus.tenant_class = 'Plutus::Entry'
26
+ Plutus.tenant_class = 'Plutus::Tenant'
12
27
 
13
28
  FactoryGirlHelpers.reload()
14
29
  Plutus::Asset.new
@@ -27,17 +42,20 @@ module Plutus
27
42
  end
28
43
 
29
44
  it 'validate uniqueness of name scoped to tenant' do
30
- account = FactoryGirl.create(:asset, tenant_id: 10)
45
+ tenant = FactoryGirl.create(:tenant)
46
+ account = FactoryGirl.create(:asset, tenant: tenant)
31
47
 
32
- record = FactoryGirl.build(:asset, name: account.name, tenant_id: 10)
48
+ record = FactoryGirl.build(:asset, name: account.name, tenant: tenant)
33
49
  expect(record).not_to be_valid
34
50
  expect(record.errors[:name]).to eq(['has already been taken'])
35
51
  end
36
52
 
37
53
  it 'allows same name scoped under a different tenant' do
38
- account = FactoryGirl.create(:asset, tenant_id: 10)
54
+ tenant_1 = FactoryGirl.create(:tenant)
55
+ tenant_2 = FactoryGirl.create(:tenant)
56
+ account = FactoryGirl.create(:asset, tenant: tenant_1)
39
57
 
40
- record = FactoryGirl.build(:asset, name: account.name, tenant_id: 11)
58
+ record = FactoryGirl.build(:asset, name: account.name, tenant: tenant_2)
41
59
  expect(record).to be_valid
42
60
  end
43
61
  end
@@ -1,5 +1,5 @@
1
- require 'simplecov'
2
- SimpleCov.start
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
3
 
4
4
  ENV["RAILS_ENV"] ||= 'test'
5
5
  require File.expand_path(File.dirname(__FILE__) + "/../fixture_rails_root/config/environment")
@@ -0,0 +1,8 @@
1
+ require 'shoulda-matchers'
2
+
3
+ Shoulda::Matchers.configure do |config|
4
+ config.integrate do |with|
5
+ with.test_framework :rspec
6
+ with.library :active_record
7
+ end
8
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutus
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.13'
4
+ version: '0.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bulat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2020-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,70 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: jquery-rails
28
+ name: kaminari
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '1.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '1.2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: jquery-ui-rails
42
+ name: yard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.2
48
- type: :runtime
47
+ version: '0'
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.2
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: kaminari
56
+ name: shoulda-matchers
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: yard
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: '3.1'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: '3.1'
83
69
  description: The plutus plugin provides a complete double entry accounting system
84
70
  for use in any Ruby on Rails application. The plugin follows general Double Entry
85
71
  Bookkeeping practices. All calculations are done using BigDecimal in order to prevent
@@ -96,7 +82,6 @@ files:
96
82
  - README.markdown
97
83
  - Rakefile
98
84
  - app/assets/javascripts/plutus/application.js
99
- - app/assets/javascripts/plutus/reports.js.coffee
100
85
  - app/assets/stylesheets/bootstrap-theme.min.css
101
86
  - app/assets/stylesheets/bootstrap.min.css
102
87
  - app/assets/stylesheets/plutus/application.css
@@ -133,17 +118,16 @@ files:
133
118
  - config/routes.rb
134
119
  - config/secret_token.rb
135
120
  - config/session_store.rb
121
+ - db/migrate/20160422010135_create_plutus_tables.rb
136
122
  - lib/generators/plutus/USAGE
137
123
  - lib/generators/plutus/add_date_upgrade_generator.rb
138
124
  - lib/generators/plutus/base_generator.rb
139
125
  - lib/generators/plutus/plutus_generator.rb
140
- - lib/generators/plutus/templates/add_date_migration.rb
141
- - lib/generators/plutus/templates/migration.rb
142
126
  - lib/generators/plutus/templates/tenant_migration.rb
143
- - lib/generators/plutus/templates/update_migration.rb
144
127
  - lib/generators/plutus/tenancy_generator.rb
145
128
  - lib/generators/plutus/upgrade_plutus_generator.rb
146
129
  - lib/plutus.rb
130
+ - lib/plutus/engine.rb
147
131
  - lib/plutus/version.rb
148
132
  - spec/controllers/accounts_controller_spec.rb
149
133
  - spec/controllers/entries_controller_spec.rb
@@ -151,6 +135,7 @@ files:
151
135
  - spec/factories/account_factory.rb
152
136
  - spec/factories/amount_factory.rb
153
137
  - spec/factories/entry_factory.rb
138
+ - spec/factories/tenant_factory.rb
154
139
  - spec/lib/plutus_spec.rb
155
140
  - spec/models/account_spec.rb
156
141
  - spec/models/amount_spec.rb
@@ -172,6 +157,7 @@ files:
172
157
  - spec/support/active_support_helpers.rb
173
158
  - spec/support/amount_shared_examples.rb
174
159
  - spec/support/factory_girl_helpers.rb
160
+ - spec/support/shoulda_matchers.rb
175
161
  homepage: http://github.com/mbulat/plutus
176
162
  licenses: []
177
163
  metadata: {}
@@ -191,35 +177,37 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
177
  version: 1.3.6
192
178
  requirements: []
193
179
  rubyforge_project:
194
- rubygems_version: 2.5.2
180
+ rubygems_version: 2.7.6.2
195
181
  signing_key:
196
182
  specification_version: 3
197
183
  summary: A Plugin providing a Double Entry Accounting Engine for Rails
198
184
  test_files:
185
+ - spec/routing/entries_routing_spec.rb
186
+ - spec/routing/accounts_routing_spec.rb
199
187
  - spec/lib/plutus_spec.rb
200
- - spec/spec.opts
201
- - spec/factories/amount_factory.rb
188
+ - spec/spec_helper.rb
189
+ - spec/controllers/entries_controller_spec.rb
190
+ - spec/controllers/accounts_controller_spec.rb
191
+ - spec/controllers/reports_controller_spec.rb
202
192
  - spec/factories/entry_factory.rb
203
193
  - spec/factories/account_factory.rb
204
- - spec/spec_helper.rb
205
- - spec/support/factory_girl_helpers.rb
206
- - spec/support/amount_shared_examples.rb
194
+ - spec/factories/amount_factory.rb
195
+ - spec/factories/tenant_factory.rb
207
196
  - spec/support/active_support_helpers.rb
197
+ - spec/support/shoulda_matchers.rb
208
198
  - spec/support/account_shared_examples.rb
209
- - spec/routing/accounts_routing_spec.rb
210
- - spec/routing/entries_routing_spec.rb
199
+ - spec/support/factory_girl_helpers.rb
200
+ - spec/support/amount_shared_examples.rb
201
+ - spec/spec.opts
211
202
  - spec/rcov.opts
212
- - spec/controllers/reports_controller_spec.rb
213
- - spec/controllers/entries_controller_spec.rb
214
- - spec/controllers/accounts_controller_spec.rb
215
- - spec/models/account_spec.rb
216
- - spec/models/credit_amount_spec.rb
217
- - spec/models/expense_spec.rb
218
- - spec/models/tenancy_spec.rb
219
203
  - spec/models/liability_spec.rb
220
- - spec/models/asset_spec.rb
221
- - spec/models/debit_amount_spec.rb
204
+ - spec/models/credit_amount_spec.rb
205
+ - spec/models/equity_spec.rb
222
206
  - spec/models/revenue_spec.rb
207
+ - spec/models/debit_amount_spec.rb
208
+ - spec/models/account_spec.rb
223
209
  - spec/models/amount_spec.rb
224
- - spec/models/equity_spec.rb
210
+ - spec/models/tenancy_spec.rb
225
211
  - spec/models/entry_spec.rb
212
+ - spec/models/asset_spec.rb
213
+ - spec/models/expense_spec.rb
@@ -1,2 +0,0 @@
1
- jQuery ->
2
- $('.datepicker').datepicker dateFormat: "yy-mm-dd"
@@ -1,6 +0,0 @@
1
- class AddDateToPlutusEntries < ActiveRecord::Migration[4.2]
2
- def change
3
- add_column :plutus_entries, :date, :date
4
- add_index :plutus_entries, :date
5
- end
6
- end
@@ -1,17 +0,0 @@
1
- class UpdatePlutusTables < ActiveRecord::Migration[4.2]
2
- def change
3
- # we have to remove these indexes because the temporary
4
- # table index name is too long
5
- remove_index :plutus_amounts, [:account_id, :transaction_id]
6
- remove_index :plutus_amounts, [:transaction_id, :account_id]
7
- remove_index :plutus_transactions, column: [:commercial_document_id, :commercial_document_type], :name => "index_transactions_on_commercial_doc"
8
-
9
- rename_table :plutus_transactions, :plutus_entries
10
- rename_column :plutus_amounts, :transaction_id, :entry_id
11
-
12
- # adding the indexes back
13
- add_index :plutus_amounts, [:account_id, :entry_id]
14
- add_index :plutus_amounts, [:entry_id, :account_id]
15
- add_index :plutus_entries, [:commercial_document_id, :commercial_document_type], :name => "index_entries_on_commercial_doc"
16
- end
17
- end