borutus 0.2.4 → 1.0.0

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: 0f14098526112e7a69478ad75518a1c9f550c496d244c65d6392d098c7d25030
4
- data.tar.gz: c2ebcb40848374754cd4b0f36d197e6d21ad4ec9d26af968c9fae259d21cf057
3
+ metadata.gz: af3db80329943979aaeefda9d410838ed28f24a945790fbd8aa755b55590321b
4
+ data.tar.gz: 8672bec07d31bfae0da78a570b03ede355290ea223ba00e559033f289122aef5
5
5
  SHA512:
6
- metadata.gz: ec536b7c8bb8f724c72242c9c44fe4406ee02b56cc355f300b8ce38b9a3576c73128cfbdbc9c5ecafd9f4dfbc1f18334470847d4cf6d1968f3a91a76e4b9311b
7
- data.tar.gz: 5e6a8b7a8deb40df08ebe04225e70a3f57fa1d78901a3ab274c3927d5e6fc896d31e0233348761567ca8cb816e7775825e3dc1328e496744a75f7e1d0c22a63b
6
+ metadata.gz: 0d96a7d5e661b61d786a3ee898a4ae0c68460b1418b2b3daf916e50693ba4ad81df65d36c11a1f95c31c7f9e21ba91b5e7d655017a118aefe0e764b7cbf46214
7
+ data.tar.gz: d12ea7cd1b21820ecf6d36e731f212643ca30d2a2f4eaa34163fd46e1fa228f1404b577fb8f57ba11a715eddc44fa89af52d0a2466684bd3f63e24689d246c62
data/README.md CHANGED
@@ -265,7 +265,7 @@ entry = Borutus::Entry.build(
265
265
  Multitenancy Support
266
266
  =====================
267
267
 
268
- Borutus supports multitenant applications. Multitenancy is acheived by associating all Accounts under `Borutus::Account` with a "Tenant" object (typically some model in your Rails application). To add multi-tenancy support to Borutus, you must do the following:
268
+ Borutus supports multitenant applications. Multitenancy is achieved by associating all Accounts under `Borutus::Account` with a "Tenant" object (typically some model in your Rails application). To add multi-tenancy support to Borutus, you must do the following:
269
269
 
270
270
  - Generate the migration which will add `tenant_id` to the borutus accounts table
271
271
 
@@ -72,7 +72,7 @@ module Borutus
72
72
  validates_presence_of :type
73
73
 
74
74
  scope :with_amounts, -> do
75
- where("amounts_count > 0")
75
+ where(arel_table[:amounts_count].gt(0))
76
76
  end
77
77
 
78
78
  def self.types
@@ -0,0 +1,9 @@
1
+ class RemovePrecisionScale < ActiveRecord::Migration[5.1]
2
+ def up
3
+ change_column :borutus_amounts, :amount, :decimal
4
+ end
5
+
6
+ def down
7
+ change_column :borutus_amounts, :amount, :decimal, precision: 20, scale: 10
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Borutus
2
- VERSION = "0.2.4"
2
+ VERSION = "1.0.0"
3
3
  end
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
4
+ version: 1.0.0
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-31 00:00:00.000000000 Z
12
+ date: 2020-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails
@@ -171,6 +171,7 @@ files:
171
171
  - db/migrate/20160422010135_create_borutus_tables.rb
172
172
  - db/migrate/20191025095830_add_borutus_amount_counter_cache.rb
173
173
  - db/migrate/20191025154652_change_borutus_amount_count_column.rb
174
+ - db/migrate/20201116065934_remove_precision_scale.rb
174
175
  - lib/borutus.rb
175
176
  - lib/borutus/engine.rb
176
177
  - lib/borutus/version.rb
@@ -226,36 +227,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  - !ruby/object:Gem::Version
227
228
  version: '0'
228
229
  requirements: []
229
- rubyforge_project:
230
- rubygems_version: 2.7.6
230
+ rubygems_version: 3.0.8
231
231
  signing_key:
232
232
  specification_version: 3
233
233
  summary: A Plugin providing a Double Entry Accounting Engine for Rails
234
234
  test_files:
235
+ - spec/routing/entries_routing_spec.rb
236
+ - spec/routing/accounts_routing_spec.rb
237
+ - spec/controllers/reports_controller_spec.rb
235
238
  - spec/controllers/accounts_controller_spec.rb
236
239
  - spec/controllers/entries_controller_spec.rb
237
- - spec/controllers/reports_controller_spec.rb
238
- - spec/factories/account_factory.rb
239
- - spec/factories/amount_factory.rb
240
- - spec/factories/entry_factory.rb
240
+ - spec/rcov.opts
241
+ - spec/support/active_support_helpers.rb
242
+ - spec/support/shoulda_matchers.rb
243
+ - spec/support/factory_bot_helpers.rb
244
+ - spec/support/amount_shared_examples.rb
245
+ - spec/support/account_shared_examples.rb
246
+ - spec/spec_helper.rb
241
247
  - spec/lib/borutus_spec.rb
242
- - spec/models/account_spec.rb
243
- - spec/models/amount_spec.rb
244
- - spec/models/asset_spec.rb
245
- - spec/models/credit_amount_spec.rb
246
- - spec/models/debit_amount_spec.rb
247
- - spec/models/entry_spec.rb
248
- - spec/models/equity_spec.rb
248
+ - spec/models/tenancy_spec.rb
249
249
  - spec/models/expense_spec.rb
250
250
  - spec/models/liability_spec.rb
251
+ - spec/models/equity_spec.rb
252
+ - spec/models/credit_amount_spec.rb
251
253
  - spec/models/revenue_spec.rb
252
- - spec/models/tenancy_spec.rb
253
- - spec/rcov.opts
254
- - spec/routing/accounts_routing_spec.rb
255
- - spec/routing/entries_routing_spec.rb
256
- - spec/spec_helper.rb
257
- - spec/support/account_shared_examples.rb
258
- - spec/support/active_support_helpers.rb
259
- - spec/support/amount_shared_examples.rb
260
- - spec/support/factory_bot_helpers.rb
261
- - spec/support/shoulda_matchers.rb
254
+ - spec/models/debit_amount_spec.rb
255
+ - spec/models/asset_spec.rb
256
+ - spec/models/entry_spec.rb
257
+ - spec/models/account_spec.rb
258
+ - spec/models/amount_spec.rb
259
+ - spec/factories/account_factory.rb
260
+ - spec/factories/amount_factory.rb
261
+ - spec/factories/entry_factory.rb