perfect_audit 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/perfect_audit/api/book.rb +4 -0
- data/lib/perfect_audit/api/repositories.rb +21 -0
- data/lib/perfect_audit/version.rb +1 -1
- data/perfect_audit.gemspec +2 -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: 408a4d2075ee6a5c39a14be61cebda937a21c93b
|
4
|
+
data.tar.gz: 988f21058fbcfee727587d3c83230db4cceff208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad33b115c75ca8ec8cb83d8975b087ef356eb33fdf0a985963280622f423b829ab3ac7b5430cd276496a3bfb7c41327e56c9d5bc3ec8f31171a114fad0f4e1f1
|
7
|
+
data.tar.gz: d3c85e5b35d54307dbb1f1d2bacb6accc013cfa4c3821a1ed8f1742e03953f95cdebc33982b45be27f81b2722b38bea1bb132f80039712775738d9a787b4ced2
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# PerfectAudit
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/perfect_audit)
|
3
4
|
[](https://travis-ci.org/igor-alexandrov/perfect_audit)
|
4
5
|
[](https://codeclimate.com/github/igor-alexandrov/perfect_audit/maintainability)
|
5
6
|
[](https://codeclimate.com/github/igor-alexandrov/perfect_audit/test_coverage)
|
@@ -12,6 +12,12 @@ module PerfectAudit
|
|
12
12
|
DELETE_PATH = 'book/remove'.freeze
|
13
13
|
EXCEL_EXPORT_PATH = 'book/export/xlsx/analytics'.freeze
|
14
14
|
|
15
|
+
# Create book in Perfect Audit
|
16
|
+
#
|
17
|
+
# @param name [String] name of book
|
18
|
+
# @param public [Boolean] should book be public ot not, `true` or `false`
|
19
|
+
# @return [PerfectAudit::Book] newly created book
|
20
|
+
# @raise [PerfectAudit::Error] if anything goes wrong during request
|
15
21
|
def create(name, public = false)
|
16
22
|
response = connection.post(CREATE_PATH,
|
17
23
|
json: {
|
@@ -23,6 +29,10 @@ module PerfectAudit
|
|
23
29
|
PerfectAudit::Book.new(response_parser.parse(response.body.to_s))
|
24
30
|
end
|
25
31
|
|
32
|
+
# Get all books from Perfect Audit for account
|
33
|
+
#
|
34
|
+
# @return [Array<PerfectAudit::Book>]
|
35
|
+
# @raise [PerfectAudit::Error] if anything goes wrong during request
|
26
36
|
def all
|
27
37
|
response = connection.get(ALL_PATH)
|
28
38
|
|
@@ -31,6 +41,12 @@ module PerfectAudit
|
|
31
41
|
}
|
32
42
|
end
|
33
43
|
|
44
|
+
|
45
|
+
# Find book in Perfect Audit
|
46
|
+
#
|
47
|
+
# @param id [Integer] ID of book
|
48
|
+
# @return [PerfectAudit::Book]
|
49
|
+
# @raise [PerfectAudit::Error] if anything goes wrong during request
|
34
50
|
def find(id)
|
35
51
|
response = connection.get(FIND_PATH,
|
36
52
|
params: {
|
@@ -41,6 +57,11 @@ module PerfectAudit
|
|
41
57
|
PerfectAudit::Book.new(response_parser.parse(response.body.to_s))
|
42
58
|
end
|
43
59
|
|
60
|
+
# Delete book in Perfect Audit
|
61
|
+
#
|
62
|
+
# @param id [Integer] ID of book
|
63
|
+
# @return [true]
|
64
|
+
# @raise [PerfectAudit::Error] if anything goes wrong during request
|
44
65
|
def delete(book_or_id)
|
45
66
|
id = book_or_id.is_a?(PerfectAudit::Book) ? book_or_id.id.to_s : book_or_id.to_s
|
46
67
|
response = connection.post(DELETE_PATH,
|
data/perfect_audit.gemspec
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
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-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-auto_inject
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: yard
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description: Perfect Audit API wrapper. https://www.perfectaudit.com/api_docs
|
210
224
|
email:
|
211
225
|
- igor.alexandrov@gmail.com
|