plutus 0.16 → 0.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c15a4c67d742e40dabfdd3c72b9a6877f74589ba456ccbc6d0129d24183afcb4
4
- data.tar.gz: 36994885d6d3573d84791173d518290c6080df50f3ae3b240f2cbcdcbdebe82c
3
+ metadata.gz: 527073217d3b110f92779b2a83fba46bd0b1b6e97dfc05bd30eaf4b42aca4b21
4
+ data.tar.gz: 96b50d4b7a669ff08a94ac473fc82b614210e98df5bf555378df6294e8a2c8c5
5
5
  SHA512:
6
- metadata.gz: f52a3430cb5ef405105c7fc0399538240c2217d98b70a7b0fbeb1b100d3676c37c18e9bfc18aa6cebdad10d1c7b2bd847f753289e5144aef44c07e2f27b17122
7
- data.tar.gz: b4f2424a9399b65a6259c9040c43852162a02cab2f86fb6cdf621fb7cae0c5c0ff5f78d0753eb713b1cd8b3c22fe225cb13c340e97ddee0a171f2f15ab21473b
6
+ metadata.gz: f5e0efef2af327b812c8073ccbeddc83c1e86907d597190b8c52a513b6d7c0c5933fad05bd750ea30c5594072a09c690cd3c4aef33b6575260b7bf30cc158eff
7
+ data.tar.gz: e777f29f0d83e3eafffe6f5ef71a01d44e18beb70807977358c5d5ac6a97025e329a3690b7dcd30f9eaf231206d759bb5a8a1b203e62ed4578a039d29d8c4bf2
data/README.markdown CHANGED
@@ -7,8 +7,8 @@ The Plutus plugin is a Ruby on Rails Engine which provides a double entry accoun
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.7+
11
+ * Rails versions: ~> 7.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
 
