perfect_audit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +2 -0
- data/lib/perfect_audit/version.rb +1 -1
- data/lib/perfect_audit.rb +17 -8
- data/perfect_audit.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 111bdad0b9fe1a76b57ecc26d7c9778628064960
|
4
|
+
data.tar.gz: b6273d579bcfc43723db18a543ef16cbcacc9506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99b1e74b8bd4766eb821a3ea4afc10f42a37c6e91af251b9b3ae246f65438cf213b0f06c14f1be7718c49a7523ddf204479951791d52c37f2a43d0c595324982
|
7
|
+
data.tar.gz: c7c7cdb9211bdaeadf245c461051a06f4aa1501a5541857d8637a323d0413e8386e3fcff0200da3ab5dccfee7d2fec204e0e7377ffeb8ca2c24994bff3422b7b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# PerfectAudit
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/igor-alexandrov/perfect_audit.svg?branch=master)](https://travis-ci.org/igor-alexandrov/perfect_audit)
|
4
|
+
|
3
5
|
Perfect Audit API wrapper.
|
4
6
|
|
5
7
|
[https://www.perfectaudit.com/api_docs](https://www.perfectaudit.com/api_docs)
|
data/lib/perfect_audit.rb
CHANGED
@@ -9,14 +9,9 @@ module PerfectAudit
|
|
9
9
|
|
10
10
|
class << self
|
11
11
|
def configure
|
12
|
-
configuration = Hash.new
|
13
12
|
yield configuration
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
container.register :connection, -> { connection }
|
18
|
-
container.register :response_parser, -> { PerfectAudit::ResponseParser }
|
19
|
-
container.freeze
|
14
|
+
register!
|
20
15
|
end
|
21
16
|
|
22
17
|
def books
|
@@ -27,8 +22,18 @@ module PerfectAudit
|
|
27
22
|
PerfectAudit::DocumentsRepository.new
|
28
23
|
end
|
29
24
|
|
30
|
-
def transactions
|
31
|
-
|
25
|
+
# def transactions
|
26
|
+
# PerfectAudit::TransactionsRepository.new
|
27
|
+
# end
|
28
|
+
|
29
|
+
# private
|
30
|
+
|
31
|
+
def register!
|
32
|
+
connection = PerfectAudit::Connection.new(configuration.to_h)
|
33
|
+
|
34
|
+
container.register :connection, -> { connection }
|
35
|
+
container.register :response_parser, -> { PerfectAudit::ResponseParser }
|
36
|
+
container.freeze
|
32
37
|
end
|
33
38
|
end
|
34
39
|
|
@@ -41,6 +46,10 @@ module PerfectAudit
|
|
41
46
|
def self.container
|
42
47
|
@@container
|
43
48
|
end
|
49
|
+
|
50
|
+
def self.configuration
|
51
|
+
@@configuration ||= OpenStruct.new
|
52
|
+
end
|
44
53
|
end
|
45
54
|
|
46
55
|
require 'perfect_audit/api/repositories'
|
data/perfect_audit.gemspec
CHANGED
@@ -31,5 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'bundler', "~> 1.11"
|
32
32
|
spec.add_development_dependency 'rake', "~> 10.0"
|
33
33
|
spec.add_development_dependency 'rspec', "~> 3.0"
|
34
|
+
spec.add_development_dependency 'rspec-collection_matchers'
|
34
35
|
spec.add_development_dependency 'pry'
|
35
36
|
end
|
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.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Alexandrov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-auto_inject
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec-collection_matchers
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: pry
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|