All Versions
Latest Version
Avg Release Cycle
106 days
Latest Release
328 days ago

Changelog History
Page 1

  • v2.0.0.beta5 Changes

    February 24, 2021

    ๐Ÿ”„ Changed

    • ๐Ÿ’Ž Use the Ruby 1.9 hash syntax (#182).
    • ๐Ÿ‘‰ Make the Line detail association optional (#184).
    • ๐Ÿ‘Œ Support Ruby 3 (#196).
  • v2.0.0.beta4 Changes

    January 25, 2020

    โž• Added

    • โœ… Test against Rails 6.0, (#176).

    • ๐Ÿ‘Œ Support for Ruby 2.7 (#180).

    ๐Ÿ”„ Changed

    • ๐Ÿ“‡ Metadata stored by default in a json(b) column for new installs (#178).

    • โœ‚ Remove force: true from migration (#181).

    • ๐Ÿ’Ž Prevent using Ruby 2.2 via restrictions in Gemfile and Gemspec (#175).

  • v2.0.0.beta3 Changes

    November 14, 2019

    ๐Ÿ›  Fixed

    • Remove duplicate detail columns in double_entry_lines table migration, (#173).
  • v2.0.0.beta2 Changes

    January 27, 2019

    โœ‚ Removed

    If this module is in use in your project add the double_entry-reporting gem and checkout the changelog for more updates.

    If not in use, one can delete the double_entry_line_aggregates table using the following migration:

    drop_table :double_entry_line_aggregates
  • v2.0.0.beta1 Changes

    December 31, 2018

    โž• Added

    • โž• Added contributor credits to README.

    • โž• Added support for Ruby 2.3, 2.4, 2.5 and 2.6.

    • โž• Added support for Rails 5.0, 5.1 and 5.2

    • ๐Ÿ‘Œ Support passing an array of metadata values.

        :from     => one_account,
        :to       => another_account,
        :code     => :a_business_code_for_this_type_of_transfer,
        :metadata => { :key1 => ['value 1', 'value 2'], :key2 => 'value 3' },
    • ๐Ÿ‘ Allow partner account to be specified for aggregates.

    • ๐Ÿ‘ Allow filtering aggregates by multiple metadata key/value pairs.

    • Add index on the double_entry_line_checks table. This covers the query to obtain the last line check.

    Add this index to your database via a migration like:

    def up
      add_index "double_entry_line_checks", ["created_at", "last_line_id"], :name => "line_checks_created_at_last_line_id_idx"
    • ๐ŸŒฒ Log account balance cache errors to the database when performing the line check: DoubleEntry::Validation::LineCheck::perform!

    ๐Ÿ”„ Changed

    • โœ… Replaced Machinist with Factory Bot in test suite.

    • Implement DoubleEntry::Transfer::Set and DoubleEntry::Account::Set with Hashes rather than Arrays for performance.

    • Reporting API now uses keyword arguments. Note these reporting classes are marked API private: their interface is not considered stable.

      • DoubleEntry::Reporting::aggregate
      • DoubleEntry::Reporting::aggregate_array
      • DoubleEntry::Reporting::Aggregate::new
      • DoubleEntry::Reporting::Aggregate::formatted_amount
      • DoubleEntry::Reporting::AggregateArray::new
      • DoubleEntry::Reporting::LineAggregateFilter::new
    • 0๏ธโƒฃ Loosened database string column contstraints to the default (255 characters). Engineering teams can choose to apply this change, or apply their own column length constraints specific to their needs. (#152)

    • โœ‚ Removed default values for the length checks on code, account and scope (#152). These checks will now only be performed when configured with a value:

       DoubleEntry.configure do |config|
         config.code_max_length = 47
         config.account_identifier_max_length = 31
         config.scope_identifier_max_length = 23
    • ๐Ÿ‘‰ Use bigint for monetary values in the database to avoid integer overflow (#154). Apply changes via this migration:
       change_column :double_entry_account_balances, :balance, :bigint, null: false
       change_column :double_entry_line_aggregates, :amount, :bigint, null: false
       change_column :double_entry_lines, :amount, :bigint, null: false
       change_column :double_entry_lines, :balance, :bigint, null: false
    • ๐Ÿš… On Rails version 5.1 and above, use bigint for foreign key values in the database to avoid integer overflow (#154). Apply changes via this migration:
       change_column :double_entry_line_checks, :last_line_id, :bigint, null: false
       change_column :double_entry_line_metadata, :line_id, :bigint, null: false
       change_column :double_entry_lines, :partner_id, :bigint, null: true
       change_column :double_entry_lines, :detail_id, :bigint, null: true
    • 0๏ธโƒฃ Line check validation no-longer performs corrections by default. The DoubleEntry::Validation::LineCheck::perform! method will only log validation failures in the database. To perform auto-correction pass the fixer option: LineCheck.perform!(fixer:

    โœ‚ Removed

    • โœ‚ Removed support for Ruby 1.9, 2.0, 2.1 and 2.2.

    • โœ‚ Removed support for Rails 3.2, 4.0, and 4.1.

    • โœ‚ Removed unneeded development dependencies from Gemspec.

    • โœ‚ Removed spec and script files from gem package.

    • Removed the active_record_scope_identifier method for configuring scoped accounts.

      user_scope = accounts.active_record_scope_identifier(User)

    As a replacement, please define your own with a lambda:

    user_scope = ->(user) do
      raise 'not a User' unless == 'User'

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed more Ruby warnings.

    • ๐Ÿ‘‰ Use double_entry namespace when publishing to ActiveSupport::Notifications.

    • ๐Ÿ›  Fixed problem of Rails version number not being set in migration template for apps using Rails 5 or higher.

  • v1.0.1 Changes

    January 06, 2018

    โœ‚ Removed

    • โœ‚ Removed Rubocop checks and build step.

    ๐Ÿ›  Fixed

    • ๐Ÿ‘‰ Use Money#positive? and Money#negative? rather than comparing to zero. Resolves issues when dealing with multiple currencies.

    • ๐Ÿ›  Fixed typo in jack_hammer documentation.

  • v1.0.0 Changes

    August 04, 2015

    โž• Added

    • Record meta-data against transfers.

        :from     => one_account,
        :to       => another_account,
        :code     => :a_business_code_for_this_type_of_transfer,
        :metadata => { :key1 => 'value 1', :key2 => 'value 2' },

    This feature requires a new DB table. Please add a migration similar to:

    class CreateDoubleEntryLineMetadata < ActiveRecord::Migration
      def self.up
        create_table "#{DoubleEntry.table_name_prefix}line_metadata", :force => true do |t|
          t.integer    "line_id",               :null => false
          t.string     "key",     :limit => 48, :null => false
          t.string     "value",   :limit => 64, :null => false
          t.timestamps                          :null => false
        add_index "#{DoubleEntry.table_name_prefix}line_metadata",
                  ["line_id", "key", "value"],
                  :name => "lines_meta_line_id_key_value_idx"
      def self.down
        drop_table "#{DoubleEntry.table_name_prefix}line_metadata"

    ๐Ÿ”„ Changed

    • ๐Ÿ”’ Raise DoubleEntry::Locking::LockWaitTimeout for lock wait timeouts.

    ๐Ÿ›  Fixed

    • Ensure that a range is specified when performing an aggregate function over lines.
  • v0.10.3 Changes

    July 15, 2015

    โž• Added

    • ๐Ÿ— Check code format with Rubocop as part of the CI build.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  More Rubocop code formatting issues fixed.
  • v0.10.2 Changes

    July 10, 2015

    ๐Ÿ›  Fixed

    • DoubleEntry::Reporting::AggregateArray correctly retreives previously calculated aggregates.
  • v0.10.1 Changes

    July 06, 2015

    โž• Added

    • ๐Ÿ— Run CI build against Ruby 2.2.0.

    • โž• Added Rubocop and resolved code formatting issues.

    ๐Ÿ”„ Changed

    • โฌ‡๏ธ Reduced permutations of DB, Ruby and Rails in CI build.

    • ๐Ÿ— Build status badge displayed in README reports on just the master branch.

    • โšก๏ธ Update RSpec configuration with latest recommended options.

    ๐Ÿ›  Fixed

    • โž• Addressed Ruby warnings.

    • ๐Ÿ›  Fixed circular arg reference.