panda_doc 0.5.1 → 0.6.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
  SHA256:
3
- metadata.gz: 9178f289db10d3bf60e5a5ae645ff003d03826d05a6f5fe70d015beb68e6ecc5
4
- data.tar.gz: bac876ff0320cf75eac8fe8ec1c9c37992d9aa30961b257313d307fc5ab0314d
3
+ metadata.gz: 15388d36657b02a29ab9ab4113517330173b50363488d5570075acfc97fd2644
4
+ data.tar.gz: cd93797418157b2922fb6bda62452548f03714b4296f92bb50c453e9836ecd86
5
5
  SHA512:
6
- metadata.gz: d024634cfcb55517bae71a144d8107d9a9d2cb03fa63d022b00c511d5a2f730b86592a0d14a6417db52b895ebea612ec57131e0327268c0167d024f76895a650
7
- data.tar.gz: 04144545c90646efe63f32f4c7c02a15b6ed7e00736e5d19b91a01810e886fedffb8036897a2d89f16395c2f3364df38ccb515f306e8a5536594985a6e5ff221
6
+ metadata.gz: 3edd1e118866f67d64c4d9ba9b46518f3ec786253166e34f3e93c1e975597ab43b90543dc9da6d804bcf6c3b13542e819ac112233b4568c4f77be677c3a273b6
7
+ data.tar.gz: c8e74fe1e14ef159991fd514f5ac906b51d54a183bbc55996a6dcc6d4dc5b0c330c3545843f231adec953e4f16af107d34406c6318ac88ae5a36fbc2046b0e17
@@ -0,0 +1,53 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ specs:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ ruby:
16
+ - '3.1'
17
+ - '3.0'
18
+ - '2.7'
19
+ - '2.6'
20
+ include:
21
+ - ruby: '3.1'
22
+ coverage: '1'
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ with:
26
+ submodules: true
27
+ - name: Setup Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ - name: Update rubygems
32
+ run: |
33
+ gem update --system
34
+ - uses: actions/cache@v2
35
+ with:
36
+ path: vendor/bundle
37
+ key: bundle-use-ruby-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
38
+ restore-keys: |
39
+ bundle-use-ruby-${{ matrix.ruby }}-
40
+ - name: Bundle install
41
+ run: |
42
+ bundle config path vendor/bundle
43
+ bundle install --jobs 4 --retry 3
44
+ - name: Run specs
45
+ env:
46
+ SIMPLECOV: ${{ matrix.coverage }}
47
+ run: |
48
+ bundle exec rake spec
49
+ - name: Publish code coverage
50
+ if: ${{ matrix.coverage == '1' }}
51
+ uses: paambaati/codeclimate-action@v3.0.0
52
+ env:
53
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.2
data/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.6.0][] (2022-05-04)
8
+
9
+ New:
10
+
11
+ - Add `roles`, `shared_link` and `contact_id` to the recipient in the document details response:
12
+ ```ruby
13
+ document = PandaDoc::Document.details("uuid")
14
+ document.recipients.first.roles
15
+ => ["Signer", "Reviewer"]
16
+
17
+ document.recipients.first.shared_link
18
+ => "https://app.pandadoc.com/document/b7f11ea3c09d1c11208cc122457d4f3a2829d364"
19
+
20
+ document.recipients.first.contact_id
21
+ => "7kqXgjFejB2toXxjcC5jfZ"
22
+ ```
23
+
24
+ Fixes:
25
+
26
+ - Fixes #11 - make `FailureResult#response` public
27
+ - Fixes #8 - make `Recipient` attributes optional
28
+
29
+ ## [0.5.3][] (2021-11-03)
30
+
31
+ Fixes:
32
+
33
+ - Fixes #5 - make `placeholder` attribute optional (@acuster77)
34
+
35
+ ## [0.5.2][] (2021-03-08)
36
+
37
+ Fixes:
38
+
39
+ - Fixes #3 - `Dry::Struct::Error` when token.value is not provided.
40
+
7
41
  ## [0.5.1][] (2021-01-08)
8
42
 
9
43
  New:
