acts_as_account 3.2.2 → 3.2.3

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
  SHA256:
3
- metadata.gz: de4d90bc7ede8a221ad6b6c75a2e2f011b3e5d386928a691b474062e176d8e4d
4
- data.tar.gz: a398469051b8d3f8999736de15df861c523960d00bf0173596d26660259d7cda
3
+ metadata.gz: 6c6d94c77b41055a293cb92db325121dd8e40a9de54004ba017fd20bc301b243
4
+ data.tar.gz: '0582774b247afe230b9036f47fcea99d346f56993174fa9d4eac36e4ec817893'
5
5
  SHA512:
6
- metadata.gz: 15501c287164b0968fe841e9bb06c1534366a295287428c039ac9539d8e8a9b1a5a7321654d801a53f6b1d2420bf9a6d56d2dc559cebbcc64387fad6442a7183
7
- data.tar.gz: 89c0ad8c2ba52c551fa6069bff11e2192e00f572a7d477f20b4b02028f4eb64146fc2dd08fc51e52150f6e6e305e2615446506ae0e9bd385e33d30a1d5ec6166
6
+ metadata.gz: a41ef812cff3dfeca6b723ae5367baa3af018687e3316b03b6a39ad76bcd1d1dbf3a92e0f9efdf863c4f41930c41e518dbf0c4909357b780829673da72c330d7
7
+ data.tar.gz: f9ad1dc779fa5fd623491d9267465a486ee6bc03ece7839f0dd9c6a88d5b05574249278a3e2fe8776c01180c441451194d7e3b6b33070d24473a6a10c077ca3d
@@ -0,0 +1,29 @@
1
+ # based on https://github.com/rails/rails/blob/4a78dcb/.github/workflows/rubocop.yml
2
+
3
+ name: rubocop linting
4
+
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7
17
+ - name: Cache gems
18
+ uses: actions/cache@v1
19
+ with:
20
+ path: vendor/bundle
21
+ key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
22
+ restore-keys: |
23
+ ${{ runner.os }}-rubocop-
24
+ - name: Install gems
25
+ run: |
26
+ bundle config path vendor/bundle
27
+ bundle install --jobs 4 --retry 3
28
+ - name: Run rubocop
29
+ run: bundle exec rubocop --lint
@@ -0,0 +1,22 @@
1
+ name: tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+
9
+ strategy:
10
+ matrix:
11
+ ruby: [ '2.7', 'ruby-head' ]
12
+
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - name: Set up Ruby ${{ matrix.ruby }}
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ - name: Install dependencies
20
+ run: bundle install --jobs 4
21
+ - name: Test with Rake
22
+ run: bundle exec rake
data/.rubocop.yml ADDED
@@ -0,0 +1,61 @@
1
+ # usage: `rubocop --lint`
2
+
3
+ AllCops:
4
+ NewCops: enable
5
+
6
+ # disable some linters that are not so likely to indicate bugs
7
+
8
+ Lint/AmbiguousAssignment:
9
+ Enabled: false
10
+ Lint/AmbiguousBlockAssociation:
11
+ Enabled: false
12
+ Lint/AmbiguousOperator:
13
+ Enabled: false
14
+ Lint/AmbiguousRegexpLiteral:
15
+ Enabled: false
16
+ Lint/AssignmentInCondition:
17
+ Enabled: false
18
+ Lint/ConstantDefinitionInBlock:
19
+ Enabled: false
20
+ Lint/ConstantResolution:
21
+ Enabled: false
22
+ Lint/DuplicateBranch:
23
+ Enabled: false
24
+ Lint/EmptyBlock:
25
+ Enabled: false
26
+ Lint/EmptyClass:
27
+ Enabled: false
28
+ Lint/EmptyConditionalBody:
29
+ Enabled: false
30
+ Lint/EmptyExpression:
31
+ Enabled: false
32
+ Lint/EmptyFile:
33
+ Enabled: false
34
+ Lint/EmptyWhen:
35
+ Enabled: false
36
+ Lint/EnsureReturn:
37
+ Enabled: false
38
+ Lint/Loop:
39
+ Enabled: false
40
+ Lint/MissingSuper:
41
+ Enabled: false
42
+ Lint/MixedRegexpCaptureTypes:
43
+ Enabled: false
44
+ Lint/NumberConversion:
45
+ Enabled: false
46
+ Lint/ParenthesesAsGroupedExpression:
47
+ Enabled: false
48
+ Lint/RedundantStringCoercion:
49
+ Enabled: false
50
+ Lint/ShadowedArgument:
51
+ Enabled: false
52
+ Lint/ShadowedException:
53
+ Enabled: false
54
+ Lint/ShadowingOuterLocalVariable:
55
+ Enabled: false
56
+ Lint/SuppressedException:
57
+ Enabled: false
58
+ Lint/UnusedBlockArgument:
59
+ Enabled: false
60
+ Lint/UnusedMethodArgument:
61
+ Enabled: false
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # acts_as_account
2
+
3
+ [![Build Status](https://github.com/betterplace/acts_as_account/workflows/tests/badge.svg)](https://github.com/jaynetics/js_regex/actions)
4
+
5
+ ## Theory
6
+
7
+ *ActsAsAccount* implements a "Double Entry Accounting" system for your
8
+ Rails-models.
9
+
10
+ It hooks into ActiveRecord and allows to add accounts to any model by
11
+ simply means of adding `has_account` to your model. Because the accounts
12
+ are connected via a `has_many` relation no migration to the account-holder
13
+ tables is needed.
14
+
15
+ We also hook into the ActionController request cycle to warn the developer
16
+ if a request has left uncommitted changes in the system.
17
+
18
+ ## How to test
19
+
20
+ Run the cucumber features from the acs_as_account gem, just execute
21
+ * `rake features:create_database`
22
+ * `cucumber`
23
+
24
+ ## How to release
25
+
26
+ You need to update the data in `VERSION` and Rakefile and run `rake` (because it uses Gemhadar).
27
+ `rake gem:push` will push the version to rubygems.
28
+
29
+ ## Links
30
+
31
+ * Double Entry Accounting in a Relational Database: [http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html (archived)](https://web.archive.org/web/20080310200243/http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html)
32
+
33
+ ## Compatibility
34
+
35
+ Rails 4 is supported since version 3.1.0, Rails 7 since 3.2.2 .
36
+
37
+ ## Credits
38
+
39
+ This gem was written for the payment backend of betterplace.org by [Thies C. Arntzen, "thieso2"](https://github.com/thieso2), [Norman Timmler, "unnu"](https://github.com/unnu) and others.
40
+
41
+ ## Copyright
42
+
43
+ Copyright (c) 2010, 2022 [gut.org gAG](https://gut.org), released under the [Apache License v2.0](LICENSE).
data/Rakefile CHANGED
@@ -6,43 +6,38 @@ GemHadar do
6
6
  name 'acts_as_account'
7
7
  author [ "Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel" ]
8
8
  email 'developers@betterplace.org'
9
- homepage "http://github.com/betterplace/acts_as_account"
9
+ homepage "https://github.com/betterplace/acts_as_account"
10
10
  summary 'acts_as_account implements double entry accounting for Rails models'
11
11
  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.'
12
12
  test_dir 'tests'
13
13
  ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', 'coverage', '.rvmrc',
14
14
  '.AppleDouble', 'tags', '.byebug_history', '.DS_Store'
15
- readme 'README.rdoc'
15
+ readme 'README.md'
16
16
  title "#{name.camelize} -- More Math in Ruby"
17
17
  licenses << 'Apache-2.0'
18
18
 
19
- dependency 'activerecord', '>= 4.1', '<7'
20
- dependency 'actionpack' , '>= 4.1', '<7'
19
+ dependency 'activerecord', '>= 5.1', '<8'
20
+ dependency 'actionpack' , '>= 4.1', '<8'
21
21
  development_dependency 'cucumber', '~> 1.3'
22
- development_dependency 'mysql2'
22
+ development_dependency 'sqlite3'
23
23
  development_dependency 'rspec', '~> 3.1'
24
24
  development_dependency 'simplecov'
25
- development_dependency 'complex_config'
26
25
  development_dependency 'database_cleaner', '~> 1.3'
26
+ development_dependency 'rubocop'
27
27
  end
28
28
 
29
29
  def connect_database
30
30
  require 'active_record'
31
- require 'complex_config'
32
- config = ComplexConfig::Provider.config 'features/db/database.yml'
33
- connection_config = config.acts_as_account.to_h
34
- connection_config.delete(:database)
35
- ActiveRecord::Base.establish_connection(connection_config).connection
31
+ require 'yaml'
32
+ db_config = YAML.load_file('features/db/database.yml')
33
+ ActiveRecord::Base.establish_connection(db_config).connection
36
34
  end
37
35
 
38
36
  namespace :features do
39
37
  desc "create test database out of db/schema.rb"
40
38
  task :create_database do
41
- conn = connect_database
42
- conn.execute('DROP DATABASE IF EXISTS acts_as_account')
43
- conn.execute('CREATE DATABASE acts_as_account')
44
- conn.execute('USE acts_as_account')
45
- load(File.dirname(__FILE__) + '/features/db/schema.rb')
39
+ connect_database
40
+ load("#{__dir__}/features/db/schema.rb")
46
41
  end
47
42
  end
48
43
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.2.3
@@ -1,22 +1,22 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: acts_as_account 3.2.2 ruby lib
2
+ # stub: acts_as_account 3.2.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "acts_as_account".freeze
6
- s.version = "3.2.2"
6
+ s.version = "3.2.3"
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 = "2021-02-22"
11
+ s.date = "2022-07-20"
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
- 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]
15
- s.files = [".gitignore".freeze, ".travis.yml".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.rdoc".freeze, "Rakefile".freeze, "VERSION".freeze, "acts_as_account.gemspec".freeze, "cucumber.yml".freeze, "features/account/account_creation.feature".freeze, "features/db/database.yml".freeze, "features/db/schema.rb".freeze, "features/step_definitions/account_steps.rb".freeze, "features/support/abstract_user.rb".freeze, "features/support/cheque.rb".freeze, "features/support/env.rb".freeze, "features/support/inheriting_user.rb".freeze, "features/support/user.rb".freeze, "features/transfer/journal_creation.feature".freeze, "features/transfer/transfer.feature".freeze, "init.rb".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
- s.homepage = "http://github.com/betterplace/acts_as_account".freeze
14
+ s.extra_rdoc_files = ["README.md".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]
15
+ s.files = [".github/workflows/lint.yml".freeze, ".github/workflows/tests.yml".freeze, ".gitignore".freeze, ".rubocop.yml".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "acts_as_account.gemspec".freeze, "acts_as_account.sqlite".freeze, "cucumber.yml".freeze, "features/account/account_creation.feature".freeze, "features/db/database.yml".freeze, "features/db/schema.rb".freeze, "features/step_definitions/account_steps.rb".freeze, "features/support/abstract_user.rb".freeze, "features/support/cheque.rb".freeze, "features/support/env.rb".freeze, "features/support/inheriting_user.rb".freeze, "features/support/user.rb".freeze, "features/transfer/journal_creation.feature".freeze, "features/transfer/transfer.feature".freeze, "init.rb".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
+ s.homepage = "https://github.com/betterplace/acts_as_account".freeze
17
17
  s.licenses = ["Apache-2.0".freeze]
18
- s.rdoc_options = ["--title".freeze, "ActsAsAccount -- More Math in Ruby".freeze, "--main".freeze, "README.rdoc".freeze]
19
- s.rubygems_version = "3.2.8".freeze
18
+ s.rdoc_options = ["--title".freeze, "ActsAsAccount -- More Math in Ruby".freeze, "--main".freeze, "README.md".freeze]
19
+ s.rubygems_version = "3.3.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
@@ -26,22 +26,22 @@ Gem::Specification.new do |s|
26
26
  if s.respond_to? :add_runtime_dependency then
27
27
  s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
28
28
  s.add_development_dependency(%q<cucumber>.freeze, ["~> 1.3"])
29
- s.add_development_dependency(%q<mysql2>.freeze, [">= 0"])
29
+ s.add_development_dependency(%q<sqlite3>.freeze, [">= 0"])
30
30
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.1"])
31
31
  s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
32
- s.add_development_dependency(%q<complex_config>.freeze, [">= 0"])
33
32
  s.add_development_dependency(%q<database_cleaner>.freeze, ["~> 1.3"])
34
- s.add_runtime_dependency(%q<activerecord>.freeze, [">= 4.1", "< 7"])
35
- s.add_runtime_dependency(%q<actionpack>.freeze, [">= 4.1", "< 7"])
33
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
34
+ s.add_runtime_dependency(%q<activerecord>.freeze, [">= 5.1", "< 8"])
35
+ s.add_runtime_dependency(%q<actionpack>.freeze, [">= 4.1", "< 8"])
36
36
  else
37
37
  s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
38
38
  s.add_dependency(%q<cucumber>.freeze, ["~> 1.3"])
39
- s.add_dependency(%q<mysql2>.freeze, [">= 0"])
39
+ s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
40
40
  s.add_dependency(%q<rspec>.freeze, ["~> 3.1"])
41
41
  s.add_dependency(%q<simplecov>.freeze, [">= 0"])
42
- s.add_dependency(%q<complex_config>.freeze, [">= 0"])
43
42
  s.add_dependency(%q<database_cleaner>.freeze, ["~> 1.3"])
44
- s.add_dependency(%q<activerecord>.freeze, [">= 4.1", "< 7"])
45
- s.add_dependency(%q<actionpack>.freeze, [">= 4.1", "< 7"])
43
+ s.add_dependency(%q<rubocop>.freeze, [">= 0"])
44
+ s.add_dependency(%q<activerecord>.freeze, [">= 5.1", "< 8"])
45
+ s.add_dependency(%q<actionpack>.freeze, [">= 4.1", "< 8"])
46
46
  end
47
47
  end
Binary file
@@ -1,6 +1,5 @@
1
- acts_as_account:
2
- adapter: mysql2
3
- encoding: utf8
4
- database: acts_as_account
5
- username: root
6
- host: localhost
1
+ adapter: sqlite3
2
+ encoding: utf8
3
+ database: acts_as_account.sqlite
4
+ username: root
5
+ host: localhost
@@ -41,10 +41,6 @@ ActiveRecord::Schema.define(version: 1) do
41
41
  add_index "acts_as_account_postings", ["reference_type", "reference_id"], name: "reference"
42
42
  add_index "acts_as_account_postings", ["valuta", "id"], name: "sort_key"
43
43
 
44
- execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT account_id FOREIGN KEY (account_id) REFERENCES acts_as_account_accounts (id)"
45
- execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT other_account_id FOREIGN KEY (other_account_id) REFERENCES acts_as_account_accounts (id)"
46
- execute "ALTER TABLE acts_as_account_postings ADD CONSTRAINT journal_id FOREIGN KEY (journal_id) REFERENCES acts_as_account_journals (id)"
47
-
48
44
  create_table "acts_as_account_global_accounts", force: true do |t|
49
45
  t.string "name", null: false
50
46
  end
@@ -94,7 +94,7 @@ When /^I create a Journal via (.+)$/ do |method|
94
94
  eval <<-EOT
95
95
  @journal = Journal.#{method}
96
96
  EOT
97
- rescue Exception => @last_exception
97
+ rescue => @last_exception
98
98
  end
99
99
  end
100
100
 
@@ -152,7 +152,7 @@ end
152
152
 
153
153
  Then /^the order of the postings is correct$/ do
154
154
  # make sure we always book "Soll an Haben"
155
- Posting.all.in_groups_of(2) do |from, to|
155
+ Posting.all.each_slice(2) do |from, to|
156
156
  from.amount.should be < 0
157
157
  to.amount.should be > 0
158
158
  end
@@ -6,20 +6,20 @@ if ENV['START_SIMPLECOV'].to_i == 1
6
6
  end
7
7
 
8
8
  require 'acts_as_account'
9
- require 'complex_config'
10
- config =ComplexConfig::Provider.config File.dirname(__FILE__) + '/../db/database.yml'
11
- ActiveRecord::Base.establish_connection(config.acts_as_account.to_h)
9
+ require 'yaml'
10
+ db_config = YAML.load_file(__dir__ + '/../db/database.yml')
11
+ ActiveRecord::Base.establish_connection(db_config)
12
12
 
13
13
  require 'database_cleaner'
14
14
  require 'database_cleaner/cucumber'
15
15
  DatabaseCleaner.strategy = :transaction
16
16
 
17
- Dir[File.dirname(__FILE__) + '/../step_definitions/*.rb'].each { |file| require file }
17
+ Dir["#{__dir__}/../step_definitions/*.rb"].sort.each { |file| require file }
18
18
 
19
- require File.dirname(__FILE__) + '/user'
20
- require File.dirname(__FILE__) + '/abstract_user'
21
- require File.dirname(__FILE__) + '/inheriting_user'
22
- require File.dirname(__FILE__) + '/cheque'
19
+ require_relative 'user'
20
+ require_relative 'abstract_user'
21
+ require_relative 'inheriting_user'
22
+ require_relative 'cheque'
23
23
 
24
24
  After do
25
25
  ActsAsAccount::Journal.clear_current
@@ -53,7 +53,7 @@ module ActsAsAccount
53
53
  yield
54
54
 
55
55
  # Trying to create a duplicate key on a unique index raises StatementInvalid
56
- rescue ActiveRecord::StatementInvalid => e
56
+ rescue ActiveRecord::StatementInvalid
57
57
  record = if attributes[:holder]
58
58
  attributes[:holder].account(attributes[:name])
59
59
  else
@@ -21,7 +21,7 @@ module ActsAsAccount
21
21
 
22
22
  def transfers
23
23
  [].tap do |transfers|
24
- postings.in_groups_of(2) { |postings| transfers << Transfer.new(*postings) }
24
+ postings.each_slice(2) { |postings| transfers << Transfer.new(*postings) }
25
25
  end
26
26
  end
27
27
 
@@ -12,11 +12,11 @@ module ActsAsAccount
12
12
  scope :soll, -> { where('amount >= 0') }
13
13
  scope :haben, -> { where('amount < 0') }
14
14
  scope :start_date, -> date {
15
- date = Time.parse(date.to_s).utc.to_s(:db)
15
+ date = Time.parse(date.to_s).utc.to_fs(:db)
16
16
  where(['valuta >= ?', date])
17
17
  }
18
18
  scope :end_date, -> date {
19
- date = Time.parse(date.to_s).utc.to_s(:db)
19
+ date = Time.parse(date.to_s).utc.to_fs(:db)
20
20
  where(['valuta <= ?', date])
21
21
  }
22
22
  end
@@ -1,6 +1,6 @@
1
1
  module ActsAsAccount
2
2
  # ActsAsAccount version
3
- VERSION = '3.2.2'
3
+ VERSION = '3.2.3'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
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.2
4
+ version: 3.2.3
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: 2021-02-22 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: mysql2
42
+ name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -81,53 +81,53 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: complex_config
84
+ name: database_cleaner
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: database_cleaner
98
+ name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '1.3'
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '1.3'
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: activerecord
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '4.1'
117
+ version: '5.1'
118
118
  - - "<"
119
119
  - !ruby/object:Gem::Version
120
- version: '7'
120
+ version: '8'
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
- version: '4.1'
127
+ version: '5.1'
128
128
  - - "<"
129
129
  - !ruby/object:Gem::Version
130
- version: '7'
130
+ version: '8'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: actionpack
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +137,7 @@ dependencies:
137
137
  version: '4.1'
138
138
  - - "<"
139
139
  - !ruby/object:Gem::Version
140
- version: '7'
140
+ version: '8'
141
141
  type: :runtime
142
142
  prerelease: false
143
143
  version_requirements: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ dependencies:
147
147
  version: '4.1'
148
148
  - - "<"
149
149
  - !ruby/object:Gem::Version
150
- version: '7'
150
+ version: '8'
151
151
  description: acts_as_account implements double entry accounting for Rails models.
152
152
  Your models get accounts and you can do consistent transactions between them. Since
153
153
  the documentation is sparse, see the transfer.feature for usage examples.
@@ -155,7 +155,7 @@ email: developers@betterplace.org
155
155
  executables: []
156
156
  extensions: []
157
157
  extra_rdoc_files:
158
- - README.rdoc
158
+ - README.md
159
159
  - lib/acts_as_account.rb
160
160
  - lib/acts_as_account/account.rb
161
161
  - lib/acts_as_account/active_record_extensions.rb
@@ -167,15 +167,18 @@ extra_rdoc_files:
167
167
  - lib/acts_as_account/transfer.rb
168
168
  - lib/acts_as_account/version.rb
169
169
  files:
170
+ - ".github/workflows/lint.yml"
171
+ - ".github/workflows/tests.yml"
170
172
  - ".gitignore"
171
- - ".travis.yml"
173
+ - ".rubocop.yml"
172
174
  - CHANGELOG.md
173
175
  - Gemfile
174
176
  - LICENSE
175
- - README.rdoc
177
+ - README.md
176
178
  - Rakefile
177
179
  - VERSION
178
180
  - acts_as_account.gemspec
181
+ - acts_as_account.sqlite
179
182
  - cucumber.yml
180
183
  - features/account/account_creation.feature
181
184
  - features/db/database.yml
@@ -199,7 +202,7 @@ files:
199
202
  - lib/acts_as_account/rails.rb
200
203
  - lib/acts_as_account/transfer.rb
201
204
  - lib/acts_as_account/version.rb
202
- homepage: http://github.com/betterplace/acts_as_account
205
+ homepage: https://github.com/betterplace/acts_as_account
203
206
  licenses:
204
207
  - Apache-2.0
205
208
  metadata: {}
@@ -208,7 +211,7 @@ rdoc_options:
208
211
  - "--title"
209
212
  - ActsAsAccount -- More Math in Ruby
210
213
  - "--main"
211
- - README.rdoc
214
+ - README.md
212
215
  require_paths:
213
216
  - lib
214
217
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -222,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
225
  - !ruby/object:Gem::Version
223
226
  version: '0'
224
227
  requirements: []
225
- rubygems_version: 3.2.8
228
+ rubygems_version: 3.3.3
226
229
  signing_key:
227
230
  specification_version: 4
228
231
  summary: acts_as_account implements double entry accounting for Rails models
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- rvm:
2
- - 2.3.3
3
- - 2.6.3
4
- sudo: false
5
- script: rake
data/README.rdoc DELETED
@@ -1,42 +0,0 @@
1
- = acts_as_account
2
-
3
- {<img src="https://travis-ci.org/betterplace/acts_as_account.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/betterplace/acts_as_account]
4
-
5
- == Theory
6
-
7
- ActsAsAccount implements a "Double Entry Accounting" system for your
8
- Rails-models.
9
-
10
- It hooks into ActiveRecord and allows to add accounts to any model by
11
- simply means of adding "has_account" to your model. Because the accounts
12
- are connected via a has_many relation no migration to the account-holder
13
- tables is needed.
14
-
15
- We also hook into the ActionController request cycle to warn the developer
16
- if a request has left the uncommitted changes in the system.
17
-
18
- == Support
19
-
20
- Rails 4 is supported since version 3.1.0
21
-
22
- == How to test
23
-
24
- Run the cucumber features from the acs_as_account gem, just execute
25
- * rake features:create_database
26
- * cucumber
27
-
28
- == Links
29
-
30
- * Double Entry Accounting in a Relational Database: http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html
31
-
32
- == Compatibility
33
-
34
- With the release of version 2.0.0 acts_as_account is supposed to work for Rails 3. If you still use Rails 2 please use version 1.2.0.
35
-
36
- == Credits
37
-
38
- This gem was written for the payment backend of betterplace.org by Thies C. Arntzen (http://github.com/thieso2) and Norman Timmler (github.com/unnu).
39
-
40
- == Copyright
41
-
42
- Copyright (c) 2010 gut.org gAG