acts_as_account 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +1 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/acts_as_account.gemspec +10 -10
- data/features/db/schema.rb +38 -39
- data/features/step_definitions/account_steps.rb +5 -0
- data/lib/acts_as_account/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9e96b58b42a260fa2d0368b3febf8bb208806829aaf16004156abd77ba9cf1de
|
4
|
+
data.tar.gz: 986fe1b63d45220e937f0a9a54e170a0a2058a85ae58309bd7c1ecfddcdc1cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e62a97bfdd31d1272d6c82e4dabe8400e70acc166c3d00cc4578c9cc37102a581cf59abfdbc8196c2621caaf4b8fc76341fbf37610bf78363e46437c6222a6c6
|
7
|
+
data.tar.gz: 8b3856f6280db7df2d9dc4007ac080c4391cf106d3b3ada2cf137bd82ed5caa05753674e3159d57690bbc41cb80bec56f73fa4d548c076e7f72ab4f643fdee7f
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -16,8 +16,8 @@ GemHadar do
|
|
16
16
|
title "#{name.camelize} -- More Math in Ruby"
|
17
17
|
licenses << 'Apache-2.0'
|
18
18
|
|
19
|
-
dependency 'activerecord', '>= 4.1', '<
|
20
|
-
dependency 'actionpack' , '>= 4.1', '<
|
19
|
+
dependency 'activerecord', '>= 4.1', '<7'
|
20
|
+
dependency 'actionpack' , '>= 4.1', '<7'
|
21
21
|
dependency 'database_cleaner', '~> 1.3'
|
22
22
|
development_dependency 'cucumber', '~> 1.3'
|
23
23
|
development_dependency 'mysql2'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.1
|
data/acts_as_account.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: acts_as_account 3.2.
|
2
|
+
# stub: acts_as_account 3.2.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "acts_as_account".freeze
|
6
|
-
s.version = "3.2.
|
6
|
+
s.version = "3.2.1"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel".freeze]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2019-08-23"
|
12
12
|
s.description = "acts_as_account implements double entry accounting for Rails models. Your models get accounts and you can do consistent transactions between them. Since the documentation is sparse, see the transfer.feature for usage examples.".freeze
|
13
13
|
s.email = "developers@betterplace.org".freeze
|
14
14
|
s.extra_rdoc_files = ["README.rdoc".freeze, "lib/acts_as_account.rb".freeze, "lib/acts_as_account/account.rb".freeze, "lib/acts_as_account/active_record_extensions.rb".freeze, "lib/acts_as_account/global_account.rb".freeze, "lib/acts_as_account/journal.rb".freeze, "lib/acts_as_account/manually_created_account.rb".freeze, "lib/acts_as_account/posting.rb".freeze, "lib/acts_as_account/rails.rb".freeze, "lib/acts_as_account/transfer.rb".freeze, "lib/acts_as_account/version.rb".freeze]
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.homepage = "http://github.com/betterplace/acts_as_account".freeze
|
17
17
|
s.licenses = ["Apache-2.0".freeze]
|
18
18
|
s.rdoc_options = ["--title".freeze, "ActsAsAccount -- More Math in Ruby".freeze, "--main".freeze, "README.rdoc".freeze]
|
19
|
-
s.rubygems_version = "
|
19
|
+
s.rubygems_version = "3.0.3".freeze
|
20
20
|
s.summary = "acts_as_account implements double entry accounting for Rails models".freeze
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
@@ -29,8 +29,8 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
30
30
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
31
31
|
s.add_development_dependency(%q<complex_config>.freeze, [">= 0"])
|
32
|
-
s.add_runtime_dependency(%q<activerecord>.freeze, ["
|
33
|
-
s.add_runtime_dependency(%q<actionpack>.freeze, ["
|
32
|
+
s.add_runtime_dependency(%q<activerecord>.freeze, [">= 4.1", "< 7"])
|
33
|
+
s.add_runtime_dependency(%q<actionpack>.freeze, [">= 4.1", "< 7"])
|
34
34
|
s.add_runtime_dependency(%q<database_cleaner>.freeze, ["~> 1.3"])
|
35
35
|
else
|
36
36
|
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
@@ -39,8 +39,8 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
40
40
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
41
41
|
s.add_dependency(%q<complex_config>.freeze, [">= 0"])
|
42
|
-
s.add_dependency(%q<activerecord>.freeze, ["
|
43
|
-
s.add_dependency(%q<actionpack>.freeze, ["
|
42
|
+
s.add_dependency(%q<activerecord>.freeze, [">= 4.1", "< 7"])
|
43
|
+
s.add_dependency(%q<actionpack>.freeze, [">= 4.1", "< 7"])
|
44
44
|
s.add_dependency(%q<database_cleaner>.freeze, ["~> 1.3"])
|
45
45
|
end
|
46
46
|
else
|
@@ -50,8 +50,8 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
51
51
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
52
52
|
s.add_dependency(%q<complex_config>.freeze, [">= 0"])
|
53
|
-
s.add_dependency(%q<activerecord>.freeze, ["
|
54
|
-
s.add_dependency(%q<actionpack>.freeze, ["
|
53
|
+
s.add_dependency(%q<activerecord>.freeze, [">= 4.1", "< 7"])
|
54
|
+
s.add_dependency(%q<actionpack>.freeze, [">= 4.1", "< 7"])
|
55
55
|
s.add_dependency(%q<database_cleaner>.freeze, ["~> 1.3"])
|
56
56
|
end
|
57
57
|
end
|
data/features/db/schema.rb
CHANGED
@@ -1,69 +1,68 @@
|
|
1
|
-
ActiveRecord::Schema.define(:
|
1
|
+
ActiveRecord::Schema.define(version: 1) do
|
2
2
|
if ENV['DROP_FK']
|
3
3
|
execute "ALTER TABLE acts_as_account_postings DROP FOREIGN KEY account_id"
|
4
4
|
execute "ALTER TABLE acts_as_account_postings DROP FOREIGN KEY other_account_id"
|
5
5
|
execute "ALTER TABLE acts_as_account_postings DROP FOREIGN KEY journal_id"
|
6
6
|
end
|
7
|
-
|
8
|
-
create_table "acts_as_account_accounts", :
|
9
|
-
t.
|
10
|
-
t.string
|
11
|
-
t.string
|
12
|
-
|
13
|
-
t.integer
|
14
|
-
t.integer
|
15
|
-
t.datetime
|
16
|
-
|
17
|
-
t.datetime
|
18
|
-
t.datetime
|
7
|
+
|
8
|
+
create_table "acts_as_account_accounts", force: true do |t|
|
9
|
+
t.belongs_to "holder", null: false
|
10
|
+
t.string "holder_type", null: false
|
11
|
+
t.string "name", null: false
|
12
|
+
|
13
|
+
t.integer "balance", default: 0
|
14
|
+
t.integer "postings_count", default: 0
|
15
|
+
t.datetime "last_valuta"
|
16
|
+
|
17
|
+
t.datetime "created_at"
|
18
|
+
t.datetime "updated_at"
|
19
19
|
end
|
20
|
-
add_index "acts_as_account_accounts", ["holder_id", "holder_type", "name"], :
|
20
|
+
add_index "acts_as_account_accounts", ["holder_id", "holder_type", "name"], name: 'account_unique', unique: true
|
21
21
|
|
22
|
-
create_table "acts_as_account_journals", :
|
22
|
+
create_table "acts_as_account_journals", force: true do |t|
|
23
23
|
t.datetime "created_at"
|
24
24
|
t.datetime "updated_at"
|
25
25
|
end
|
26
26
|
|
27
|
-
create_table "acts_as_account_postings", :
|
28
|
-
t.
|
29
|
-
t.
|
30
|
-
t.
|
31
|
-
t.integer
|
32
|
-
|
33
|
-
t.integer "reference_id"
|
34
|
-
t.string "reference_type"
|
27
|
+
create_table "acts_as_account_postings", force: true do |t|
|
28
|
+
t.belongs_to "account", null: false, index: true
|
29
|
+
t.belongs_to "other_account", null: false
|
30
|
+
t.belongs_to "journal", null: false, index: true
|
31
|
+
t.integer "amount", null: false
|
35
32
|
|
36
|
-
t.
|
33
|
+
t.belongs_to "reference"
|
34
|
+
t.string "reference_type"
|
37
35
|
|
38
|
-
t.datetime
|
39
|
-
|
36
|
+
t.datetime "valuta"
|
37
|
+
|
38
|
+
t.datetime "created_at"
|
39
|
+
t.datetime "updated_at"
|
40
40
|
end
|
41
|
-
add_index "acts_as_account_postings", "
|
42
|
-
add_index "acts_as_account_postings", "
|
43
|
-
|
44
|
-
add_index "acts_as_account_postings", ["valuta", "id"], :name => "sort_key"
|
45
|
-
|
41
|
+
add_index "acts_as_account_postings", ["reference_type", "reference_id"], name: "reference"
|
42
|
+
add_index "acts_as_account_postings", ["valuta", "id"], name: "sort_key"
|
43
|
+
|
46
44
|
execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT account_id FOREIGN KEY (account_id) REFERENCES acts_as_account_accounts (id)"
|
47
45
|
execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT other_account_id FOREIGN KEY (other_account_id) REFERENCES acts_as_account_accounts (id)"
|
48
46
|
execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT journal_id FOREIGN KEY (journal_id) REFERENCES acts_as_account_journals (id)"
|
49
47
|
|
50
|
-
create_table "acts_as_account_global_accounts", :
|
51
|
-
t.string "name", :
|
48
|
+
create_table "acts_as_account_global_accounts", force: true do |t|
|
49
|
+
t.string "name", null: false
|
52
50
|
end
|
53
51
|
|
54
|
-
create_table "users", :
|
55
|
-
t.string "name", :
|
52
|
+
create_table "users", force: true do |t|
|
53
|
+
t.string "name", null: false
|
56
54
|
t.datetime "created_at"
|
57
55
|
t.datetime "updated_at"
|
58
56
|
end
|
59
57
|
|
60
|
-
create_table "abstract_users", :
|
61
|
-
t.string "name", :
|
62
|
-
t.string "type", :
|
58
|
+
create_table "abstract_users", force: true do |t|
|
59
|
+
t.string "name", null: false
|
60
|
+
t.string "type", null: false
|
63
61
|
t.datetime "created_at"
|
64
62
|
t.datetime "updated_at"
|
65
63
|
end
|
66
|
-
|
64
|
+
|
65
|
+
create_table "cheques", force: true do |t|
|
67
66
|
t.string "number"
|
68
67
|
t.datetime "created_at"
|
69
68
|
t.datetime "updated_at"
|
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
include ActsAsAccount
|
4
4
|
|
5
|
+
require 'rspec'
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.expect_with(:rspec) { |c| c.syntax = :should }
|
8
|
+
end
|
9
|
+
|
5
10
|
def german_date_time_to_local(datestring, timestring)
|
6
11
|
Time.local(*(datestring.split(".").reverse + timestring.split(":")).map(&:to_i))
|
7
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_account
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -103,7 +103,7 @@ dependencies:
|
|
103
103
|
version: '4.1'
|
104
104
|
- - "<"
|
105
105
|
- !ruby/object:Gem::Version
|
106
|
-
version: '
|
106
|
+
version: '7'
|
107
107
|
type: :runtime
|
108
108
|
prerelease: false
|
109
109
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,7 @@ dependencies:
|
|
113
113
|
version: '4.1'
|
114
114
|
- - "<"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '7'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: actionpack
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
version: '4.1'
|
124
124
|
- - "<"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
126
|
+
version: '7'
|
127
127
|
type: :runtime
|
128
128
|
prerelease: false
|
129
129
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -133,7 +133,7 @@ dependencies:
|
|
133
133
|
version: '4.1'
|
134
134
|
- - "<"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: '
|
136
|
+
version: '7'
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: database_cleaner
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,8 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
- !ruby/object:Gem::Version
|
223
223
|
version: '0'
|
224
224
|
requirements: []
|
225
|
-
|
226
|
-
rubygems_version: 2.6.8
|
225
|
+
rubygems_version: 3.0.3
|
227
226
|
signing_key:
|
228
227
|
specification_version: 4
|
229
228
|
summary: acts_as_account implements double entry accounting for Rails models
|