twitter_ebooks 3.0.2 → 3.0.3

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: b1653168f35eb5cda95944202507474e06124058
4
- data.tar.gz: 702e6a68681f85195b296cc514f9754fd46118ed
3
+ metadata.gz: 206d0e6e7f5fb3962d24ce7d78d392006a290517
4
+ data.tar.gz: e2c0336864192d5cb7fac79cca8f0147cafc4c12
5
5
  SHA512:
6
- metadata.gz: 476ed9ec5398f779b3f636ebf1c5cb439fa7c88523846f7c01b8564175f1a2ff14f4da67f7f3751014e755539b2ecdbf302a60a0d87990b19f6d6a931a3d8b22
7
- data.tar.gz: b9b0ea74a8c0ca546ae176f9495921edcebd6ddfb21dd8dc5148e0057642032d4257740e9acef8d428ce2ebd89fc7884aeb91f8f55ec1d39765fb940feea7873
6
+ metadata.gz: 8bc2d3f85787b1522612a8016a2b2cb82d61de225127870d01f8ff27e0bf829f9d117534bfe41e887785e6ff358cfe868377f79d12c2dba2621f0d68d2576362
7
+ data.tar.gz: 2b93d261698dc973aff5fbfc32da5475de4d25873d9f568a08f53e51e633958d44b697ba1125d911ffae612f73ece27406f832a6312b3c6febb653e44bcbc978
data/README.md CHANGED
@@ -54,34 +54,34 @@ class MyBot < Ebooks::Bot
54
54
  scheduler.every '24h' do
55
55
  # Tweet something every 24 hours
56
56
  # See https://github.com/jmettraux/rufus-scheduler
57
- # bot.tweet("hi")
58
- # bot.pictweet("hi", "cuteselfie.jpg")
57
+ # tweet("hi")
58
+ # pictweet("hi", "cuteselfie.jpg")
59
59
  end
60
60
  end
61
61
 
62
62
  def on_message(dm)
63
63
  # Reply to a DM
64
- # bot.reply(dm, "secret secrets")
64
+ # reply(dm, "secret secrets")
65
65
  end
66
66
 
67
67
  def on_follow(user)
68
68
  # Follow a user back
69
- # bot.follow(user[:screen_name])
69
+ # follow(user.screen_name)
70
70
  end
71
71
 
72
72
  def on_mention(tweet)
73
73
  # Reply to a mention
74
- # bot.reply(tweet, meta(tweet)[:reply_prefix] + "oh hullo")
74
+ # reply(tweet, meta(tweet).reply_prefix + "oh hullo")
75
75
  end
76
76
 
77
77
  def on_timeline(tweet)
78
78
  # Reply to a tweet in the bot's timeline
79
- # bot.reply(tweet, meta(tweet)[:reply_prefix] + "nice tweet")
79
+ # reply(tweet, meta(tweet).reply_prefix + "nice tweet")
80
80
  end
81
81
  end
82
82
 
83
83
  # Make a MyBot and attach it to an account
84
- MyBot.new("{{BOT_NAME}}") do |bot|
84
+ MyBot.new("abby_ebooks") do |bot|
85
85
  bot.access_token = "" # Token connecting the app to this account
86
86
  bot.access_token_secret = "" # Secret connecting the app to this account
87
87
  end
@@ -70,7 +70,7 @@ module Ebooks
70
70
  # - The tweet mentions list contains our username
71
71
  # - The tweet is not being retweeted by somebody else
72
72
  # - Or soft-retweeted by somebody else
73
- @mentions.map(&:downcase).include?(@bot.username.downcase) && !@tweet.retweeted_status? && !@tweet.text.start_with?('RT ')
73
+ @mentions.map(&:downcase).include?(@bot.username.downcase) && !@tweet.retweeted_status? && !@tweet.text.match(/([`'‘’"“”]|RT|via|by|from)\s*@/i)
74
74
  end
75
75
 
76
76
  # @param bot [Ebooks::Bot]
@@ -1,3 +1,3 @@
1
1
  module Ebooks
2
- VERSION = "3.0.2"
2
+ VERSION = "3.0.3"
3
3
  end
data/skeleton/bots.rb CHANGED
@@ -22,29 +22,29 @@ class MyBot < Ebooks::Bot
22
22
  scheduler.every '24h' do
23
23
  # Tweet something every 24 hours
24
24
  # See https://github.com/jmettraux/rufus-scheduler
25
- # bot.tweet("hi")
26
- # bot.pictweet("hi", "cuteselfie.jpg")
25
+ # tweet("hi")
26
+ # pictweet("hi", "cuteselfie.jpg")
27
27
  end
28
28
  end
29
29
 
30
30
  def on_message(dm)
31
31
  # Reply to a DM
32
- # bot.reply(dm, "secret secrets")
32
+ # reply(dm, "secret secrets")
33
33
  end
34
34
 
35
35
  def on_follow(user)
36
36
  # Follow a user back
37
- # bot.follow(user[:screen_name])
37
+ # follow(user.screen_name)
38
38
  end
39
39
 
40
40
  def on_mention(tweet)
41
41
  # Reply to a mention
42
- # bot.reply(tweet, meta(tweet)[:reply_prefix] + "oh hullo")
42
+ # reply(tweet, meta(tweet).reply_prefix + "oh hullo")
43
43
  end
44
44
 
45
45
  def on_timeline(tweet)
46
46
  # Reply to a tweet in the bot's timeline
47
- # bot.reply(tweet, meta(tweet)[:reply_prefix] + "nice tweet")
47
+ # reply(tweet, meta(tweet).reply_prefix + "nice tweet")
48
48
  end
49
49
  end
50
50
 
@@ -23,7 +23,6 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency 'yard'
24
24
 
25
25
  gem.add_runtime_dependency 'twitter', '~> 5.0'
26
- gem.add_runtime_dependency 'simple_oauth'
27
26
  gem.add_runtime_dependency 'eventmachine', '~> 1.0.3'
28
27
  gem.add_runtime_dependency 'rufus-scheduler'
29
28
  gem.add_runtime_dependency 'gingerice'
@@ -32,4 +31,5 @@ Gem::Specification.new do |gem|
32
31
  gem.add_runtime_dependency 'fast-stemmer'
33
32
  gem.add_runtime_dependency 'highscore'
34
33
  gem.add_runtime_dependency 'pry'
34
+ gem.add_runtime_dependency 'oauth'
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_ebooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaiden Mispy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2014-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '5.0'
111
- - !ruby/object:Gem::Dependency
112
- name: simple_oauth
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: eventmachine
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +220,20 @@ dependencies:
234
220
  - - ">="
235
221
  - !ruby/object:Gem::Version
236
222
  version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: oauth
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
237
  description: Markov chains for all your friends~
238
238
  email:
239
239
  - "^_^@mispy.me"