slack-api 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +2 -0
  3. data/.rspec +1 -1
  4. data/.travis.yml +5 -0
  5. data/Guardfile +13 -0
  6. data/README.md +4 -0
  7. data/Rakefile +11 -0
  8. data/lib/slack/request.rb +1 -1
  9. data/lib/slack/version.rb +1 -1
  10. data/slack.gemspec +7 -2
  11. data/spec/api_spec.rb +23 -0
  12. data/spec/auth_spec.rb +22 -0
  13. data/spec/channels_spec.rb +247 -0
  14. data/spec/spec_helper.rb +81 -2
  15. data/spec/vcr/Slack_Client/api/test/with_extra_arguments.yml +56 -0
  16. data/spec/vcr/Slack_Client/api/test/with_valid_token.yml +56 -0
  17. data/spec/vcr/Slack_Client/auth/test/with_invalid_token.yml +48 -0
  18. data/spec/vcr/Slack_Client/auth/test/with_valid_token.yml +58 -0
  19. data/spec/vcr/Slack_Client/channels/archive/with_name.yml +58 -0
  20. data/spec/vcr/Slack_Client/channels/create/with_taken_name.yml +58 -0
  21. data/spec/vcr/Slack_Client/channels/create/with_test_channel_name.yml +58 -0
  22. data/spec/vcr/Slack_Client/channels/history/with_name.yml +71 -0
  23. data/spec/vcr/Slack_Client/channels/info/with_name.yml +59 -0
  24. data/spec/vcr/Slack_Client/channels/invite/with_valid_arguments.yml +59 -0
  25. data/spec/vcr/Slack_Client/channels/invite/without_argument_channel_.yml +58 -0
  26. data/spec/vcr/Slack_Client/channels/join/with_name.yml +58 -0
  27. data/spec/vcr/Slack_Client/channels/kick/with_arguments.yml +58 -0
  28. data/spec/vcr/Slack_Client/channels/leave/with_channel.yml +58 -0
  29. data/spec/vcr/Slack_Client/channels/list/with_valid_token.yml +63 -0
  30. data/spec/vcr/Slack_Client/channels/mark/with_argument.yml +58 -0
  31. data/spec/vcr/Slack_Client/channels/rename/with_name.yml +58 -0
  32. data/spec/vcr/Slack_Client/channels/setPurpose/with_arguments.yml +58 -0
  33. data/spec/vcr/Slack_Client/channels/setTopic/with_arguments.yml +58 -0
  34. data/spec/vcr/Slack_Client/channels/unarchive/with_channel.yml +58 -0
  35. metadata +129 -10
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://slack.com/api/channels.rename
6
+ body:
7
+ encoding: UTF-8
8
+ string: channel=C044H6VHF&name=gem_testroom2&token=<TOKEN>
9
+ headers:
10
+ Accept:
11
+ - application/json; charset=utf-8
12
+ User-Agent:
13
+ - Slack Ruby Gem 1.1.1
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Cache-Control:
26
+ - private, no-cache, no-store, must-revalidate
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Wed, 06 May 2015 00:09:24 GMT
31
+ Expires:
32
+ - Mon, 26 Jul 1997 05:00:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Strict-Transport-Security:
38
+ - max-age=31536000; includeSubDomains; preload
39
+ Vary:
40
+ - Accept-Encoding
41
+ X-Accepted-Oauth-Scopes:
42
+ - post
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Oauth-Scopes:
46
+ - identify,read,post,client,admin
47
+ X-Xss-Protection:
48
+ - '0'
49
+ Content-Length:
50
+ - '108'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"ok":true,"channel":{"id":"C044H6VHF","is_channel":true,"name":"gem_testroom2","created":1427155388}}'
56
+ http_version:
57
+ recorded_at: Wed, 06 May 2015 00:09:24 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://slack.com/api/channels.setPurpose
6
+ body:
7
+ encoding: UTF-8
8
+ string: channel=C04MY3KCY&purpose=TestPurpose&token=<TOKEN>
9
+ headers:
10
+ Accept:
11
+ - application/json; charset=utf-8
12
+ User-Agent:
13
+ - Slack Ruby Gem 1.1.1
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Cache-Control:
26
+ - private, no-cache, no-store, must-revalidate
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Wed, 06 May 2015 00:23:44 GMT
31
+ Expires:
32
+ - Mon, 26 Jul 1997 05:00:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Strict-Transport-Security:
38
+ - max-age=31536000; includeSubDomains; preload
39
+ Vary:
40
+ - Accept-Encoding
41
+ X-Accepted-Oauth-Scopes:
42
+ - post
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Oauth-Scopes:
46
+ - identify,read,post,client,admin
47
+ X-Xss-Protection:
48
+ - '0'
49
+ Content-Length:
50
+ - '49'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"ok":true,"purpose":"TestPurpose"}'
56
+ http_version:
57
+ recorded_at: Wed, 06 May 2015 00:23:44 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://slack.com/api/channels.setTopic
6
+ body:
7
+ encoding: UTF-8
8
+ string: channel=C04MY3KCY&token=<TOKEN>&topic=TestTopic
9
+ headers:
10
+ Accept:
11
+ - application/json; charset=utf-8
12
+ User-Agent:
13
+ - Slack Ruby Gem 1.1.1
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Cache-Control:
26
+ - private, no-cache, no-store, must-revalidate
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Wed, 06 May 2015 00:23:27 GMT
31
+ Expires:
32
+ - Mon, 26 Jul 1997 05:00:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Strict-Transport-Security:
38
+ - max-age=31536000; includeSubDomains; preload
39
+ Vary:
40
+ - Accept-Encoding
41
+ X-Accepted-Oauth-Scopes:
42
+ - post
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Oauth-Scopes:
46
+ - identify,read,post,client,admin
47
+ X-Xss-Protection:
48
+ - '0'
49
+ Content-Length:
50
+ - '47'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"ok":true,"topic":"TestTopic"}'
56
+ http_version:
57
+ recorded_at: Wed, 06 May 2015 00:23:27 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://slack.com/api/channels.unarchive
6
+ body:
7
+ encoding: UTF-8
8
+ string: channel=C04MY3KCY&token=<TOKEN>
9
+ headers:
10
+ Accept:
11
+ - application/json; charset=utf-8
12
+ User-Agent:
13
+ - Slack Ruby Gem 1.1.1
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Cache-Control:
26
+ - private, no-cache, no-store, must-revalidate
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Wed, 06 May 2015 00:20:07 GMT
31
+ Expires:
32
+ - Mon, 26 Jul 1997 05:00:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ Server:
36
+ - Apache
37
+ Strict-Transport-Security:
38
+ - max-age=31536000; includeSubDomains; preload
39
+ Vary:
40
+ - Accept-Encoding
41
+ X-Accepted-Oauth-Scopes:
42
+ - post
43
+ X-Content-Type-Options:
44
+ - nosniff
45
+ X-Oauth-Scopes:
46
+ - identify,read,post,client,admin
47
+ X-Xss-Protection:
48
+ - '0'
49
+ Content-Length:
50
+ - '31'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"ok":true}'
56
+ http_version:
57
+ recorded_at: Wed, 06 May 2015 00:20:07 GMT
58
+ recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - aki017
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,34 +24,104 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: simplecov
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: coveralls
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rspec
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - "~>"
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: '2.4'
61
+ version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - "~>"
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
- version: '2.4'
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: webmock
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
- - - "~>"
73
+ - - ">="
46
74
  - !ruby/object:Gem::Version
