ringcentral_sdk 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +7 -3
- data/VERSION.txt +1 -1
- data/lib/ringcentral_sdk/helpers/fax.rb +15 -7
- data/lib/ringcentral_sdk/platform/platform.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95ea214f77faebf0d968b06c655e01eb6f2438df
|
4
|
+
data.tar.gz: 4f15d3dbe834d599bacb0ae0115d3972148ed496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f145704fcda7ad16687237c0e7e096c0de9c690543e1fdbc28b7b65cf0f86db5fa905857495f7bbd41f6c208f15c2dca6a983ff910f0dd0a6949b8b22457a88
|
7
|
+
data.tar.gz: 5a993b31c4c1e943fc54564411463eaee2e90288cf53039824ccdb4e2098ee2b8349e2eef68f8a75bad5f7243a87448447db462129802b6d3161faee73229791
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,7 @@ RingCentral SDK
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/ringcentral_sdk.svg)](http://badge.fury.io/rb/ringcentral_sdk)
|
5
5
|
[![Build Status](https://img.shields.io/travis/grokify/ringcentral-sdk-ruby/master.svg)](https://travis-ci.org/grokify/ringcentral-sdk-ruby)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/grokify/ringcentral-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/grokify/ringcentral-sdk-ruby)
|
7
|
+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/grokify/ringcentral-sdk-ruby/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/grokify/ringcentral-sdk-ruby/?branch=master)
|
7
8
|
[![Coverage Status](https://coveralls.io/repos/grokify/ringcentral-sdk-ruby/badge.svg?branch=master)](https://coveralls.io/r/grokify/ringcentral-sdk-ruby?branch=master)
|
8
9
|
[![Docs](https://img.shields.io/badge/docs-readthedocs-blue.svg)](http://ringcentral-sdk-ruby.readthedocs.org/)
|
9
10
|
[![Docs](https://img.shields.io/badge/docs-rubydoc-blue.svg)](http://www.rubydoc.info/gems/ringcentral_sdk/)
|
@@ -37,9 +38,9 @@ This SDK is an early stage library and subject to breaking changes.
|
|
37
38
|
|
38
39
|
### Included
|
39
40
|
|
40
|
-
* OAuth2 authorization & token refresh via INTRIDEA OAuth2::AccessToken
|
41
|
-
* Generic API requests handled via Faraday client
|
42
|
-
* Fax request helper to create multipart/mixed messages
|
41
|
+
* OAuth2 authorization & token refresh via INTRIDEA `OAuth2::AccessToken`
|
42
|
+
* Generic API requests handled via `Faraday` client
|
43
|
+
* Fax request helper to create `multipart/mixed` messages
|
43
44
|
* Docs via [Read the Docs](http://ringcentral-sdk-ruby.readthedocs.org/) and [RubyDoc](http://www.rubydoc.info/gems/ringcentral_sdk/)
|
44
45
|
|
45
46
|
### To Do
|
@@ -188,6 +189,9 @@ end
|
|
188
189
|
|
189
190
|
## Change Log
|
190
191
|
|
192
|
+
- **2015-05-31**: 0.1.2
|
193
|
+
- Add Ruby 1.8.7 support
|
194
|
+
- Add CI for Ruby 2.2.0 & 2.1.6: 2.2.2, 2.2.0, 2.1.6, 2.1.0, 2.0.0, 1.9.3, 1.8.7
|
191
195
|
- **2015-05-31**: 0.1.1
|
192
196
|
- Add Ruby 2.2.2 support
|
193
197
|
- **2015-05-31**: 0.1.0
|
data/VERSION.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -71,13 +71,7 @@ module RingCentralSdk::Helpers
|
|
71
71
|
|
72
72
|
def get_file_part(file_name=nil, content_type=nil, base64_encode=false)
|
73
73
|
|
74
|
-
|
75
|
-
raise "File \"#{file_name.to_s}\" does not exist or cannot be read"
|
76
|
-
end
|
77
|
-
|
78
|
-
file_bytes = RUBY_VERSION < '1.9' \
|
79
|
-
? File.open(file_name, 'rb') { |f| f.read } \
|
80
|
-
: File.open(file_name, 'rb:BINARY') { |f| f.read }
|
74
|
+
file_bytes = get_file_bytes(file_name)
|
81
75
|
|
82
76
|
file_part = base64_encode \
|
83
77
|
? MIME::Text.new(Base64.encode64(file_bytes)) \
|
@@ -90,6 +84,20 @@ module RingCentralSdk::Helpers
|
|
90
84
|
return file_part
|
91
85
|
end
|
92
86
|
|
87
|
+
def get_file_bytes(file_name=nil)
|
88
|
+
|
89
|
+
unless File.file?(file_name.to_s)
|
90
|
+
raise "File \"#{file_name.to_s}\" does not exist or cannot be read"
|
91
|
+
end
|
92
|
+
|
93
|
+
file_bytes = RUBY_VERSION < '1.9' \
|
94
|
+
? File.open(file_name, 'rb') { |f| f.read } \
|
95
|
+
: File.open(file_name, 'rb:BINARY') { |f| f.read }
|
96
|
+
|
97
|
+
return file_bytes
|
98
|
+
|
99
|
+
end
|
100
|
+
|
93
101
|
def get_file_content_type(file_name=nil, content_type=nil)
|
94
102
|
return (content_type.is_a?(String) && content_type =~ /^[^\/\s]+\/[^\/\s]+/) \
|
95
103
|
? content_type : MIME::Types.type_for(file_name).first.content_type || 'application/octet-stream'
|
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: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Wang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|