perfect_audit 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +2 -3
- data/lib/perfect_audit/api/repositories.rb +3 -3
- data/lib/perfect_audit/version.rb +1 -1
- data/lib/perfect_audit.rb +10 -16
- metadata +2 -3
- data/.rubocop_todo.yml +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fdb4bba9cd516c21f66eb05cb8dc231ce1426ac6ce5aa3885b66db22a57d189
|
4
|
+
data.tar.gz: 385d53469a6ce0bfb8e0d16356b765e5f87a8bb0841127bce9a5c6340dd0ce01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece8d169ba87b7fb3d3513589409cc0c639867d0cce456cc9f266ae54c1b77fbd1a151c48dc59a99bba7cba16b74a73b5d347ffdd9ab53a765774a515ac0b446
|
7
|
+
data.tar.gz: c745ff5299de3fa4daf41ff636122dc2a09502cd0913ff328389e1d84220033783ca6e4994affb6043c84526181c70edb8ea5e5ec07047d9bf7be6246a030fdb
|
data/.rubocop.yml
CHANGED
@@ -27,7 +27,7 @@ module PerfectAudit
|
|
27
27
|
is_public: public.to_s
|
28
28
|
})
|
29
29
|
|
30
|
-
PerfectAudit::Book.new(response_parser.parse(response.body.to_s))
|
30
|
+
PerfectAudit::Book.new(**response_parser.parse(response.body.to_s))
|
31
31
|
end
|
32
32
|
|
33
33
|
# Get all books from Perfect Audit for account
|
@@ -38,7 +38,7 @@ module PerfectAudit
|
|
38
38
|
response = connection.get(ALL_PATH)
|
39
39
|
|
40
40
|
response_parser.parse(response.body.to_s).map { |item|
|
41
|
-
PerfectAudit::Book.new(item)
|
41
|
+
PerfectAudit::Book.new(**item)
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
@@ -53,7 +53,7 @@ module PerfectAudit
|
|
53
53
|
pk: id.to_s
|
54
54
|
})
|
55
55
|
|
56
|
-
PerfectAudit::Book.new(response_parser.parse(response.body.to_s))
|
56
|
+
PerfectAudit::Book.new(**response_parser.parse(response.body.to_s))
|
57
57
|
end
|
58
58
|
|
59
59
|
# Delete book in Perfect Audit
|
data/lib/perfect_audit.rb
CHANGED
@@ -27,10 +27,18 @@ module PerfectAudit
|
|
27
27
|
# PerfectAudit::TransactionsRepository.new
|
28
28
|
# end
|
29
29
|
|
30
|
+
def container
|
31
|
+
@container ||= Dry::Container.new
|
32
|
+
end
|
33
|
+
|
34
|
+
def configuration
|
35
|
+
@configuration ||= OpenStruct.new
|
36
|
+
end
|
37
|
+
|
30
38
|
private
|
31
39
|
|
32
40
|
def register!
|
33
|
-
connection = PerfectAudit::Connection.new(configuration.to_h)
|
41
|
+
connection = PerfectAudit::Connection.new(**configuration.to_h)
|
34
42
|
|
35
43
|
container.register :connection, -> { connection }
|
36
44
|
container.register :response_parser, -> { PerfectAudit::ResponseParser }
|
@@ -39,21 +47,7 @@ module PerfectAudit
|
|
39
47
|
|
40
48
|
private
|
41
49
|
|
42
|
-
|
43
|
-
|
44
|
-
AutoInject = Dry::AutoInject(@@container)
|
45
|
-
|
46
|
-
def self.container
|
47
|
-
@@container
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.container=(v)
|
51
|
-
@@container = v
|
52
|
-
end
|
53
|
-
|
54
|
-
def self.configuration
|
55
|
-
@@configuration ||= OpenStruct.new
|
56
|
-
end
|
50
|
+
AutoInject = Dry::AutoInject(container)
|
57
51
|
end
|
58
52
|
|
59
53
|
require 'perfect_audit/api/repositories'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perfect_audit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Alexandrov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-auto_inject
|
@@ -232,7 +232,6 @@ files:
|
|
232
232
|
- ".irbrc"
|
233
233
|
- ".rspec"
|
234
234
|
- ".rubocop.yml"
|
235
|
-
- ".rubocop_todo.yml"
|
236
235
|
- ".ruby-version"
|
237
236
|
- ".travis.yml"
|
238
237
|
- Gemfile
|
data/.rubocop_todo.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2023-03-13 17:14:29 UTC using RuboCop version 1.44.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 3
|
10
|
-
Lint/IneffectiveAccessModifier:
|
11
|
-
Exclude:
|
12
|
-
- 'lib/perfect_audit.rb'
|
13
|
-
|
14
|
-
# Offense count: 2
|
15
|
-
RSpec/Be:
|
16
|
-
Exclude:
|
17
|
-
- 'spec/perfect_audit_spec.rb'
|
18
|
-
|
19
|
-
# Offense count: 1
|
20
|
-
# Configuration parameters: IgnoredMetadata.
|
21
|
-
RSpec/DescribeClass:
|
22
|
-
Exclude:
|
23
|
-
- 'spec/perfect_audit_spec.rb'
|
24
|
-
|
25
|
-
# Offense count: 3
|
26
|
-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
27
|
-
# Include: **/*_spec*rb*, **/spec/**/*
|
28
|
-
RSpec/FilePath:
|
29
|
-
Exclude:
|
30
|
-
- 'spec/api/books_repository_spec.rb'
|
31
|
-
- 'spec/api/connection_spec.rb'
|
32
|
-
- 'spec/api/documents_repository_spec.rb'
|
33
|
-
|
34
|
-
# Offense count: 4
|
35
|
-
# Configuration parameters: .
|
36
|
-
# SupportedStyles: have_received, receive
|
37
|
-
RSpec/MessageSpies:
|
38
|
-
EnforcedStyle: receive
|
39
|
-
|
40
|
-
# Offense count: 1
|
41
|
-
RSpec/MultipleDescribes:
|
42
|
-
Exclude:
|
43
|
-
- 'spec/perfect_audit_spec.rb'
|