debitcredit 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be9238d1bb6d86514b17b8a40affb2f5bd66f4a1
4
- data.tar.gz: 9279fc5c208136740b3b043ad1aa72606b4f539a
3
+ metadata.gz: 039a6cb02706fa5832f4a614f4dee115e77edb98
4
+ data.tar.gz: 4688c492151e6ba2d8cc33213eec83d6285b6b4f
5
5
  SHA512:
6
- metadata.gz: f7d490ab14bae8fa8c936f2cfda2b741745be0b63b75e2d0038bf7c403340d9c16d53ee5e5f41534a9425b0f9c9c65b6c44620c49c80c86a4af44d345038cf88
7
- data.tar.gz: 32bf86b2f2733e799acbfab832bb9b1823d95f6cbf033d1788e0789f21f90d8f7afdba55ad4bd8de9e05fb853814f59303925cf087aab5638fe8d9aab691128b
6
+ metadata.gz: ceecb7673d2ef6979b876bc568009ed1eaae62746d13927b149f35fa53deedae7c970835f47eb770d38ac94821eee068cc04b1277e480efb7ac635290ab78d01
7
+ data.tar.gz: 81bcdce582dc373dd8dde2dd85c41a9bd25c433c9a2f2f9f800b3545408c142d567f95295c4ac3ab336b753b6fe8823bd2ea586c9bbcd3e04bfd0a69a461ab29
data/Rakefile CHANGED
@@ -25,4 +25,4 @@ require 'rspec/core/rake_task'
25
25
 
26
26
  RSpec::Core::RakeTask.new(:spec)
27
27
 
28
- task default: :spec
28
+ task default: ['app:db:test:prepare', :spec]
@@ -2,6 +2,7 @@ require 'docile'
2
2
  module Debitcredit
3
3
  class Transaction < ActiveRecord::Base
4
4
  belongs_to :reference, polymorphic: true
5
+ belongs_to :parent_transaction, class_name: 'Debitcredit::Transaction'
5
6
  has_many :items, dependent: :destroy, autosave: true
6
7
 
7
8
  validates :reference, :description, presence: true
@@ -0,0 +1,6 @@
1
+ class AddTransactionParent < ActiveRecord::Migration
2
+ def change
3
+ add_column :debitcredit_transactions, :parent_transaction_id, :integer
4
+ add_index :debitcredit_transactions, [:parent_transaction_id]
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ class LongerAccountName < ActiveRecord::Migration
2
+ def up
3
+ change_column :debitcredit_accounts, :name, :string, limit: 32, null: false
4
+ end
5
+
6
+ def down
7
+ change_column :debitcredit_accounts, :name, :string, limit: 16, null: false
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Debitcredit
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debitcredit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Kushner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-23 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -200,6 +200,8 @@ files:
200
200
  - db/migrate/20140121145455_create_debitcredit_accounts.rb
201
201
  - db/migrate/20140121181304_create_debitcredit_transactions.rb
202
202
  - db/migrate/20140121181326_create_debitcredit_items.rb
203
+ - db/migrate/20140128131859_add_transaction_parent.rb
204
+ - db/migrate/20140128134203_longer_account_name.rb
203
205
  - lib/debitcredit/engine.rb
204
206
  - lib/debitcredit/version.rb
205
207
  - lib/debitcredit.rb