pipedrive-connect 2.0.0 → 2.0.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/.github/workflows/ci.yml +27 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +7 -0
- data/README.md +4 -1
- data/lib/pipedrive/api_operations/request.rb +11 -1
- data/lib/pipedrive/errors.rb +3 -3
- data/lib/pipedrive/version.rb +1 -1
- data/lib/pipedrive.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 131444c95f6ebc0388e1bbc98d1a9e3b6093a18e4c66d3e97865a05bc68b3a78
|
4
|
+
data.tar.gz: 3ac8c7f3a256c9c7cc0c0bf2e2bd13d272f1ee89d556b4e549e8593762451f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d66f1e1446e979020acd1216ef46a6a90e2910248a52fecaf62371adf79fd5af22c0d95e26f7b576a02c63a395289b684f246b4657278d321f0e01d82981593
|
7
|
+
data.tar.gz: 6a993a356288b5d470d44653cc646942b9485d9e9fb21b955204c7347acb84854cfb840e4971bc4df254160ff8bb30a4a93e854aedbac9fc10838d5ab3b598e9
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Run tests
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
push:
|
6
|
+
branches: [master]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
run-rspec-tests:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby-version: [2.7, 3.4]
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- name: Checkout code
|
17
|
+
uses: actions/checkout@v4
|
18
|
+
|
19
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
23
|
+
bundler-cache: true
|
24
|
+
|
25
|
+
- name: Run tests
|
26
|
+
run: |
|
27
|
+
bundle exec rspec
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,10 +5,17 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
7
7
|
|
8
|
+
## [2.0.1] - 2025-04-17
|
9
|
+
|
10
|
+
- Fix bugs instroduced with version 2 where the base url for v1 was broken.
|
11
|
+
- Add github actions
|
12
|
+
|
8
13
|
## [2.0.0] - 2025-04-11
|
14
|
+
|
9
15
|
- **BREAKING change**: Minimum ruby version updated to 2.7.
|
10
16
|
- Added options for using new V2 API endpoints. Resource `Pipedrive::Activity` switched to new V2 endpoint.
|
11
17
|
- Documentation updates with information on V1/V2 API endpoint switching.
|
18
|
+
|
12
19
|
## [1.3.1] - 2023-06-01
|
13
20
|
|
14
21
|
- **BREAKING change**: Generated `delete_*` method has been refactored to receive the `id` of the record to be dettached or deleted - instead of the resource per se -, for instance: `deal.delete_product(attached_product_id)`. This is because the API behaves different depending on the endpoint, like in case of `#DELETE /deals/{id}/products/{product_attachment_id}` that receives an id corresponding to the attachment id (not a product, but a different record).
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[](https://github.com/getonbrd/pipedrive-connect/actions/workflows/ci.yml)
|
2
|
+
|
1
3
|
# Pipedrive API Ruby library
|
2
4
|
|
3
5
|
Pipedrive::Connect provides a convenient access to the Pipedrive API from applications written in the Ruby language.
|
@@ -75,7 +77,8 @@ irb(main):009:0> Pipedrive.use_v2_api!
|
|
75
77
|
irb(main):010:0> Pipedrive.api_version
|
76
78
|
=> :v2
|
77
79
|
```
|
78
|
-
|
80
|
+
|
81
|
+
_Please note:_ not all resources have V2 api endpoint. For these resources the V2 setting will be ignored and the
|
79
82
|
V1 endpoints will always be used.
|
80
83
|
|
81
84
|
```ruby
|
@@ -17,6 +17,16 @@ module Pipedrive
|
|
17
17
|
supports_v2_api? ? Pipedrive.api_version : :v1
|
18
18
|
end
|
19
19
|
|
20
|
+
def api_version_prefix
|
21
|
+
return api_version if api_version == :v1
|
22
|
+
|
23
|
+
"api/#{api_version}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def api_base_url
|
27
|
+
"#{BASE_URL}/#{api_version_prefix}"
|
28
|
+
end
|
29
|
+
|
20
30
|
def request(method, url, params = {})
|
21
31
|
check_api_key!
|
22
32
|
raise "Not supported method" \
|
@@ -39,7 +49,7 @@ module Pipedrive
|
|
39
49
|
|
40
50
|
def api_client
|
41
51
|
@api_client = Faraday.new(
|
42
|
-
url:
|
52
|
+
url: api_base_url,
|
43
53
|
headers: { "Content-Type": "application/json" }
|
44
54
|
) do |faraday|
|
45
55
|
if Pipedrive.debug_http
|
data/lib/pipedrive/errors.rb
CHANGED
@@ -61,9 +61,9 @@ module Pipedrive
|
|
61
61
|
|
62
62
|
error_data =
|
63
63
|
response
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
.fetch(:data, {})
|
65
|
+
.inspect
|
66
|
+
.concat(response.fetch(:additional_data, {}).inspect)
|
67
67
|
|
68
68
|
error_class = ERROR_CLASS_MAP[status.to_s]
|
69
69
|
raise error_class.new(message, status, error_data) if error_class
|
data/lib/pipedrive/version.rb
CHANGED
data/lib/pipedrive.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipedrive-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Get on Board
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-18 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -24,12 +23,12 @@ dependencies:
|
|
24
23
|
- - "<"
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '3'
|
27
|
-
description:
|
28
26
|
email: team@getonbrd.com
|
29
27
|
executables: []
|
30
28
|
extensions: []
|
31
29
|
extra_rdoc_files: []
|
32
30
|
files:
|
31
|
+
- ".github/workflows/ci.yml"
|
33
32
|
- ".gitignore"
|
34
33
|
- ".rspec"
|
35
34
|
- ".rubocop.yml"
|
@@ -87,7 +86,6 @@ metadata:
|
|
87
86
|
source_code_uri: https://github.com/getonbrd/pipedrive-connect
|
88
87
|
changelog_uri: https://github.com/getonbrd/pipedrive-connect/CHANGELOG.md
|
89
88
|
rubygems_mfa_required: 'true'
|
90
|
-
post_install_message:
|
91
89
|
rdoc_options: []
|
92
90
|
require_paths:
|
93
91
|
- lib
|
@@ -102,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
100
|
- !ruby/object:Gem::Version
|
103
101
|
version: '0'
|
104
102
|
requirements: []
|
105
|
-
rubygems_version: 3.
|
106
|
-
signing_key:
|
103
|
+
rubygems_version: 3.6.2
|
107
104
|
specification_version: 4
|
108
105
|
summary: Ruby binding for the pipedrive API.
|
109
106
|
test_files: []
|