ringcentral_sdk 1.2.1 → 1.2.2

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: 51c0f6c2ea830b383183dc9a4438089399505bf0
4
- data.tar.gz: fc77837df789066d90b8ed0a478687251ef51cc4
3
+ metadata.gz: ab2c48c3882d936b0bb470b627a114086bd550a6
4
+ data.tar.gz: 4c0c4e621ef2e37628374afeb3348aa722debb8f
5
5
  SHA512:
6
- metadata.gz: fd908cd6b1207fda3f891277f4ecf5b6c18a4a6cd75f8f5274ce765591919ef2579d4b95a4192213897f6525144e8a4ceac1bf06ac011200b4b5228a33249dde
7
- data.tar.gz: e5a1ec3e4a6cdf097db8c9ba739d607d0cecc4a4c27d2d50773158edb2b9652cddaa17d68c20a3277a11b25d4d37618498e25be660a3093dd56c1ef9eb97e64d
6
+ metadata.gz: 7adbfc3b60c6b520226ef30149b772bbd5ad31b86274e004b43ab6ba95bd450cac00c73234f1c3382cbb91900fd48c2c4fee0808aeb65b9d70d1c37bd4082cf3
7
+ data.tar.gz: e8b3fa8f67ba7f9103c9c6243a41eba70a7b6685e1750c202cbd52f6a6d745bab1cfd7b9716c3ac7c57dda8ed7fabdd7109f3e244163ac4bf3160594a1034ee7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  CHANGELOG
2
2
  ---------
3
+ - **2016-05-30**: 1.2.2
4
+ - Additions
5
+ - Add `RingCentralSdk::REST::Request::Fax` to support all `MIME::Media` MIME parts
6
+ - Add docs for call queue add / remove agents
7
+ - Add docs for fax `multipart/form-data` support
8
+ - Add demo for fax custom cover page
3
9
  - **2016-04-23**: 1.2.1
4
10
  - Updates
5
11
  - Update `RingCentral::REST::Client` `app_config =` to `set_app_config`
@@ -1,5 +1,5 @@
1
1
  module RingCentralSdk
2
- VERSION = '1.2.1'
2
+ VERSION = '1.2.2'
3
3
 
4
4
  RC_SERVER_PRODUCTION = 'https://platform.ringcentral.com'
5
5
  RC_SERVER_SANDBOX = 'https://platform.devtest.ringcentral.com'
@@ -139,8 +139,9 @@ module RingCentralSdk::REST
139
139
 
140
140
  @http = Faraday.new(url: api_version_url()) do |conn|
141
141
  conn.request :oauth2_refresh, @token
142
- conn.request :json
142
+ conn.request :multipart
143
143
  conn.request :url_encoded
144
+ conn.request :json
144
145
  conn.headers['User-Agent'] = @user_agent
145
146
  if @instance_headers.is_a? Hash
146
147
  @instance_headers.each do |k,v|
@@ -37,7 +37,7 @@ module RingCentralSdk::REST
37
37
  new_status = new_status_dnd_department_calls(current_status, enable)
38
38
 
39
39
  if current_status != new_status
40
- update({:dndStatus => new_status})
40
+ update({dndStatus: new_status})
41
41
  end
42
42
 
43
43
  return new_status
@@ -58,7 +58,7 @@ module RingCentralSdk::REST::Request
58
58
  }
59
59
 
60
60
  opts.each do |k,v|
61
- meta[k] = v unless processed.key?(k)
61
+ meta[k] = v unless processed.key? k
62
62
  end
63
63
 
64
64
  meta
@@ -68,27 +68,29 @@ module RingCentralSdk::REST::Request
68
68
  return unless !text.nil? && text.to_s.length>0
69
69
  opts[:content_id_disable] = true
70
70
  text_part = MIMEBuilder::Text.new(text, opts)
71
- @msg.add(text_part.mime)
71
+ @msg.add text_part.mime
72
72
  end
73
73
 
74
74
  def add_parts(parts=[])
75
75
  return if parts.nil?
76
- unless parts.is_a?(Array)
76
+ unless parts.is_a? Array
77
77
  raise 'invalid parameter[0]. needs to be an array'
78
78
  end
79
79
  parts.each do |part|
80
- if part.is_a?(String)
80
+ if part.is_a? MIME::Media
81
+ @msg.add part
82
+ elsif part.is_a?(String)
81
83
  file_part = MIMEBuilder::Filepath.new(part)
82
- @msg.add(file_part.mime)
84
+ @msg.add file_part.mime
83
85
  elsif part.is_a? Hash
84
86
  part[:content_id_disable] = true
85
87
  part[:is_attachment] = true
86
88
  if part.key? :filename
87
89
  file_part = MIMEBuilder::Filepath.new(part[:filename], part)
88
- @msg.add(file_part.mime)
90
+ @msg.add file_part.mime
89
91
  elsif part.key? :text
90
92
  text_part = MIMEBuilder::Text.new(part[:text], part)
91
- @msg.add(text_part.mime)
93
+ @msg.add text_part.mime
92
94
  end
93
95
  end
94
96
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ringcentral_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-23 00:00:00.000000000 Z
11
+ date: 2016-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -251,9 +251,6 @@ files:
251
251
  - lib/ringcentral_sdk/rest/request/simple.rb
252
252
  - lib/ringcentral_sdk/rest/simple_client.rb
253
253
  - lib/ringcentral_sdk/rest/subscription.rb
254
- - mkdocs.yml
255
- - pubnub.log
256
- - ringcentral_sdk.gemspec
257
254
  - test/test_base.rb
