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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 288df445d03bba0e5e1c96fbe4989ab2adf06a27
4
- data.tar.gz: ee17df74e8e46ac6484a98001e89266d5f7c07d7
2
+ SHA256:
3
+ metadata.gz: c588092b15bab07ee5e68f7ca25026c5f5b56b7f00fe2e2e0b5cad05036c572e
4
+ data.tar.gz: 5182c9c44a21730c094df50b1bb47a02cc17469bce74d5ec55f15ca19785e156
5
5
  SHA512:
6
- metadata.gz: c11306a616de9b2f9058dcec9c3fc1224492631a41fcf106eb9fb7c04154394470c0b5486c75a3115da6ef8420824619fca533a449150846efd632c5828f9fe8
7
- data.tar.gz: 2120b67a1a4cddaa771f012097f33ab1668353260abaf7799e4c041d02e6dd35826e63ccf045b77d1683f5709933674dd0c64ef1d3258fb96b1b178cec2e2142
6
+ metadata.gz: 1b574327b0b7243262714902db490063b4fd86ca9f71710e0384ec1b0fef56ae2a94ac458337137252942cf7a7d7c52f86ab15e02bc47982d7d4d533cdd5d2f3
7
+ data.tar.gz: 9c530c919e6b04171edefc8d8747d7bc233a339e00f50d8482c25ad4c0d0aa58eee0859f77b543d9c30862b901b43469bdf364a01c40b0bf6a36ca901001d538
@@ -1,14 +1,14 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - ruby-head
4
- - 2.2
5
- - 2.1
6
- - 2.0
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.0.x
11
- - gemfiles/Gemfile.activesupport-4.1.x
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:
@@ -1,3 +1,7 @@
1
+ # 0.4.4
2
+
3
+ Now uses HTTP Authorization Header instead of passing access_token via params.
4
+
1
5
  # 0.4.2
2
6
 
3
7
  Fix created_at edition
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
- # Dimelo CCP API [![Build Status](https://travis-ci.org/dimelo/dimelo_ccp_api.svg?branch=master)](https://travis-ci.org/dimelo/dimelo_ccp_api) [![Code Climate](https://codeclimate.com/github/dimelo/dimelo_ccp_api.png)](https://codeclimate.com/github/dimelo/dimelo_ccp_api) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dimelo/dimelo_ccp_api)
1
+ # RingCentral Engage Communities ruby API Client
2
2
 
3
- Ruby client for the Dimelo Customer Community Platform
3
+ Ruby client for the Engage Communities
4
4
 
5
- This client support most of Dimelo CCP resources, can read and write them, paginates with cursor like interface, supports attachments and supports proper validation and error format.
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 Dimelo.
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.0, 2.1, 2.2 and Jruby-head
14
- - ActiveSupport 3.0+, 4.0.x and 4.1.x
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/dimelo/dimelo_ccp_api/fork )
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.3
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.3
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: 2015-08-03 00:00:00.000000000 Z
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
- rubyforge_project: dimelo_ccp_api
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: []