keepr 0.5.0 → 0.6.0

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: b05feec2870ab3c67b501c7f485f7c2a0a05e44357c416f2f83b5749b4c5a860
4
- data.tar.gz: c706bf22151ff63fff5be0921ae4f49c1f72ef79907bc719dea5b7485298469e
3
+ metadata.gz: a7dfe416636ebe5a292bb6a49c43e8d1ffcec6be4711d14b3baaa7099f6efe48
4
+ data.tar.gz: 78691b1440c14e91497710e486b7fb3504f16ac6449900d930af39dbf427b872
5
5
  SHA512:
6
- metadata.gz: 15ac6a10623a8441a17ac7c7eea8ec97094c7d5e7a8498028f21d993b05c5d27ae245bbf9e804a8dfdcf67f5770dec664d34810d48d19d10850461fcb3b29026
7
- data.tar.gz: '08cfa52e53f1aa28a588be6e2646f38f99b65b2ac21eadcff0069d8622d1b8323ac7937dc368e4498ae5b5872208a9b617a3307f3dd29567ff08f02512ade605'
6
+ metadata.gz: c5995815889beabb1bd25798c906fad998641775276d047089a1028485a72effe2fb9e5dca8a96de249d8dcd3a035073d10a0518259199b71b350c34c9d30d52
7
+ data.tar.gz: 2c6d8b7498e8d6abc21547a5f979da6d96c87328966de102aebcb8afdf139954cf1721ee45d46c3e9b582da4b541fba55b710fd8239ce2ee0fe57c7915a94dda
@@ -1,8 +1,10 @@
1
+ os: linux
2
+ dist: xenial
1
3
  language: ruby
2
4
  rvm:
3
- - 2.4.6
4
- - 2.5.5
5
- - 2.6.3
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.7.1
6
8
  gemfile:
7
9
  - ci/Gemfile-rails-4-2
8
10
  - ci/Gemfile-rails-5-0
@@ -11,12 +13,9 @@ gemfile:
11
13
  - ci/Gemfile-rails-6-0
12
14
  matrix:
13
15
  exclude:
14
- - rvm: 2.4.6
15
- gemfile: ci/Gemfile-rails-6-0
16
- script:
16
+ - rvm: 2.7.1
17
+ gemfile: ci/Gemfile-rails-4-2
18
+ script:
17
19
  - bundle exec rake
18
- - bundle exec rubocop
19
20
  before_install:
20
- - gem update --system
21
21
  - gem update bundler
22
- sudo: false
data/README.md CHANGED
@@ -19,7 +19,7 @@ This Ruby gem provides a double entry accounting system for use in any Rails app
19
19
 
20
20
  ## Dependencies
21
21
 
22
- * Ruby 2.4+
22
+ * Ruby 2.5+
23
23
  * Rails 4.2+ (including Rails 6.0)
24
24
 
25
25
 
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 4.2.11'
4
- gem 'ancestry'
4
+ gem 'ancestry', '>= 3.1.0'
5
5
  gem 'sqlite3', '~> 1.3.6'
6
6
  gem 'rake'
7
7
  gem 'rspec'
@@ -10,4 +10,3 @@ gem 'coveralls'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_bot'
12
12
  gem 'datev'
13
- gem 'rubocop'
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 5.0.7'
4
- gem 'ancestry'
4
+ gem 'ancestry', '>= 3.1.0'
5
5
  gem 'sqlite3', '~> 1.3.6'
6
6
  gem 'rake'
7
7
  gem 'rspec'
@@ -10,4 +10,3 @@ gem 'coveralls'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_bot'
12
12
  gem 'datev'
13
- gem 'rubocop'
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 5.1.7'
4
- gem 'ancestry'
4
+ gem 'ancestry', '>= 3.1.0'
5
5
  gem "sqlite3", "~> 1.3", ">= 1.3.6"
6
6
  gem 'rake'
7
7
  gem 'rspec'
@@ -10,4 +10,3 @@ gem 'coveralls'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_bot'
12
12
  gem 'datev'
13
- gem 'rubocop'
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 5.2.3'
4
- gem 'ancestry'
4
+ gem 'ancestry', '>= 3.1.0'
5
5
  gem "sqlite3", "~> 1.3", ">= 1.3.6"
6
6
  gem 'rake'
7
7
  gem 'rspec'
@@ -10,4 +10,3 @@ gem 'coveralls'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_bot'
12
12
  gem 'datev'