47
- version: '1.6'
75
+ version: '0'
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - "~>"
80
+ - - ">="
53
81
  - !ruby/object:Gem::Version
54
- version: '1.6'
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: vcr
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
55
125
  - !ruby/object:Gem::Dependency
56
126
  name: rake
57
127
  requirement: !ruby/object:Gem::Requirement
@@ -183,10 +253,13 @@ executables: []
183
253
  extensions: []
184
254
  extra_rdoc_files: []
185
255
  files:
256
+ - ".coveralls.yml"
186
257
  - ".gitignore"
187
258
  - ".gitmodules"
188
259
  - ".rspec"
260
+ - ".travis.yml"
189
261
  - Gemfile
262
+ - Guardfile
190
263
  - LICENSE.txt
191
264
  - README.md
192
265
  - Rakefile
@@ -219,7 +292,30 @@ files:
219
292
  - lib/slack/request.rb
220
293
  - lib/slack/version.rb
221
294
  - slack.gemspec
295
+ - spec/api_spec.rb
296
+ - spec/auth_spec.rb
297
+ - spec/channels_spec.rb
222
298
  - spec/spec_helper.rb
299
+ - spec/vcr/Slack_Client/api/test/with_extra_arguments.yml
300
+ - spec/vcr/Slack_Client/api/test/with_valid_token.yml
301
+ - spec/vcr/Slack_Client/auth/test/with_invalid_token.yml
302
+ - spec/vcr/Slack_Client/auth/test/with_valid_token.yml
303
+ - spec/vcr/Slack_Client/channels/archive/with_name.yml
304
+ - spec/vcr/Slack_Client/channels/create/with_taken_name.yml
305
+ - spec/vcr/Slack_Client/channels/create/with_test_channel_name.yml
306
+ - spec/vcr/Slack_Client/channels/history/with_name.yml
307
+ - spec/vcr/Slack_Client/channels/info/with_name.yml
308
+ - spec/vcr/Slack_Client/channels/invite/with_valid_arguments.yml
309
+ - spec/vcr/Slack_Client/channels/invite/without_argument_channel_.yml
310
+ - spec/vcr/Slack_Client/channels/join/with_name.yml
311
+ - spec/vcr/Slack_Client/channels/kick/with_arguments.yml
312
+ - spec/vcr/Slack_Client/channels/leave/with_channel.yml
313
+ - spec/vcr/Slack_Client/channels/list/with_valid_token.yml
314
+ - spec/vcr/Slack_Client/channels/mark/with_argument.yml
315
+ - spec/vcr/Slack_Client/channels/rename/with_name.yml
316
+ - spec/vcr/Slack_Client/channels/setPurpose/with_arguments.yml
317
+ - spec/vcr/Slack_Client/channels/setTopic/with_arguments.yml
318
+ - spec/vcr/Slack_Client/channels/unarchive/with_channel.yml
223
319
  homepage: https://github.com/aki017/slack-ruby-gem
