slack-rtmapi 1.0.0.rc3 → 1.0.0.rc4

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: 2e5e90050638a0d2937d6401f0324edd7b640c25
4
- data.tar.gz: 254f9e04c95f69c97d2dc1c7ae14bbecf34ff8a0
3
+ metadata.gz: d545c58e782fcfd5e98c9f50738e3232aa352207
4
+ data.tar.gz: 086b9530fbc3a34889f748db5123e098abbc6a38
5
5
  SHA512:
6
- metadata.gz: 08f0c3f7f0cdc5543bfaf84ab3204143f8c9f4d201a54f57a8fc053a9ae7c5e017b94da6e6a84dbbf5b6f14439d528576bc6f1172af9786a4e7de60f6d71baf7
7
- data.tar.gz: 42f0f27d1ce6661617e3aef01af836923059f1e021a0d85423bb6cc97b3e21007a62ada8732b5873b2a94b032681311510aa3d5e2765dd6aad87d64c5f4780cc
6
+ metadata.gz: bc51717f2cf79fb33e531b20537b95d9fd009afb57b3e12d7a87d577cf8b2495a121a57e4d70ca4f840aced41f4d2a03df3292d6550a3a52881007dad52a8807
7
+ data.tar.gz: b6735f0e9801724a6fddd51c4ee6ad217a037b374aefc084def6fc6321a9481f7f5f29833d001c9054c62e8e852097d0140e23cb2e1febb5337b3249fbee95d9
data/.gitignore CHANGED
@@ -26,9 +26,9 @@ build/
26
26
 
27
27
  # for a library or gem, you might want to ignore these files since the code is
28
28
  # intended to run in multiple environments; otherwise, check them in:
29
- # Gemfile.lock
30
- # .ruby-version
31
- # .ruby-gemset
29
+ Gemfile.lock
30
+ .ruby-version
31
+ .ruby-gemset
32
32
 
33
33
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
34
  .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in slack-rtmapi.gemspec
4
+ gemspec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  slack-rtmapi
2
2
  ============