13
- gem 'rubocop'
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 6.0.0'
4
- gem 'ancestry'
4
+ gem 'ancestry', '>= 3.1.0'
5
5
  gem 'sqlite3', "~> 1.4"
6
6
  gem 'rake'
7
7
  gem 'rspec'
@@ -10,4 +10,3 @@ gem 'coveralls'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_bot'
12
12
  gem 'datev'
13
- gem 'rubocop'
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = 'Some basic ActiveRecord models to build a double entry bookkeeping application'
14
14
  spec.homepage = 'https://github.com/ledermann/keepr'
15
15
  spec.license = 'MIT'
16
- spec.required_ruby_version = '>= 2.4'
16
+ spec.required_ruby_version = '>= 2.5'
17
17
 
18
18
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
19
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_dependency 'activerecord', '>= 4.2'
24
- spec.add_dependency 'ancestry'
24
+ spec.add_dependency 'ancestry', '>= 3.1.0'
25
25
  spec.add_dependency 'datev', '>= 0.5.0'
26
26
 
27
27
  spec.add_development_dependency 'bundler'
@@ -30,7 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'factory_bot'
31
31
  spec.add_development_dependency 'rake'
32
32
  spec.add_development_dependency 'rspec'
33
- spec.add_development_dependency 'rubocop'
34
33
  spec.add_development_dependency 'simplecov'
35
34
  spec.add_development_dependency 'sqlite3'
36
35
  end
@@ -75,7 +75,7 @@ class Keepr::Account < ActiveRecord::Base
75
75
  def keepr_postings
76
76
  Keepr::Posting
77
77
  .joins(:keepr_account)
78
- .where(subtree_conditions)
78
+ .merge(subtree)
79
79
  end
80
80
 
81
81
  def balance(date = nil)
@@ -37,7 +37,9 @@ class Keepr::Group < ActiveRecord::Base
37
37
  private
38
38
 
39
39
  def set_target_from_parent
40
- self.target = parent.target if parent
40
+ self.class.unscoped do
41
+ self.target = parent.target if parent
42
+ end
41
43
  end
42
44
 
43
45
  def check_result_and_target
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Keepr
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keepr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2020-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 3.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 3.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: datev
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: simplecov
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -185,7 +171,6 @@ extensions: []
185
171
  extra_rdoc_files: []
186
172
  files:
187
173
  - ".gitignore"
188
- - ".rubocop.yml"
189
174
  - ".travis.yml"
190
175
  - Gemfile
191
176
  - LICENSE.txt
@@ -240,7 +225,7 @@ homepage: https://github.com/ledermann/keepr
240
225
  licenses:
241
226
  - MIT
242
227
  metadata: {}
243
- post_install_message:
228
+ post_install_message:
244
229
  rdoc_options: []
245
230
  require_paths:
246
231
  - lib
@@ -248,15 +233,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
233
  requirements:
249
234
  - - ">="
250
235
  - !ruby/object:Gem::Version
251
- version: '2.4'
236
+ version: '2.5'
252
237
  required_rubygems_version: !ruby/object:Gem::Requirement
253
238
  requirements:
254
239
  - - ">="
255
240
  - !ruby/object:Gem::Version
256
241
  version: '0'
257
242
  requirements: []
258
- rubygems_version: 3.0.6
259
- signing_key:
243
+ rubygems_version: 3.1.4
244
+ signing_key:
260
245
  specification_version: 4
261
246
  summary: Some basic ActiveRecord models to build a double entry bookkeeping application
262
247
  test_files:
@@ -1,44 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.4
3
-
4
-
5
- Metrics/LineLength:
6
- Max: 150
7
-
8
- Metrics/BlockLength:
9
- Max: 150
10
-
11
- Metrics/MethodLength:
12
- Max: 50
13
-
14
- Metrics/ClassLength:
15
- Max: 120
16
-
17
-
18
- Style/Documentation:
19
- Enabled: false
20
-
21
- Style/ClassAndModuleChildren:
22
- Enabled: false
23
-
24
-
25
- Layout/AlignHash:
26
- Enabled: false
27
-
28
-
29
- Naming/PredicateName:
30
- Enabled: false
31
-
32
-
33
- Lint/EmptyWhen:
34
- Enabled: false
35
-
36
-
37
- Metrics/AbcSize:
38
- Max: 40
39
-
40
- Metrics/CyclomaticComplexity:
41
- Max: 10
42
-
43
- Metrics/PerceivedComplexity:
44
- Max: 10