258
255
  - test/test_client.rb
259
256
  - test/test_config.rb
@@ -284,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
281
  version: '0'
285
282
  requirements: []
286
283
  rubyforge_project:
287
- rubygems_version: 2.4.8
284
+ rubygems_version: 2.5.1
288
285
  signing_key:
289
286
  specification_version: 4
290
287
  summary: RingCentral SDK - Ruby SDK for the RingCentral Connect Platform API
data/mkdocs.yml DELETED
@@ -1,34 +0,0 @@
1
- site_name: RingCentral SDK for Ruby
2
- site_url: https://github.com/grokify/ringcentral-sdk-ruby
3
- repo_url: https://github.com/grokify/ringcentral-sdk-ruby.git
4
- docs_dir: docs
5
- theme: readthedocs
6
- pages:
7
- # Introduction:
8
- - ['index.md', 'About', 'RingCentral SDK']
9
- - ['quickstart.md', 'About', 'Quickstart']
10
-
11
- ## Authorization:
12
- - ['usage/authorization/Authorization.md', 'Authorization', 'Authorization']
13
-
14
- ## Generic HTTP
15
- - ['usage/http-client.md', 'Generic Requests', 'HTTP Client']
16
-
17
- ## Messaging:
18
- - ['usage/messages/SMS-Messages.md', 'Messaging', 'SMS Messages']
19
- - ['usage/messages/Fax-Messages.md', 'Messaging', 'Fax Messages']
20
-
21
- ## Voice:
22
- - ['usage/voice/Click-To-Call.md', 'Voice', 'Click-To-Call']
23
- - ['usage/messages/Call-Recordings.md', 'Voice', 'Call Recordings']
24
-
25
- ## Answering Rules:
26
- - ['usage/answering-rules/Answering-Rules-Call-Forwarding.md', 'Answering Rules', 'Call Forwarding']
27
-
28
- ## Call Queues:
29
- - ['usage/callqueues/Member-Status.md', 'Call Queues', 'Member Status']
30
-
31
- ## Notifications:
32
- - ['usage/notifications/Subscriptions.md', 'Notifications', 'Subscriptions']
33
- - ['usage/notifications/Subscribe_to_All_Extensions.md', 'Notifications', 'Subscribe to All Extensions']
34
- - ['usage/notifications/Subscribe_for_New_SMS.md', 'Notifications', 'Subscribe for New SMS']
data/pubnub.log DELETED
@@ -1,5 +0,0 @@
1
- # Logfile created on 2016-03-21 00:44:14 -0700 by logger.rb/1.2.8
2
- I, [2016-03-21T00:44:14.724379 #4232] INFO -- Pubnub::Client: Created new Pubnub::Client instance. Version: 3.8.0
3
- I, [2016-03-21T00:44:47.460102 #4234] INFO -- Pubnub::Client: Created new Pubnub::Client instance. Version: 3.8.0
4
- I, [2016-03-21T00:45:55.441057 #4236] INFO -- Pubnub::Client: Created new Pubnub::Client instance. Version: 3.8.0
5
- I, [2016-03-21T00:46:05.912837 #4238] INFO -- Pubnub::Client: Created new Pubnub::Client instance. Version: 3.8.0
@@ -1,33 +0,0 @@
1
- lib = 'ringcentral_sdk'
2
- lib_file = File.expand_path("../lib/#{lib}.rb", __FILE__)
3
- File.read(lib_file) =~ /\bVERSION\s*=\s*["'](.+?)["']/
4
- version = $1
5
- #require File.expand_path('../lib/ringcentral_sdk/version', __FILE__)
6
-
7
- Gem::Specification.new do |s|
8
- s.name = 'ringcentral_sdk'
9
- s.version = version
10
- s.date = '2016-04-23'
11
- s.summary = 'RingCentral SDK - Ruby SDK for the RingCentral Connect Platform API'
12
- s.description = 'A Ruby SDK for the RingCentral Connect Platform API'
13
- s.authors = ['John Wang']
14
- s.email = 'johncwang@gmail.com'
15
- s.homepage = 'https://github.com/grokify/'
16
- s.licenses = ['MIT']
17
- s.files = Dir['lib/**/**/*'] # + Dir['bin/*']
18
- s.files += Dir['[A-Z]*'] + Dir['test/**/*']
19
- # s.files.reject! { |fn| fn.include? "CVS" }
20
- # s.required_ruby_version = '>= 1.8.7' # 1.8.7+ is tested
21
- s.add_dependency 'dotenv', '~> 2.1', '>= 2.1.0'
22
- s.add_dependency 'faraday', '~> 0.9', '>= 0.9'
23
- s.add_dependency 'faraday_middleware', '~> 0', '>= 0'
24
- s.add_dependency 'faraday_middleware-oauth2_refresh', '~> 0'
25
- s.add_dependency 'jsondoc', '~> 0.1', '>= 0.1.0'
26
- s.add_dependency 'mime', '~> 0.4', '>= 0.4.3'
27
- s.add_dependency 'mime-types', '~> 1.25' # >= 1.9 '~> 2.5', '>= 2.5'
28
- s.add_dependency 'mime_builder', '~> 0'
29
- s.add_dependency 'multi_json', '~> 1.3'
30
- s.add_dependency 'oauth2', '~> 1.0', '>= 1.0.0'
31
- s.add_dependency 'pubnub', '~> 3.8', '>= 3.8.0'
32
- s.add_dependency 'timers', '~> 4.1'
33
- end