3
+ [![Code Climate](https://codeclimate.com/github/mackwic/slack-rtmapi/badges/gpa.svg)](https://codeclimate.com/github/mackwic/slack-rtmapi)
4
+ [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mackwic/slack-rtmapi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3
5
 
4
6
  All you need to use the RTM api of Slack
5
7
 
@@ -9,6 +11,8 @@ If you need a licence, please contact me and I will respond within the 24 hours.
9
11
  HOW TO USE
10
12
  ----------
11
13
 
14
+ First, install the gem: `gem install slack-rtmapi`.
15
+
12
16
  ```ruby
13
17
  require 'slack-rtmapi'
14
18
 
@@ -21,6 +25,16 @@ client.send {type: 'hello'}
21
25
  client.main_loop
22
26
  assert false # never ending loop
23
27
  ```
28
+ Slack-rtmapi is very hackable and configurable. More documentation will come soon (especially Rails integration), with helpers for integrations with the usual engines (EventMachine and Rack are planned, maybe Celluloid).
29
+ Stay tuned and follow the ongoing [_Dead Simple_ serie](https://github.com/mackwic/slack-rtmapi/wiki) on the wiki !
30
+
31
+ As always, pull request welcome, we are very contributor friendly.
24
32
 
25
33
  For more informations about the Slack Real Time API, please check https://api.slack.com/rtm
26
34
 
35
+ Contributors
36
+ ------------
37
+ - [mackwic](https://github.com/mackwic)
38
+ - [zipkid](https://github.com/zipkid)
39
+
40
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -1,7 +1,7 @@
1
1
  require_relative "slack-rtmapi/client"
2
2
  require_relative "slack-rtmapi/version"
3
3
 
4
- require 'JSON'
4
+ require 'json'
5
5
  require 'net/http'
6
6
 
7
7
  module SlackRTM
@@ -1,5 +1,5 @@
1
1
 
2
- require 'JSON'
2
+ require 'json'
3
3
  require 'socket'
4
4
  require 'websocket/driver'
5
5
 
@@ -88,7 +88,7 @@ module SlackRTM
88
88
  return if data.nil? or data.empty?
89
89
 
90
90
  @driver.parse data
91
- @msg_queue.each {|msg| driver.text msg}
91
+ @msg_queue.each {|msg| @driver.text msg}
92
92
  @msg_queue.clear
93
93
  end
94
94
 
@@ -1,3 +1,3 @@
1
1
  module SlackRTM
2
- VERSION = "1.0.0.rc3"
2
+ VERSION = "1.0.0.rc4"
3
3
  end
@@ -1,27 +1,30 @@
1
+ # coding: utf-8
1
2
 
2
- require_relative "lib/slack-rtmapi/version"
3
+ require_relative 'lib/slack-rtmapi/version'
3
4
 
4
5
  Gem::Specification.new do |s|
5
6
  s.name = 'slack-rtmapi'
6
7
  s.version = SlackRTM::VERSION
7
- s.authors = ["mackwic"]
8
- s.email = ["mackwic@gmail.com"]
9
- s.summary = "Naive wrapper for the Slack RTM api"
8
+ s.authors = ['mackwic']
9
+ s.email = ['mackwic@gmail.com']
10
+ s.summary = 'Naive wrapper for the Slack RTM api'
10
11
  s.description = "slack-rtmapi is dumb: no EventMachine, no Celluloid, no Actor
11
12
  design pattern, no thread pool (thought, any of those would be trivial to add).
12
13
  It's a simple blocking loop on top of a SSL socket with a websocket decoder.
13
14
  Minimal dependency. Works out of the box. Hackable. Composable.
14
-
15
+
15
16
  Oh, by the way, it implements very well the Slack API."
16
- s.homepage = "https://github.com/mackwic/slack-rtmapi"
17
- s.license = "GPLv3"
17
+ s.homepage = 'https://github.com/mackwic/slack-rtmapi'
18
+ s.license = 'GPLv3'
18
19
 
19
20
  s.files = `git ls-files -z`.split("\x0")
20
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
- s.test_files = s.files.grep(%r{^(test|s|features)/})
22
- s.require_paths = ["lib"]
23
-
21
+ s.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
22
+ s.test_files = s.files.grep(/^(test|spec|features)\//)
23
+ s.require_paths = ['lib']
24
+
24
25
  dev_dep = %w(
26
+ bundler
27
+ rake
25
28
  colored
26
29
  )
27
30
 
@@ -29,6 +32,6 @@ Oh, by the way, it implements very well the Slack API."
29
32
  websocket-driver
30
33
  )
31
34
 
32
- dev_dep.each {|d| s.add_development_dependency d}
33
- run_dep.each {|d| s.add_runtime_dependency d}
35
+ dev_dep.each { |d| s.add_development_dependency d }
36
+ run_dep.each { |d| s.add_runtime_dependency d }
34
37
  end
metadata CHANGED
@@ -1,58 +1,90 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-rtmapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc3
4
+ version: 1.0.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - mackwic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-28 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
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'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: colored
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
- - - '>='
45
+ - - ">="
18
46
  - !ruby/object:Gem::Version
19
47
  version: '0'
20
48
  type: :development
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
- - - '>='
52
+ - - ">="
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: websocket-driver
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - '>='
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
61
  version: '0'
34
62
  type: :runtime
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - '>='
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
68
  version: '0'
41
- description: "slack-rtmapi is dumb: no EventMachine, no Celluloid, no Actor\ndesign
42
- pattern, no thread pool (thought, any of those would be trivial to add).\nIt's a
43
- simple blocking loop on top of a SSL socket with a websocket decoder.\nMinimal dependency.
44
- Works out of the box. Hackable. Composable.\n \nOh, by the way, it implements very
45
- well the Slack API."
69
+ description: |-
70
+ slack-rtmapi is dumb: no EventMachine, no Celluloid, no Actor
71
+ design pattern, no thread pool (thought, any of those would be trivial to add).
72
+ It's a simple blocking loop on top of a SSL socket with a websocket decoder.
73
+ Minimal dependency. Works out of the box. Hackable. Composable.
74
+
75
+ Oh, by the way, it implements very well the Slack API.
46
76
  email:
47
77
  - mackwic@gmail.com
48
78
  executables: []
49
79
  extensions: []
50
80
  extra_rdoc_files: []
51
81
  files:
52
- - .gitignore
53
- - .local.vimrc
82
+ - ".gitignore"
83
+ - ".local.vimrc"
84
+ - Gemfile
54
85
  - LICENSE
55
86
  - README.md
87
+ - Rakefile
56
88
  - lib/slack-rtmapi.rb
57
89
  - lib/slack-rtmapi/client.rb
58
90
  - lib/slack-rtmapi/version.rb
@@ -67,17 +99,17 @@ require_paths:
67
99
  - lib
68
100
  required_ruby_version: !ruby/object:Gem::Requirement
69
101
  requirements:
70
- - - '>='
102
+ - - ">="
71
103
  - !ruby/object:Gem::Version
72
104
  version: '0'
73
105
  required_rubygems_version: !ruby/object:Gem::Requirement
74
106
  requirements:
75
- - - '>'
107
+ - - ">"
76
108
  - !ruby/object:Gem::Version
77
109
  version: 1.3.1
78
110
  requirements: []
79
111
  rubyforge_project:
80
- rubygems_version: 2.0.14
112
+ rubygems_version: 2.2.2
81
113
  signing_key:
82
114
  specification_version: 4
83
115
  summary: Naive wrapper for the Slack RTM api