dimelo_ccp_api 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -5
- data/CHANGELOG.md +4 -0
- data/README.md +7 -7
- data/VERSION +1 -1
- data/lib/dimelo/ccp/api/connection.rb +3 -1
- data/spec/lib/dimelo/ccp/api/connection_spec.rb +7 -1
- metadata +4 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c588092b15bab07ee5e68f7ca25026c5f5b56b7f00fe2e2e0b5cad05036c572e
|
4
|
+
data.tar.gz: 5182c9c44a21730c094df50b1bb47a02cc17469bce74d5ec55f15ca19785e156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b574327b0b7243262714902db490063b4fd86ca9f71710e0384ec1b0fef56ae2a94ac458337137252942cf7a7d7c52f86ab15e02bc47982d7d4d533cdd5d2f3
|
7
|
+
data.tar.gz: 9c530c919e6b04171edefc8d8747d7bc233a339e00f50d8482c25ad4c0d0aa58eee0859f77b543d9c30862b901b43469bdf364a01c40b0bf6a36ca901001d538
|
data/.travis.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- ruby-head
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
4
|
+
- 2.6
|
5
|
+
- 2.5
|
6
|
+
- 2.4
|
7
7
|
- jruby-head
|
8
8
|
gemfile:
|
9
9
|
- gemfiles/Gemfile.activesupport-3.2.x
|
10
|
-
- gemfiles/Gemfile.activesupport-4.
|
11
|
-
- gemfiles/Gemfile.activesupport-
|
10
|
+
- gemfiles/Gemfile.activesupport-4.2.x
|
11
|
+
- gemfiles/Gemfile.activesupport-5.2.x
|
12
12
|
- gemfiles/Gemfile.activesupport-edge
|
13
13
|
matrix:
|
14
14
|
allow_failures:
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
#
|
1
|
+
# RingCentral Engage Communities ruby API Client
|
2
2
|
|
3
|
-
Ruby client for the
|
3
|
+
Ruby client for the Engage Communities
|
4
4
|
|
5
|
-
This client support most of
|
5
|
+
This client support most of Engage Communities resources, can read and write them, paginates with cursor like interface, supports attachments and supports proper validation and error format.
|
6
6
|
|
7
|
-
This is heavily used internaly at
|
7
|
+
This is heavily used internaly at Engage Communities.
|
8
8
|
|
9
9
|
# Compatibility
|
10
10
|
|
11
11
|
Compatible and tested with:
|
12
12
|
|
13
|
-
- Ruby 2.
|
14
|
-
- ActiveSupport 3
|
13
|
+
- Ruby MRI 2.4, 2.5, 2.6, Head and Jruby-head
|
14
|
+
- ActiveSupport 3+, 4+, 5+, Head
|
15
15
|
|
16
16
|
|
17
17
|
## Installation
|
@@ -52,7 +52,7 @@ puts "feedbacks not by anonymous and superadmin: #{feedbacks.select{|f| f.user_i
|
|
52
52
|
|
53
53
|
## Contributing
|
54
54
|
|
55
|
-
1. Fork it ( http://github.com/
|
55
|
+
1. Fork it ( http://github.com/ringcentral/engage-digital-communities-ruby/fork )
|
56
56
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
57
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
58
58
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
@@ -29,9 +29,11 @@ module Dimelo::CCP
|
|
29
29
|
initialize_client
|
30
30
|
end
|
31
31
|
|
32
|
-
def perform(method, uri, payload={})
|
32
|
+
def perform(method, uri, payload = {})
|
33
|
+
access_token = payload.delete(:access_token)
|
33
34
|
@client.send(method, uri, payload) do |req|
|
34
35
|
req.headers[:accept] = 'application/json'
|
36
|
+
req.headers[:authorization] = "Bearer #{access_token}"
|
35
37
|
req.headers[:user_agent] = user_agent
|
36
38
|
end
|
37
39
|
end
|
@@ -35,7 +35,7 @@ describe Dimelo::CCP::API::Connection do
|
|
35
35
|
context 'HTTP' do
|
36
36
|
|
37
37
|
subject do
|
38
|
-
Dimelo::CCP::API::Connection.new('www.google.fr')
|
38
|
+
Dimelo::CCP::API::Connection.new('http://www.google.fr')
|
39
39
|
end
|
40
40
|
|
41
41
|
let(:request) { [:get, 'http://www.google.fr/'] }
|
@@ -97,6 +97,12 @@ describe Dimelo::CCP::API::Connection do
|
|
97
97
|
expect(response).to be_success
|
98
98
|
end
|
99
99
|
|
100
|
+
it 'sends access_token in authorization header' do
|
101
|
+
response = subject.perform(:get, 'http://www.google.com', { q: 'hello', access_token: 'token' })
|
102
|
+
expect(response.env[:request_headers][:authorization]).to eq("Bearer token")
|
103
|
+
expect(response).to be_success
|
104
|
+
end
|
105
|
+
|
100
106
|
context 'Custom user_agent with valid ASCII characters' do
|
101
107
|
let!(:custom_user_agent) { "SMCC; I asked and failed" }
|
102
108
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dimelo_ccp_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -156,20 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
|
160
|
-
rubygems_version: 2.4.2
|
159
|
+
rubygems_version: 3.0.6
|
161
160
|
signing_key:
|
162
161
|
specification_version: 4
|
163
162
|
summary: Dimelo CCP v2 API client
|
164
|
-
test_files:
|
165
|
-
- spec/examples/openable_examples.rb
|
166
|
-
- spec/examples/starrable_example.rb
|
167
|
-
- spec/fixtures/files/logo.jpg
|
168
|
-
- spec/lib/dimelo/ccp/api/client_spec.rb
|
169
|
-
- spec/lib/dimelo/ccp/api/connection_spec.rb
|
170
|
-
- spec/lib/dimelo/ccp/api/model/attachment_spec.rb
|
171
|
-
- spec/lib/dimelo/ccp/api/model/feedback_spec.rb
|
172
|
-
- spec/lib/dimelo/ccp/api/model/question_spec.rb
|
173
|
-
- spec/lib/dimelo/ccp/api/model/user_spec.rb
|
174
|
-
- spec/lib/dimelo/ccp/api/model_spec.rb
|
175
|
-
- spec/spec_helper.rb
|
163
|
+
test_files: []
|