@@ -267,7 +267,7 @@ entry = Plutus::Entry.build(
267
267
  Multitenancy Support
268
268
  =====================
269
269
 
270
- 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:
271
271
 
272
272
  - Generate the migration which will add `tenant_id` to the plutus accounts table
273
273
 
@@ -310,7 +310,7 @@ The Engine provides controllers and views for rendering basic reports, including
310
310
 
311
311
  These views and controllers are read-only for reporting purposes. It is assumed entry creation will occur within your applications code.
312
312
 
313
- Routing is supplied via an engine mount point. Plutus can be mounted on a subpath in your existing Rails 3 app by adding the following to your routes.rb:
313
+ Routing is supplied via an engine mount point. Plutus can be mounted on a subpath in your existing Rails app by adding the following to your routes.rb:
314
314
 
315
315
  ```ruby
316
316
  mount Plutus::Engine => "/plutus", :as => "plutus"
@@ -320,6 +320,15 @@ mount Plutus::Engine => "/plutus", :as => "plutus"
320
320
 
321
321
  *Future versions of plutus will allow for customization of authentication.*
322
322
 
323
+ Sprockets 4+
324
+ ------------
325
+
326
+ You must require Plutus' manifest.js in your app manifest.js:
327
+
328
+ ```
329
+ //= link plutus/manifest.js
330
+ ```
331
+
323
332
 
324
333
  Previous Versions
325
334
  =================
@@ -0,0 +1 @@
1
+ //= link plutus/application.css
@@ -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,8 +10,8 @@ module Plutus
10
10
  # controller will inherit.
11
11
  #
12
12
  # @author Michael Bulat
13
- class AccountsController < Plutus::ApplicationController
14
- unloadable
13
+ class AccountsController < ::Plutus::ApplicationController
14
+ unloadable if respond_to?(:unloadable)
15
15
 
16
16
  # @example
17
17
  # GET /accounts
@@ -11,7 +11,7 @@ module Plutus
11
11
  #
12
12
  # @author Michael Bulat
13
13
  class EntriesController < Plutus::ApplicationController
14
- unloadable
14
+ unloadable if respond_to?(:unloadable)
15
15
  # @example
16
16
  # GET /entries
17
17
  # GET /entries.xml
@@ -5,8 +5,8 @@ module Plutus
5
5
  # controller will inherit.
6
6
  #
7
7
  # @author Michael Bulat
8
- class ReportsController < Plutus::ApplicationController
9
- unloadable
8
+ class ReportsController < ::Plutus::ApplicationController
9
+ unloadable if respond_to?(:unloadable)
10
10
 
11
11
  # @example
12
12
  # GET /reports/balance_sheet
@@ -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
@@ -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 < Plutus::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
@@ -25,53 +25,52 @@ module Plutus
25
25
  before_save :default_date
26
26
 
27
27
  if ActiveRecord::VERSION::MAJOR > 4
28
- belongs_to :commercial_document, :polymorphic => true, optional: true
28
+ belongs_to :commercial_document, polymorphic: true, optional: true
29
29
  else
30
- belongs_to :commercial_document, :polymorphic => true
30
+ belongs_to :commercial_document, polymorphic: true
31
31
  end
32
32
 
33
- has_many :credit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::CreditAmount', :inverse_of => :entry
34
- has_many :debit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::DebitAmount', :inverse_of => :entry
35
- has_many :credit_accounts, :through => :credit_amounts, :source => :account, :class_name => 'Plutus::Account'
36
- has_many :debit_accounts, :through => :debit_amounts, :source => :account, :class_name => 'Plutus::Account'
33
+ has_many :credit_amounts, extend: AmountsExtension, class_name: 'Plutus::CreditAmount', inverse_of: :entry
34
+ has_many :debit_amounts, extend: AmountsExtension, class_name: 'Plutus::DebitAmount', inverse_of: :entry
35
+ has_many :credit_accounts, through: :credit_amounts, source: :account, class_name: 'Plutus::Account'
36
+ has_many :debit_accounts, through: :debit_amounts, source: :account, class_name: 'Plutus::Account'
37
37
 
38
38
  validates_presence_of :description
39
- validate :has_credit_amounts?
40
- validate :has_debit_amounts?
39
+ validate :credit_amounts?
40
+ validate :debit_amounts?
41
41
  validate :amounts_cancel?
42
42
 
43
43
  # Support construction using 'credits' and 'debits' keys
44
44
  accepts_nested_attributes_for :credit_amounts, :debit_amounts, allow_destroy: true
45
- alias_method :credits=, :credit_amounts_attributes=
46
- alias_method :debits=, :debit_amounts_attributes=
45
+ alias credits= credit_amounts_attributes=
46
+ alias debits= debit_amounts_attributes=
47
47
  # attr_accessible :credits, :debits
48
48
 
49
+ def default_date
50
+ todays_date = ActiveRecord.default_timezone == :utc ? Time.now.utc : Time.now
51
+ self.date ||= todays_date
52
+ end
53
+
49
54
  # Support the deprecated .build method
50
55
  def self.build(hash)
51
56
  ActiveSupport::Deprecation.warn('Plutus::Transaction.build() is deprecated (use new instead)', caller)
52
57
  new(hash)
53
58
  end
54
59
 
55
- def initialize(*args)
56
- super
57
- end
60
+ private
58
61
 
59
- private
60
- def default_date
61
- todays_date = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.now
62
- self.date ||= todays_date
63
- end
64
-
65
- def has_credit_amounts?
66
- errors[:base] << "Entry must have at least one credit amount" if self.credit_amounts.blank?
67
- end
62
+ def credit_amounts?
63
+ errors.add(:base, 'Entry must have at least one credit amount') if credit_amounts.blank?
64
+ end
68
65
 
69
- def has_debit_amounts?
70
- errors[:base] << "Entry must have at least one debit amount" if self.debit_amounts.blank?
71
- end
66
+ def debit_amounts?
67
+ errors.add(:base, 'Entry must have at least one debit amount') if debit_amounts.blank?
68
+ end
72
69
 
73
- def amounts_cancel?
74
- errors[:base] << "The credit and debit amounts are not equal" if credit_amounts.balance_for_new_record != debit_amounts.balance_for_new_record
70
+ def amounts_cancel?
71
+ if credit_amounts.balance_for_new_record != debit_amounts.balance_for_new_record
72
+ errors.add(:base, 'The credit and debit amounts are not equal')
75
73
  end
74
+ end
76
75
  end
77
76
  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 < Plutus::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 < Plutus::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 < Plutus::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 < Plutus::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 %>
data/lib/plutus/engine.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'kaminari'
2
+
1
3
  module Plutus
2
4
  class Engine < Rails::Engine
3
5
  isolate_namespace Plutus
@@ -1,3 +1,3 @@
1
1
  module Plutus
2
- VERSION = "0.16"
2
+ VERSION = "0.18"
3
3
  end
@@ -1,10 +1,11 @@
1
1
  FactoryGirl.define do
2
- factory :entry, :class => Plutus::Entry do |entry|
2
+ factory :entry, class: Plutus::Entry do |entry|
3
3
  entry.description { 'factory description' }
4
- factory :entry_with_credit_and_debit, :class => Plutus::Entry do |entry_cd|
4
+
5
+ factory :entry_with_credit_and_debit, class: Plutus::Entry do |entry_cd|
5
6
  entry_cd.after_build do |t|
6
- t.credit_amounts << FactoryGirl.build(:credit_amount, :entry => t)
7
- t.debit_amounts << FactoryGirl.build(:debit_amount, :entry => t)
7
+ t.credit_amounts << FactoryGirl.build(:credit_amount, entry: t)
8
+ t.debit_amounts << FactoryGirl.build(:debit_amount, entry: t)
8
9
  end
9
10
  end
10
11
  end
@@ -1,6 +1,6 @@
1
1
  module Plutus
2
- class Tenant < ActiveRecord::Base
3
- end
2
+ class Tenant < ActiveRecord::Base
3
+ end
4
4
  end
5
5
 
6
6
  FactoryGirl.define do
@@ -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 }
@@ -1,11 +1,12 @@
1
1
  require 'spec_helper'
2
+ require 'debug'
2
3
 
3
4
  module Plutus
4
5
  describe Entry do
5
6
  let(:entry) { FactoryGirl.build(:entry) }
6
7
  subject { entry }
7
8
 
8
- it { is_expected.not_to be_valid }
9
+ it { is_expected.not_to be_valid }
9
10
 
10
11
  context "with credit and debit" do
11
12
  let(:entry) { FactoryGirl.build(:entry_with_credit_and_debit) }
@@ -3,58 +3,58 @@ require 'spec_helper'
3
3
  module Plutus
4
4
  describe Account do
5
5
  describe 'tenancy support' do
6
-
6
+
7
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
8
+ m = ActiveRecord::Migration.new
9
+ m.verbose = false
10
+ m.create_table :plutus_tenants do |t|
11
+ t.string :name
12
+ end
13
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
-
14
+
15
+ after :all do
16
+ m = ActiveRecord::Migration.new
17
+ m.verbose = false
18
+ m.drop_table :plutus_tenants
19
+ end
20
+
21
21
  before(:each) do
22
- ActiveSupportHelpers.clear_model('Account')
23
- ActiveSupportHelpers.clear_model('Asset')
24
-
25
22
  Plutus.enable_tenancy = true
26
23
  Plutus.tenant_class = 'Plutus::Tenant'
27
-
24
+
25
+ ActiveSupportHelpers.reload_model('Account')
26
+ ActiveSupportHelpers.reload_model('Asset')
27
+
28
28
  FactoryGirlHelpers.reload()
29
29
  Plutus::Asset.new
30
30
  end
31
-
31
+
32
32
  after(:each) do
33
33
  if Plutus.const_defined?(:Asset)
34
- ActiveSupportHelpers.clear_model('Account')
35
- ActiveSupportHelpers.clear_model('Asset')
34
+ ActiveSupportHelpers.reload_model('Account')
35
+ ActiveSupportHelpers.reload_model('Asset')
36
36
  end
37
-
37
+
38
38
  Plutus.enable_tenancy = false
39
39
  Plutus.tenant_class = nil
40
-
40
+
41
41
  FactoryGirlHelpers.reload()
42
42
  end
43
-
43
+
44
44
  it 'validate uniqueness of name scoped to tenant' do
45
45
  tenant = FactoryGirl.create(:tenant)
46
46
  account = FactoryGirl.create(:asset, tenant: tenant)
47
-
47
+
48
48
  record = FactoryGirl.build(:asset, name: account.name, tenant: tenant)
49
49
  expect(record).not_to be_valid
50
50
  expect(record.errors[:name]).to eq(['has already been taken'])
51
51
  end
52
-
52
+
53
53
  it 'allows same name scoped under a different tenant' do
54
54
  tenant_1 = FactoryGirl.create(:tenant)
55
55
  tenant_2 = FactoryGirl.create(:tenant)
56
56
  account = FactoryGirl.create(:asset, tenant: tenant_1)
57
-
57
+
58
58
  record = FactoryGirl.build(:asset, name: account.name, tenant: tenant_2)
59
59
  expect(record).to be_valid
60
60
  end
@@ -1,13 +1,6 @@
1
1
  module ActiveSupportHelpers
2
- # Helps in removing model, and force-reloading it next time This helper does 2
3
- # things:
4
- # * remove from $LOADED_FEATURES so that ruby 'require' reloads file again
5
- # * remove the constant from active support dependencies
6
- def self.clear_model(model_name)
7
- ActiveSupport::Dependencies.remove_constant('Plutus::' + model_name)
8
-
9
- models_dir = File.dirname(__FILE__) + '/../../app/models/plutus/'
10
- path = File.expand_path(models_dir + model_name.downcase + '.rb')
11
- $LOADED_FEATURES.delete(path)
2
+ def self.reload_model(model_name)
3
+ Plutus.send(:remove_const, "#{model_name}")
4
+ load("app/models/plutus/#{model_name.downcase}.rb")
12
5
  end
13
6
  end
metadata CHANGED
@@ -1,71 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutus
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.16'
4
+ version: '0.18'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bulat
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2020-06-22 00:00:00.000000000 Z
10
+ date: 2025-03-23 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">"
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">"
25
- - !ruby/object:Gem::Version
26
- version: '6.0'
27
- - !ruby/object:Gem::Dependency
28
- name: jquery-rails
13
+ name: kaminari
29
14
  requirement: !ruby/object:Gem::Requirement
30
15
  requirements:
31
- - - ">="
16
+ - - "~>"
32
17
  - !ruby/object:Gem::Version
33
- version: '3.0'
18
+ version: '1.2'
34
19
  type: :runtime
35
20
  prerelease: false
36
21
  version_requirements: !ruby/object:Gem::Requirement
37
22
  requirements:
38
- - - ">="
23
+ - - "~>"
39
24
  - !ruby/object:Gem::Version
40
- version: '3.0'
25
+ version: '1.2'
41
26
  - !ruby/object:Gem::Dependency
42
- name: jquery-ui-rails
27
+ name: rails
43
28
  requirement: !ruby/object:Gem::Requirement
44
29
  requirements:
45
- - - ">="
30
+ - - ">"
46
31
  - !ruby/object:Gem::Version
47
- version: 4.2.2
32
+ version: '7.0'
48
33
  type: :runtime
49
34
  prerelease: false
50
35
  version_requirements: !ruby/object:Gem::Requirement
51
36
  requirements:
52
- - - ">="
37
+ - - ">"
53
38
  - !ruby/object:Gem::Version
54
- version: 4.2.2
39
+ version: '7.0'
55
40
  - !ruby/object:Gem::Dependency
56
- name: kaminari
41
+ name: shoulda-matchers
57
42
  requirement: !ruby/object:Gem::Requirement
58
43
  requirements:
59
44
  - - "~>"
60
45
  - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
46
+ version: '3.1'
47
+ type: :development
63
48
  prerelease: false
64
49
  version_requirements: !ruby/object:Gem::Requirement
65
50
  requirements:
66
51
  - - "~>"
67
52
  - !ruby/object:Gem::Version
68
- version: '1.0'
53
+ version: '3.1'
69
54
  - !ruby/object:Gem::Dependency
70
55
  name: yard
71
56
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +65,6 @@ dependencies:
80
65
  - - ">="
81
66
  - !ruby/object:Gem::Version
82
67
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: shoulda-matchers
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '3.1'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '3.1'
97
68
  description: The plutus plugin provides a complete double entry accounting system
98
69
  for use in any Ruby on Rails application. The plugin follows general Double Entry
99
70
  Bookkeeping practices. All calculations are done using BigDecimal in order to prevent
@@ -109,8 +80,8 @@ files:
109
80
  - LICENSE
110
81
  - README.markdown
111
82
  - Rakefile
83
+ - app/assets/config/plutus/manifest.js
112
84
  - app/assets/javascripts/plutus/application.js
113
- - app/assets/javascripts/plutus/reports.js
114
85
  - app/assets/stylesheets/bootstrap-theme.min.css
115
86
  - app/assets/stylesheets/bootstrap.min.css
116
87
  - app/assets/stylesheets/plutus/application.css
@@ -152,9 +123,7 @@ files:
152
123
  - lib/generators/plutus/add_date_upgrade_generator.rb
153
124
  - lib/generators/plutus/base_generator.rb
154
125
  - lib/generators/plutus/plutus_generator.rb
155
- - lib/generators/plutus/templates/add_date_migration.rb
156
126
  - lib/generators/plutus/templates/tenant_migration.rb
157
- - lib/generators/plutus/templates/update_migration.rb
158
127
  - lib/generators/plutus/tenancy_generator.rb
159
128
  - lib/generators/plutus/upgrade_plutus_generator.rb
160
129
  - lib/plutus.rb
@@ -192,7 +161,6 @@ files:
192
161
  homepage: http://github.com/mbulat/plutus
193
162
  licenses: []
194
163
  metadata: {}
195
- post_install_message:
196
164
  rdoc_options: []
197
165
  require_paths:
198
166
  - lib
@@ -205,39 +173,38 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
173
  requirements:
206
174
  - - ">="
207
175
  - !ruby/object:Gem::Version
208
- version: 1.3.6
176
+ version: '0'
209
177
  requirements: []
210
- rubygems_version: 3.1.2
211
- signing_key:
178
+ rubygems_version: 3.6.6
212
179
  specification_version: 3
213
180
  summary: A Plugin providing a Double Entry Accounting Engine for Rails
214
181
  test_files:
215
- - spec/routing/entries_routing_spec.rb
216
- - spec/routing/accounts_routing_spec.rb
217
- - spec/lib/plutus_spec.rb
218
- - spec/spec_helper.rb
219
- - spec/controllers/entries_controller_spec.rb
220
182
  - spec/controllers/accounts_controller_spec.rb
183
+ - spec/controllers/entries_controller_spec.rb
221
184
  - spec/controllers/reports_controller_spec.rb
222
- - spec/factories/entry_factory.rb
223
185
  - spec/factories/account_factory.rb
224
186
  - spec/factories/amount_factory.rb
187
+ - spec/factories/entry_factory.rb
225
188
  - spec/factories/tenant_factory.rb
226
- - spec/support/active_support_helpers.rb
227
- - spec/support/shoulda_matchers.rb
228
- - spec/support/account_shared_examples.rb
229
- - spec/support/factory_girl_helpers.rb
230
- - spec/support/amount_shared_examples.rb
231
- - spec/spec.opts
232
- - spec/rcov.opts
233
- - spec/models/liability_spec.rb
234
- - spec/models/credit_amount_spec.rb
235
- - spec/models/equity_spec.rb
236
- - spec/models/revenue_spec.rb
237
- - spec/models/debit_amount_spec.rb
189
+ - spec/lib/plutus_spec.rb
238
190
  - spec/models/account_spec.rb
239
191
  - spec/models/amount_spec.rb
240
- - spec/models/tenancy_spec.rb
241
- - spec/models/entry_spec.rb
242
192
  - spec/models/asset_spec.rb
193
+ - spec/models/credit_amount_spec.rb
194
+ - spec/models/debit_amount_spec.rb
195
+ - spec/models/entry_spec.rb
196
+ - spec/models/equity_spec.rb
243
197
  - spec/models/expense_spec.rb
198
+ - spec/models/liability_spec.rb
199
+ - spec/models/revenue_spec.rb
200
+ - spec/models/tenancy_spec.rb
201
+ - spec/rcov.opts
202
+ - spec/routing/accounts_routing_spec.rb
203
+ - spec/routing/entries_routing_spec.rb
204
+ - spec/spec.opts
205
+ - spec/spec_helper.rb
206
+ - spec/support/account_shared_examples.rb
207
+ - spec/support/active_support_helpers.rb
208
+ - spec/support/amount_shared_examples.rb
209
+ - spec/support/factory_girl_helpers.rb
210
+ - spec/support/shoulda_matchers.rb
@@ -1,5 +0,0 @@
1
- jQuery(function() {
2
- return $('.datepicker').datepicker({
3
- dateFormat: "yy-mm-dd"
4
- });
5
- });
@@ -1,12 +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
-
6
- execute <<-SQL
7
- UPDATE plutus_entries
8
- SET date = created_at
9
- WHERE date is null
10
- SQL
11
- end
12
- end
@@ -1,17 +0,0 @@
1
- class UpdatePlutusTables < ActiveRecord::Migration
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