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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4621a6a8a2efab6f5b41e286093f2012837c9b90
4
- data.tar.gz: 3dab341642f68b7992741d399ca47a1a429e41e1
3
+ metadata.gz: 27318bb47aa4ce429c82c7ce33331b1d7eb716a1
4
+ data.tar.gz: 623760f1249e7db15cc2c3b59d9b80030029e95e
5
5
  SHA512:
6
- metadata.gz: f4501378b6c81768d70d80430ce558d41c2ee674200a7396560e60e5b1104d3608baf006962e1f022c06043927dd2f6db5f35596ac97b9205706e6366505bf03
7
- data.tar.gz: 592cb6a5b941e3e4a59e73c8a088cd0c28b210a9c91ab00da758e078c5706aa91fea3bd82d826ebbdd102f347f97d0e89aa98fbf854e36b9566f860f6ddf71aa
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.2 (2016-02-13)
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.2...HEAD
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.message
122
+ puts response.error.detail
123
123
  end
124
124
  ```
125
125
 
126
- #### Debuging
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
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ load Gem.bin_path("rspec-core", "rspec")
@@ -4,8 +4,7 @@ module PandaDoc
4
4
  include Virtus.model
5
5
 
6
6
  attribute :type, String
7
- attribute :message, String
8
- attribute :code, String
7
+ attribute :detail, String
9
8
  end
10
9
  end
11
10
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PandaDoc
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
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.2
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-14 00:00:00.000000000 Z
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