borutus 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/borutus/account.rb +1 -1
- data/app/models/borutus/amount.rb +1 -1
- data/db/migrate/20191025095830_add_borutus_amount_counter_cache.rb +2 -1
- data/db/migrate/20191025154652_change_borutus_amount_count_column.rb +16 -0
- data/lib/borutus/version.rb +1 -1
- data/spec/models/account_spec.rb +3 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16856f6ab2672e5bba5fc033897e834fe2dabfdd3ce617ef1ff62dceba442ad5
|
4
|
+
data.tar.gz: 209c8d788c4d19c266b0fe48ff518818642d1b2763b7b2046ab87ce497a75671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07ecc181ecc05d2307c61617a5b37676031769bd28b115604a2acc0d4fd530a47a973536c8c2bb88f481dd596e7fcf0cc4e0f1b22f96851435ccf24c75a2e1b
|
7
|
+
data.tar.gz: d7ec5648852dcf209f9eb91a5cde85c4f84bbb06579022e1d7b1a6afcf66e38359f7687151c544173f02ce60a7f84af13dc32b76bad36c1630b7dcc1095e8093
|
@@ -4,7 +4,8 @@ class AddBorutusAmountCounterCache < ActiveRecord::Migration[4.2]
|
|
4
4
|
add_column :borutus_accounts, :borutus_amounts_count, :integer
|
5
5
|
|
6
6
|
Borutus::Account.all.pluck(:id).each do |id|
|
7
|
-
Borutus::Account.reset_counters(id, :
|
7
|
+
Borutus::Account.reset_counters(id, :debit_amounts)
|
8
|
+
Borutus::Account.reset_counters(id, :credit_amounts)
|
8
9
|
end
|
9
10
|
end
|
10
11
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class ChangeBorutusAmountCountColumn < ActiveRecord::Migration[4.2]
|
2
|
+
|
3
|
+
def up
|
4
|
+
remove_column :borutus_accounts, :borutus_amounts_count
|
5
|
+
add_column :borutus_accounts, :amounts_count, :integer
|
6
|
+
|
7
|
+
Borutus::Account.all.pluck(:id).each do |id|
|
8
|
+
Borutus::Account.reset_counters(id, :amounts)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def down
|
13
|
+
remove_column :borutus_accounts, :amounts_count
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/lib/borutus/version.rb
CHANGED
data/spec/models/account_spec.rb
CHANGED
@@ -217,9 +217,9 @@ module Borutus
|
|
217
217
|
)
|
218
218
|
purchase.save
|
219
219
|
|
220
|
-
expect(equity.amounts.size).to eq 1
|
221
|
-
expect(asset.amounts.size).to eq 2
|
222
|
-
expect(expense.amounts.size).to eq 1
|
220
|
+
expect(equity.reload.amounts.size).to eq 1
|
221
|
+
expect(asset.reload.amounts.size).to eq 2
|
222
|
+
expect(expense.reload.amounts.size).to eq 1
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: borutus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- config/session_store.rb
|
171
171
|
- db/migrate/20160422010135_create_borutus_tables.rb
|
172
172
|
- db/migrate/20191025095830_add_borutus_amount_counter_cache.rb
|
173
|
+
- db/migrate/20191025154652_change_borutus_amount_count_column.rb
|
173
174
|
- lib/borutus.rb
|
174
175
|
- lib/borutus/engine.rb
|
175
176
|
- lib/borutus/version.rb
|