panda_doc 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -2
- data/README.md +2 -2
- data/bin/rspec +4 -0
- data/lib/panda_doc/objects/error.rb +1 -2
- data/lib/panda_doc/responses/error.rb +1 -10
- data/lib/panda_doc/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27318bb47aa4ce429c82c7ce33331b1d7eb716a1
|
4
|
+
data.tar.gz: 623760f1249e7db15cc2c3b59d9b80030029e95e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a9cdc59b9d469566dc2c11001aca183bb1a8b47da6b17ffd028047f5f1b53eab2664ee220792412d871306d468412aae51604906348e00956f1612e0ea3e61
|
7
|
+
data.tar.gz: 6486cc5c58f8d2fafd90eb8758800bc9349c8d1507e4989c22bfb09defa7720d7ef2d699fb71bb50911014b42c90c219f4de7322935e8d54a0f5243acd6d3590
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## [Unreleased]
|
6
6
|
|
7
|
-
## 0.0
|
7
|
+
## [0.1.0][] (2016-02-17)
|
8
|
+
|
9
|
+
New:
|
10
|
+
|
11
|
+
- Mimic the original error structure. Error object on failure result will have
|
12
|
+
two methods: `type` and `detail`, where is `detail` might be String or Hash
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
response.error.detail => "Not Found"
|
16
|
+
response.error.detail => {"fields"=>["Field 'foo' does not exist."]}
|
17
|
+
```
|
18
|
+
|
19
|
+
|
20
|
+
## [0.0.2][] (2016-02-13)
|
8
21
|
|
9
22
|
New:
|
10
23
|
|
@@ -24,5 +37,6 @@ Fixes:
|
|
24
37
|
|
25
38
|
- Initial release
|
26
39
|
|
27
|
-
[Unreleased]: https://github.com/opti/panda_doc/compare/v0.0
|
40
|
+
[Unreleased]: https://github.com/opti/panda_doc/compare/v0.1.0...HEAD
|
41
|
+
[0.1.0]: https://github.com/opti/panda_doc/compare/v0.0.2...v0.1.0
|
28
42
|
[0.0.2]: https://github.com/opti/panda_doc/compare/v0.0.1...v0.0.2
|
data/README.md
CHANGED
@@ -119,11 +119,11 @@ response = PandaDoc::Document.create(name: "Sample Document")
|
|
119
119
|
if response.success?
|
120
120
|
uuid = response.uuid
|
121
121
|
else
|
122
|
-
puts response.error.
|
122
|
+
puts response.error.detail
|
123
123
|
end
|
124
124
|
```
|
125
125
|
|
126
|
-
####
|
126
|
+
#### Debugging
|
127
127
|
|
128
128
|
You can configure a logger if you need to debug your requests/responses
|
129
129
|
|
data/bin/rspec
ADDED
@@ -4,16 +4,7 @@ module PandaDoc
|
|
4
4
|
include Representable::Hash
|
5
5
|
|
6
6
|
property :type
|
7
|
-
|
8
|
-
property :message, as: :detail,
|
9
|
-
skip_parse: ->(doc:, **) { doc["detail"].is_a?(Hash) }
|
10
|
-
|
11
|
-
nested :detail, skip_parse: ->(doc:, **) {
|
12
|
-
doc["detail"].is_a?(String)
|
13
|
-
} do
|
14
|
-
property :message
|
15
|
-
property :code
|
16
|
-
end
|
7
|
+
property :detail
|
17
8
|
end
|
18
9
|
end
|
19
10
|
end
|
data/lib/panda_doc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Pstyga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -77,6 +77,7 @@ email:
|
|
77
77
|
- igor.pstyga@gmail.com
|
78
78
|
executables:
|
79
79
|
- console
|
80
|
+
- rspec
|
80
81
|
- setup
|
81
82
|
extensions: []
|
82
83
|
extra_rdoc_files: []
|
@@ -90,6 +91,7 @@ files:
|
|
90
91
|
- README.md
|
91
92
|
- Rakefile
|
92
93
|
- bin/console
|
94
|
+
- bin/rspec
|
93
95
|
- bin/setup
|
94
96
|
- lib/panda_doc.rb
|
95
97
|
- lib/panda_doc/api_client.rb
|