ruboty-twitter 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/ruboty/adapters/twitter.rb +3 -11
- data/lib/ruboty/twitter/version.rb +1 -1
- data/ruboty-twitter.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 068eb5924c62fb807884d13e940f99c6d3473206
|
4
|
+
data.tar.gz: 1633c0ab9edff3e66b4b6c86ccd0c623c1bbbfaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18c5d74679c8f8d91d3d93eacaec0c6f24ad41e1fb3e475441aa206ac6874cdb3376f786987f9fcd025201c2e6578ebb6fca78a8666249ede2b37948c204b252
|
7
|
+
data.tar.gz: 8803438f8a7530588c9edc21942eacff6075afcf5282b5569f7e226b85ae37373dbdfdac132aac0a9e3c50bd3de9c9cde9e3b94a3bd4b1e57b86fd5ef2453fb0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "active_support/core_ext/object/try"
|
1
2
|
require "mem"
|
2
3
|
require "twitter"
|
3
4
|
|
@@ -17,17 +18,7 @@ module Ruboty
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def say(message)
|
20
|
-
|
21
|
-
when String
|
22
|
-
body = message
|
23
|
-
when Hash
|
24
|
-
body = message[:body]
|
25
|
-
if tweet = message[:original][:tweet]
|
26
|
-
options = { in_reply_to_status_id: tweet.id }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
client.update(body, options)
|
21
|
+
client.update(message[:body], in_reply_to_status_id: message[:original][:tweet].try(:id))
|
31
22
|
end
|
32
23
|
|
33
24
|
private
|
@@ -36,6 +27,7 @@ module Ruboty
|
|
36
27
|
stream.user do |tweet|
|
37
28
|
case tweet
|
38
29
|
when ::Twitter::Tweet
|
30
|
+
Ruboty.logger.debug("@#{tweet.user.screen_name}: #{tweet.text}")
|
39
31
|
robot.receive(
|
40
32
|
body: tweet.text,
|
41
33
|
from: tweet.user.screen_name,
|
data/ruboty-twitter.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
+
spec.add_dependency "activesupport"
|
19
20
|
spec.add_dependency "ruboty"
|
20
21
|
spec.add_dependency "twitter", ">= 5.0.0"
|
21
22
|
spec.add_development_dependency "bundler", "~> 1.6"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-twitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: ruboty
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
117
|
version: '0'
|
104
118
|
requirements: []
|
105
119
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.4.5
|
107
121
|
signing_key:
|
108
122
|
specification_version: 4
|
109
123
|
summary: An ruboty adapter for twitter.
|