224
320
  licenses:
225
321
  - MIT
@@ -245,4 +341,27 @@ signing_key:
245
341
  specification_version: 4
246
342
  summary: A Ruby wrapper for the Slack API
247
343
  test_files:
344
+ - spec/api_spec.rb
345
+ - spec/auth_spec.rb
346
+ - spec/channels_spec.rb
248
347
  - spec/spec_helper.rb
348
+ - spec/vcr/Slack_Client/api/test/with_extra_arguments.yml
349
+ - spec/vcr/Slack_Client/api/test/with_valid_token.yml
350
+ - spec/vcr/Slack_Client/auth/test/with_invalid_token.yml
351
+ - spec/vcr/Slack_Client/auth/test/with_valid_token.yml
352
+ - spec/vcr/Slack_Client/channels/archive/with_name.yml
353
+ - spec/vcr/Slack_Client/channels/create/with_taken_name.yml
354
+ - spec/vcr/Slack_Client/channels/create/with_test_channel_name.yml
355
+ - spec/vcr/Slack_Client/channels/history/with_name.yml
356
+ - spec/vcr/Slack_Client/channels/info/with_name.yml
357
+ - spec/vcr/Slack_Client/channels/invite/with_valid_arguments.yml
358
+ - spec/vcr/Slack_Client/channels/invite/without_argument_channel_.yml
359
+ - spec/vcr/Slack_Client/channels/join/with_name.yml
360
+ - spec/vcr/Slack_Client/channels/kick/with_arguments.yml
361
+ - spec/vcr/Slack_Client/channels/leave/with_channel.yml
362
+ - spec/vcr/Slack_Client/channels/list/with_valid_token.yml
363
+ - spec/vcr/Slack_Client/channels/mark/with_argument.yml
364
+ - spec/vcr/Slack_Client/channels/rename/with_name.yml
365
+ - spec/vcr/Slack_Client/channels/setPurpose/with_arguments.yml
366
+ - spec/vcr/Slack_Client/channels/setTopic/with_arguments.yml
367
+ - spec/vcr/Slack_Client/channels/unarchive/with_channel.yml