plutus 0.15 → 0.16

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: f8065148547846775eb69a045ab294f98229eba48276fdeff5db760534264d6b
4
- data.tar.gz: a1ccfe5713169766bc4ff1582489b91113e404b47ee345f7cb809dfa155718c9
3
+ metadata.gz: c15a4c67d742e40dabfdd3c72b9a6877f74589ba456ccbc6d0129d24183afcb4
4
+ data.tar.gz: 36994885d6d3573d84791173d518290c6080df50f3ae3b240f2cbcdcbdebe82c
5
5
  SHA512:
6
- metadata.gz: abd85e610d29aa6ec688a89b6cc739aa6c3a8aae484908fa5fc85c65b1e162e1d2342316c2c282cfe4b773299251fcc0187776f9c14a04d9b07cd54546970490
7
- data.tar.gz: 6df2d57b5a8972f40e2b065b94cb6b7cacd1edfba519d07105917c52dadf20a7b57f03a50d9060e5a37409c5e87e67d409ae7e111916739cfa2900af5c258fbb
6
+ metadata.gz: f52a3430cb5ef405105c7fc0399538240c2217d98b70a7b0fbeb1b100d3676c37c18e9bfc18aa6cebdad10d1c7b2bd847f753289e5144aef44c07e2f27b17122
7
+ data.tar.gz: b4f2424a9399b65a6259c9040c43852162a02cab2f86fb6cdf621fb7cae0c5c0ff5f78d0753eb713b1cd8b3c22fe225cb13c340e97ddee0a171f2f15ab21473b
@@ -137,7 +137,7 @@ module Plutus
137
137
  if self.new.class == Plutus::Account
138
138
  raise(NoMethodError, "undefined method 'balance'")
139
139
  else
140
- accounts_balance = BigDecimal.new('0')
140
+ accounts_balance = BigDecimal('0')
141
141
  accounts = self.all
142
142
  accounts.each do |account|
143
143
  if account.contra
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module Plutus
2
- VERSION = "0.15"
2
+ VERSION = "0.16"
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)
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.15'
4
+ version: '0.16'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bulat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2020-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ 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
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -207,8 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: 1.3.6
209
209
  requirements: []
210
- rubyforge_project:
211
- rubygems_version: 2.7.6
210
+ rubygems_version: 3.1.2
212
211
  signing_key:
213
212
  specification_version: 3
214
213
  summary: A Plugin providing a Double Entry Accounting Engine for Rails