lita-ringcentral 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -1
- data/CHANGELOG.md +3 -0
- data/{LICENSE.txt → LICENSE.md} +0 -0
- data/README.md +17 -14
- data/lib/lita/adapters/ringcentral/connector.rb +7 -3
- data/lita-ringcentral.gemspec +12 -12
- metadata +53 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a082f90dd6f2a5cf6e3a7c4b5cc1a232000c9fb1
|
4
|
+
data.tar.gz: f101dcf725e35f03af874ffd916d31e4d8ed12f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d08fd484e61ea4f9bab9b2bf2b0a6793689809ca49cbb505051ca926cba8f4eb956014669043a6be4a49d079edbbd1952d9c92e74c7752371a45665c6ea38bb8
|
7
|
+
data.tar.gz: 1b26546deb2bfae045fcf55ac70f704e3bca3506429b2401afa0235e7544ebbef69da861da755c5a04a918bee20a4c492e829703d02eff08a1e10e05eb6c462a
|
data/.travis.yml
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
language: ruby
|
2
2
|
sudo: false
|
3
3
|
cache: bundler
|
4
|
+
|
4
5
|
rvm:
|
5
|
-
- 2.3.
|
6
|
+
- 2.3.3
|
6
7
|
- 2.2.2
|
8
|
+
|
7
9
|
script: bundle exec rspec
|
10
|
+
|
8
11
|
before_install:
|
9
12
|
- gem update --system
|
10
13
|
- gem update bundler
|
14
|
+
|
11
15
|
services:
|
12
16
|
- redis-server
|
17
|
+
|
13
18
|
notifications:
|
14
19
|
email: false
|
data/CHANGELOG.md
CHANGED
data/{LICENSE.txt → LICENSE.md}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@ Lita RingCentral Adapter
|
|
5
5
|
[![Build Status][build-status-svg]][build-status-link]
|
6
6
|
[![Coverage Status][coverage-status-svg]][coverage-status-link]
|
7
7
|
[![Dependency Status][dependency-status-svg]][dependency-status-link]
|
8
|
+
[![Codacy Badge][codacy-svg]][codacy-link]
|
8
9
|
[![Code Climate][codeclimate-status-svg]][codeclimate-status-link]
|
9
10
|
[![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-link]
|
10
11
|
[![Downloads][downloads-svg]][downloads-link]
|
@@ -66,7 +67,7 @@ See [CHANGELOG.md](CHANGELOG.md)
|
|
66
67
|
|
67
68
|
Project Repo
|
68
69
|
|
69
|
-
* https://github.com/
|
70
|
+
* https://github.com/ringcentral-ruby/lita-ringcentral
|
70
71
|
|
71
72
|
Lita
|
72
73
|
|
@@ -74,7 +75,7 @@ Lita
|
|
74
75
|
|
75
76
|
## Contributing
|
76
77
|
|
77
|
-
1. Fork it ( http://github.com/
|
78
|
+
1. Fork it ( http://github.com/ringcentral-ruby/lita-ringcentral/fork )
|
78
79
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
79
80
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
80
81
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -82,7 +83,7 @@ Lita
|
|
82
83
|
|
83
84
|
## License
|
84
85
|
|
85
|
-
Lita RingCentral Adapter is available under the MIT license. See [LICENSE.
|
86
|
+
Lita RingCentral Adapter is available under the MIT license. See [LICENSE.md](LICENSE.md) for details.
|
86
87
|
|
87
88
|
Lita RingCentral Adapter © 2016 by John Wang
|
88
89
|
|
@@ -90,17 +91,19 @@ Lita RingCentral Adapter © 2016 by John Wang
|
|
90
91
|
[gem-version-link]: http://badge.fury.io/rb/lita-ringcentral
|
91
92
|
[downloads-svg]: http://ruby-gem-downloads-badge.herokuapp.com/lita-ringcentral
|
92
93
|
[downloads-link]: https://rubygems.org/gems/lita-ringcentral
|
93
|
-
[build-status-svg]: https://api.travis-ci.org/
|
94
|
-
[build-status-link]: https://travis-ci.org/
|
95
|
-
[coverage-status-svg]: https://coveralls.io/repos/
|
96
|
-
[coverage-status-link]: https://coveralls.io/r/
|
97
|
-
[dependency-status-svg]: https://gemnasium.com/
|
98
|
-
[dependency-status-link]: https://gemnasium.com/
|
99
|
-
[
|
100
|
-
[
|
101
|
-
[
|
102
|
-
[
|
94
|
+
[build-status-svg]: https://api.travis-ci.org/ringcentral-ruby/lita-ringcentral.svg?branch=master
|
95
|
+
[build-status-link]: https://travis-ci.org/ringcentral-ruby/lita-ringcentral
|
96
|
+
[coverage-status-svg]: https://coveralls.io/repos/ringcentral-ruby/lita-ringcentral/badge.svg?branch=master
|
97
|
+
[coverage-status-link]: https://coveralls.io/r/ringcentral-ruby/lita-ringcentral?branch=master
|
98
|
+
[dependency-status-svg]: https://gemnasium.com/ringcentral-ruby/lita-ringcentral.svg
|
99
|
+
[dependency-status-link]: https://gemnasium.com/ringcentral-ruby/lita-ringcentral
|
100
|
+
[codacy-svg]: https://api.codacy.com/project/badge/Grade/7e769fa345eb4713ade44ef0e7e882fb
|
101
|
+
[codacy-link]: https://www.codacy.com/app/ringcentral-ruby/lita-ringcentral
|
102
|
+
[codeclimate-status-svg]: https://codeclimate.com/github/ringcentral-ruby/lita-ringcentral/badges/gpa.svg
|
103
|
+
[codeclimate-status-link]: https://codeclimate.com/github/ringcentral-ruby/lita-ringcentral
|
104
|
+
[scrutinizer-status-svg]: https://scrutinizer-ci.com/g/ringcentral-ruby/lita-ringcentral/badges/quality-score.png?b=master
|
105
|
+
[scrutinizer-status-link]: https://scrutinizer-ci.com/g/ringcentral-ruby/lita-ringcentral/?branch=master
|
103
106
|
[docs-rubydoc-svg]: https://img.shields.io/badge/docs-rubydoc-blue.svg
|
104
107
|
[docs-rubydoc-link]: http://www.rubydoc.info/gems/lita-ringcentral/
|
105
108
|
[license-svg]: https://img.shields.io/badge/license-MIT-blue.svg
|
106
|
-
[license-link]: https://github.com/
|
109
|
+
[license-link]: https://github.com/ringcentral-ruby/lita-ringcentral/blob/master/LICENSE.md
|
@@ -7,9 +7,14 @@ module Lita
|
|
7
7
|
class Connector
|
8
8
|
attr_reader :robot, :client
|
9
9
|
|
10
|
-
def initialize(robot, app_key, app_secret, server, username, extension, password, token, sms_number
|
10
|
+
def initialize(robot, app_key, app_secret, server, username, extension, password, token, sms_number)
|
11
11
|
@robot = robot
|
12
|
-
@client = RingCentralSdk.new
|
12
|
+
@client = RingCentralSdk::REST::Client.new do |config|
|
13
|
+
config.server_url = server
|
14
|
+
config.app_key = app_key
|
15
|
+
config.app_secret = app_secret
|
16
|
+
config.logger = Lita.logger
|
17
|
+
end
|
13
18
|
@username = username
|
14
19
|
@extension = extension
|
15
20
|
@password = password
|
@@ -50,7 +55,6 @@ module Lita
|
|
50
55
|
)
|
51
56
|
end
|
52
57
|
end
|
53
|
-
|
54
58
|
end
|
55
59
|
end
|
56
60
|
end
|
data/lita-ringcentral.gemspec
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-ringcentral'
|
3
|
-
spec.date = '2016-
|
4
|
-
spec.version = '0.0
|
3
|
+
spec.date = '2016-12-31'
|
4
|
+
spec.version = '0.1.0'
|
5
5
|
spec.authors = ['John Wang']
|
6
6
|
spec.email = ["johncwang@gmail.com"]
|
7
7
|
spec.description = %q{A RingCentral SMS adapter for Lita.}
|
8
8
|
spec.summary = %q{A RingCentral SMS adapter for the Lita chat robot.}
|
9
|
-
spec.homepage = 'https://github.com/
|
9
|
+
spec.homepage = 'https://github.com/ringcentral-ruby'
|
10
10
|
spec.license = 'MIT'
|
11
11
|
spec.metadata = { 'lita_plugin_type' => 'adapter' }
|
12
12
|
|
13
13
|
spec.files = `git ls-files`.split($/)
|
14
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename
|
14
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename f }
|
15
15
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
16
|
spec.require_paths = ['lib']
|
17
17
|
|
18
|
-
spec.add_runtime_dependency 'lita', '>= 4.4.3'
|
19
|
-
spec.add_runtime_dependency 'ringcentral_sdk', '>=
|
18
|
+
spec.add_runtime_dependency 'lita', '~> 4.4', '>= 4.4.3'
|
19
|
+
spec.add_runtime_dependency 'ringcentral_sdk', '~> 2.0', '>= 2.0.3'
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
-
spec.add_development_dependency 'pry-byebug'
|
23
|
-
spec.add_development_dependency 'rack-test'
|
24
|
-
spec.add_development_dependency 'rake'
|
25
|
-
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
26
|
-
spec.add_development_dependency 'simplecov', '>= 0.9.2'
|
27
|
-
spec.add_development_dependency 'coveralls'
|
22
|
+
spec.add_development_dependency 'pry-byebug', '~> 3', '>= 3.4.2'
|
23
|
+
spec.add_development_dependency 'rack-test', '~> 0', '>= 0.6.3'
|
24
|
+
spec.add_development_dependency 'rake', '~> 12'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0', '>= 3.0.0'
|
26
|
+
spec.add_development_dependency 'simplecov', '~> 0', '>= 0.9.2'
|
27
|
+
spec.add_development_dependency 'coveralls', '~> 0'
|
28
28
|
end
|
metadata
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-ringcentral
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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-
|
11
|
+
date: 2016-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.4'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 4.4.3
|
@@ -21,6 +24,9 @@ dependencies:
|
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '4.4'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 4.4.3
|
@@ -28,16 +34,22 @@ dependencies:
|
|
28
34
|
name: ringcentral_sdk
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.0'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
42
|
+
version: 2.0.3
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '2.0'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
52
|
+
version: 2.0.3
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: bundler
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,48 +68,63 @@ dependencies:
|
|
56
68
|
name: pry-byebug
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '3'
|
59
74
|
- - ">="
|
60
75
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
76
|
+
version: 3.4.2
|
62
77
|
type: :development
|
63
78
|
prerelease: false
|
64
79
|
version_requirements: !ruby/object:Gem::Requirement
|
65
80
|
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '3'
|
66
84
|
- - ">="
|
67
85
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
86
|
+
version: 3.4.2
|
69
87
|
- !ruby/object:Gem::Dependency
|
70
88
|
name: rack-test
|
71
89
|
requirement: !ruby/object:Gem::Requirement
|
72
90
|
requirements:
|
73
|
-
- - "
|
91
|
+
- - "~>"
|
74
92
|
- !ruby/object:Gem::Version
|
75
93
|
version: '0'
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.6.3
|
76
97
|
type: :development
|
77
98
|
prerelease: false
|
78
99
|
version_requirements: !ruby/object:Gem::Requirement
|
79
100
|
requirements:
|
80
|
-
- - "
|
101
|
+
- - "~>"
|
81
102
|
- !ruby/object:Gem::Version
|
82
103
|
version: '0'
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 0.6.3
|
83
107
|
- !ruby/object:Gem::Dependency
|
84
108
|
name: rake
|
85
109
|
requirement: !ruby/object:Gem::Requirement
|
86
110
|
requirements:
|
87
|
-
- - "
|
111
|
+
- - "~>"
|
88
112
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
113
|
+
version: '12'
|
90
114
|
type: :development
|
91
115
|
prerelease: false
|
92
116
|
version_requirements: !ruby/object:Gem::Requirement
|
93
117
|
requirements:
|
94
|
-
- - "
|
118
|
+
- - "~>"
|
95
119
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
120
|
+
version: '12'
|
97
121
|
- !ruby/object:Gem::Dependency
|
98
122
|
name: rspec
|
99
123
|
requirement: !ruby/object:Gem::Requirement
|
100
124
|
requirements:
|
125
|
+
- - "~>"
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '3.0'
|
101
128
|
- - ">="
|
102
129
|
- !ruby/object:Gem::Version
|
103
130
|
version: 3.0.0
|
@@ -105,6 +132,9 @@ dependencies:
|
|
105
132
|
prerelease: false
|
106
133
|
version_requirements: !ruby/object:Gem::Requirement
|
107
134
|
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '3.0'
|
108
138
|
- - ">="
|
109
139
|
- !ruby/object:Gem::Version
|
110
140
|
version: 3.0.0
|
@@ -112,6 +142,9 @@ dependencies:
|
|
112
142
|
name: simplecov
|
113
143
|
requirement: !ruby/object:Gem::Requirement
|
114
144
|
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
115
148
|
- - ">="
|
116
149
|
- !ruby/object:Gem::Version
|
117
150
|
version: 0.9.2
|
@@ -119,6 +152,9 @@ dependencies:
|
|
119
152
|
prerelease: false
|
120
153
|
version_requirements: !ruby/object:Gem::Requirement
|
121
154
|
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
122
158
|
- - ">="
|
123
159
|
- !ruby/object:Gem::Version
|
124
160
|
version: 0.9.2
|
@@ -126,14 +162,14 @@ dependencies:
|
|
126
162
|
name: coveralls
|
127
163
|
requirement: !ruby/object:Gem::Requirement
|
128
164
|
requirements:
|
129
|
-
- - "
|
165
|
+
- - "~>"
|
130
166
|
- !ruby/object:Gem::Version
|
131
167
|
version: '0'
|
132
168
|
type: :development
|
133
169
|
prerelease: false
|
134
170
|
version_requirements: !ruby/object:Gem::Requirement
|
135
171
|
requirements:
|
136
|
-
- - "
|
172
|
+
- - "~>"
|
137
173
|
- !ruby/object:Gem::Version
|
138
174
|
version: '0'
|
139
175
|
description: A RingCentral SMS adapter for Lita.
|
@@ -149,7 +185,7 @@ files:
|
|
149
185
|
- ".travis.yml"
|
150
186
|
- CHANGELOG.md
|
151
187
|
- Gemfile
|
152
|
-
- LICENSE.
|
188
|
+
- LICENSE.md
|
153
189
|
- README.md
|
154
190
|
- Rakefile
|
155
191
|
- lib/lita-ringcentral.rb
|
@@ -160,7 +196,7 @@ files:
|
|
160
196
|
- locales/en.yml
|
161
197
|
- spec/lita/adapters/ringcentral_spec.rb
|
162
198
|
- spec/spec_helper.rb
|
163
|
-
homepage: https://github.com/
|
199
|
+
homepage: https://github.com/ringcentral-ruby
|
164
200
|
licenses:
|
165
201
|
- MIT
|
166
202
|
metadata:
|
@@ -181,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
217
|
version: '0'
|
182
218
|
requirements: []
|
183
219
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.5.
|
220
|
+
rubygems_version: 2.5.2
|
185
221
|
signing_key:
|
186
222
|
specification_version: 4
|
187
223
|
summary: A RingCentral SMS adapter for the Lita chat robot.
|