@@ -163,7 +197,10 @@ Fixes:
163
197
 
164
198
  - Initial release
165
199
 
166
- [Unreleased]: https://github.com/opti/panda_doc/compare/v0.5.1...HEAD
200
+ [Unreleased]: https://github.com/opti/panda_doc/compare/v0.6.0...HEAD
201
+ [0.6.0]: https://github.com/opti/panda_doc/compare/v0.5.3...v0.6.0
202
+ [0.5.3]: https://github.com/opti/panda_doc/compare/v0.5.2...v0.5.3
203
+ [0.5.2]: https://github.com/opti/panda_doc/compare/v0.5.1...v0.5.2
167
204
  [0.5.1]: https://github.com/opti/panda_doc/compare/v0.5.0...v0.5.1
168
205
  [0.5.0]: https://github.com/opti/panda_doc/compare/v0.4.3...v0.5.0
169
206
  [0.4.3]: https://github.com/opti/panda_doc/compare/v0.4.2...v0.4.3
data/Gemfile CHANGED
@@ -9,5 +9,5 @@ gem "rspec", "~> 3.4"
9
9
  gem "byebug"
10
10
 
11
11
  group :test do
12
- gem 'simplecov', require: false
12
+ gem "simplecov", "~> 0.17.1", require: false
13
13
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,96 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ panda_doc (0.6.0)
5
+ dry-configurable
6
+ dry-struct
7
+ faraday (>= 0.9.2, < 2.0)
8
+ faraday_middleware (>= 0.10.0, < 2.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ byebug (11.1.3)
14
+ concurrent-ruby (1.1.9)
15
+ diff-lcs (1.4.4)
16
+ docile (1.4.0)
17
+ dry-configurable (0.13.0)
18
+ concurrent-ruby (~> 1.0)
19
+ dry-core (~> 0.6)
20
+ dry-container (0.9.0)
21
+ concurrent-ruby (~> 1.0)
22
+ dry-configurable (~> 0.13, >= 0.13.0)
23
+ dry-core (0.7.1)
24
+ concurrent-ruby (~> 1.0)
25
+ dry-inflector (0.2.1)
26
+ dry-logic (1.2.0)
27
+ concurrent-ruby (~> 1.0)
28
+ dry-core (~> 0.5, >= 0.5)
29
+ dry-struct (1.4.0)
30
+ dry-core (~> 0.5, >= 0.5)
31
+ dry-types (~> 1.5)
32
+ ice_nine (~> 0.11)
33
+ dry-types (1.5.1)
34
+ concurrent-ruby (~> 1.0)
35
+ dry-container (~> 0.3)
36
+ dry-core (~> 0.5, >= 0.5)
37
+ dry-inflector (~> 0.1, >= 0.1.2)
38
+ dry-logic (~> 1.0, >= 1.0.2)
39
+ faraday (1.8.0)
40
+ faraday-em_http (~> 1.0)
41
+ faraday-em_synchrony (~> 1.0)
42
+ faraday-excon (~> 1.1)
43
+ faraday-httpclient (~> 1.0.1)
44
+ faraday-net_http (~> 1.0)
45
+ faraday-net_http_persistent (~> 1.1)
46
+ faraday-patron (~> 1.0)
47
+ faraday-rack (~> 1.0)
48
+ multipart-post (>= 1.2, < 3)
49
+ ruby2_keywords (>= 0.0.4)
50
+ faraday-em_http (1.0.0)
51
+ faraday-em_synchrony (1.0.0)
52
+ faraday-excon (1.1.0)
53
+ faraday-httpclient (1.0.1)
54
+ faraday-net_http (1.0.1)
55
+ faraday-net_http_persistent (1.2.0)
56
+ faraday-patron (1.0.0)
57
+ faraday-rack (1.0.0)
58
+ faraday_middleware (1.2.0)
59
+ faraday (~> 1.0)
60
+ ice_nine (0.11.2)
61
+ json (2.6.1)
62
+ multipart-post (2.1.1)
63
+ rake (13.0.6)
64
+ rspec (3.10.0)
65
+ rspec-core (~> 3.10.0)
66
+ rspec-expectations (~> 3.10.0)
67
+ rspec-mocks (~> 3.10.0)
68
+ rspec-core (3.10.1)
69
+ rspec-support (~> 3.10.0)
70
+ rspec-expectations (3.10.1)
71
+ diff-lcs (>= 1.2.0, < 2.0)
72
+ rspec-support (~> 3.10.0)
73
+ rspec-mocks (3.10.2)
74
+ diff-lcs (>= 1.2.0, < 2.0)
75
+ rspec-support (~> 3.10.0)
76
+ rspec-support (3.10.3)
77
+ ruby2_keywords (0.0.5)
78
+ simplecov (0.17.1)
79
+ docile (~> 1.1)
80
+ json (>= 1.8, < 3)
81
+ simplecov-html (~> 0.10.0)
82
+ simplecov-html (0.10.2)
83
+
84
+ PLATFORMS
85
+ ruby
86
+
87
+ DEPENDENCIES
88
+ bundler
89
+ byebug
90
+ panda_doc!
91
+ rake (>= 10.0)
92
+ rspec (~> 3.4)
93
+ simplecov (~> 0.17.1)
94
+
95
+ BUNDLED WITH
96
+ 2.3.13
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  PandaDoc gem is a simple wrapper for PandaDoc.com API. Please check the official
4
4
  API [documenation](https://developers.pandadoc.com) for more details.
5
5
 
6
- [![Build Status](https://travis-ci.org/opti/panda_doc.svg?branch=master)](http://travis-ci.org/opti/panda_doc)
6
+ [![Build Status](https://github.com/opti/panda_doc/actions/workflows/ci.yml/badge.svg)](https://github.com/opti/panda_doc/actions/workflows/ci.yml)
7
7
  [![Code Climate](https://codeclimate.com/github/opti/panda_doc/badges/gpa.svg)](https://codeclimate.com/github/opti/panda_doc)
8
8
  [![Test Coverage](https://codeclimate.com/github/opti/panda_doc/badges/coverage.svg)](https://codeclimate.com/github/opti/panda_doc/coverage)
9
9
 
@@ -22,9 +22,9 @@ module PandaDoc
22
22
  @url_prefix = "/public/v1"
23
23
  @connection = Faraday.new(PandaDoc.configuration.endpoint) do |conn|
24
24
  if PandaDoc.configuration.api_key
25
- conn.authorization "API-Key", PandaDoc.configuration.api_key
25
+ conn.request :authorization, "API-Key", PandaDoc.configuration.api_key
26
26
  else
27
- conn.authorization :Bearer, PandaDoc.configuration.access_token
27
+ conn.request :authorization, :Bearer, PandaDoc.configuration.access_token
28
28
  end
29
29
 
30
30
  if multipart
@@ -8,6 +8,6 @@ module PandaDoc
8
8
  setting :api_key
9
9
  setting :logger
10
10
 
11
- setting :endpoint, "https://api.pandadoc.com"
11
+ setting :endpoint, default: "https://api.pandadoc.com"
12
12
  end
13
13
  end
@@ -9,7 +9,6 @@ module PandaDoc
9
9
  attr_reader :error
10
10
 
11
11
  attr_reader :response
12
- private :response
13
12
 
14
13
  def initialize(response)
15
14
  @response = response
@@ -6,7 +6,7 @@ module PandaDoc
6
6
  attribute :uuid, Types::Coercible::String
7
7
  attribute :name, Types::Coercible::String.optional
8
8
  attribute :title, Types::Coercible::String.optional
9
- attribute :placeholder, Types::Coercible::String.optional
9
+ attribute? :placeholder, Types::Coercible::String.optional
10
10
  attribute :value, Types::Nil | Types::Hash | Types::Coercible::String
11
11
  attribute? :assigned_to, PandaDoc::Objects::Recipient
12
12
  end
@@ -4,13 +4,16 @@ module PandaDoc
4
4
  module Objects
5
5
  class Recipient < Base
6
6
  attribute? :id, Types::Coercible::String.optional
7
- attribute :email, Types::Coercible::String
8
- attribute :first_name, Types::Coercible::String.optional
9
- attribute :last_name, Types::Coercible::String.optional
10
- attribute :recipient_type, Types::Coercible::String
11
- attribute :has_completed, Types::Params::Bool
7
+ attribute? :email, Types::Coercible::String
8
+ attribute? :first_name, Types::Coercible::String.optional
9
+ attribute? :last_name, Types::Coercible::String.optional
10
+ attribute? :recipient_type, Types::Coercible::String
11
+ attribute? :has_completed, Types::Params::Bool
12
12
  attribute? :role, Types::Coercible::String.optional
13
13
  attribute? :type, Types::Coercible::String.optional
14
+ attribute? :roles, Types::Array.of(Types::Coercible::String)
15
+ attribute? :contact_id, Types::Coercible::String.optional
16
+ attribute? :shared_link, Types::Coercible::String.optional
14
17
  end
15
18
  end
16
19
  end
@@ -3,8 +3,8 @@
3
3
  module PandaDoc
4
4
  module Objects
5
5
  class Token < Base
6
- attribute :name, Types::Coercible::String
7
- attribute :value, Types::Coercible::String.optional
6
+ attribute :name, Types::Coercible::String.optional
7
+ attribute? :value, Types::Coercible::String.optional
8
8
  end
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PandaDoc
4
- VERSION = "0.5.1"
4
+ VERSION = "0.6.0"
5
5
  end
data/panda_doc.gemspec CHANGED
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = ">= 2.5"
23
23
  spec.add_dependency "faraday", ">= 0.9.2", "< 2.0"
24
24
  spec.add_dependency "faraday_middleware", ">= 0.10.0", "< 2.0"
25
- spec.add_dependency "dry-configurable", "~> 0.11"
26
- spec.add_dependency "dry-struct", "~> 1.3"
25
+ spec.add_dependency "dry-configurable"
26
+ spec.add_dependency "dry-struct"
27
27
  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.5.1
4
+ version: 0.6.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: 2021-01-09 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -54,30 +54,30 @@ dependencies:
54
54
  name: dry-configurable
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '0.11'
59
+ version: '0'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - "~>"
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: '0.11'
66
+ version: '0'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: dry-struct
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '1.3'
73
+ version: '0'
74
74
  type: :runtime
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - "~>"
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: '1.3'
80
+ version: '0'
81
81
  description: Ruby wrapper for PandaDoc.com API
82
82
  email:
83
83
  - igor.pstyga@gmail.com
@@ -85,11 +85,13 @@ executables: []
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
+ - ".github/workflows/ci.yml"
88
89
  - ".gitignore"
89
90
  - ".rspec"
90
- - ".travis.yml"
91
+ - ".ruby-version"
91
92
  - CHANGELOG.md
92
93
  - Gemfile
94
+ - Gemfile.lock
93
95
  - LICENSE.txt
94
96
  - README.md
95
97
  - Rakefile
@@ -134,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
136
  - !ruby/object:Gem::Version
135
137
  version: '0'
136
138
  requirements: []
137
- rubygems_version: 3.2.3
139
+ rubygems_version: 3.3.13
138
140
  signing_key:
139
141
  specification_version: 4
140
142
  summary: Ruby wrapper for PandaDoc.com API
data/.travis.yml DELETED
@@ -1,32 +0,0 @@
1
- language: ruby
2
- os: linux
3
- dist: xenial
4
-
5
- cache:
6
- - bundler
7
-
8
- rvm:
9
- - 2.5
10
- - 2.6
11
- - 2.7
12
- - 3.0
13
-
14
- env:
15
- global:
16
- - CC_TEST_REPORTER_ID=d1d9c0636042863489880dbdf1c8865721b9b70f4199d612d77ee2dcfc803704
17
-
18
- before_install:
19
- - gem update --system
20
- - gem install bundler
21
-
22
- before_script:
23
- - bundle update
24
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
25
- - chmod +x ./cc-test-reporter
26
- - ./cc-test-reporter before-build
27
-
28
- script:
29
- - bin/rake
30
-
31
- after_script:
32
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT