cinch-twitterstatus 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 845cb76a25308cbdc40708c3c6d7c4fc6248da6a
4
- data.tar.gz: 117716e75d38820d63fce21d2c603a17d9d4eff6
3
+ metadata.gz: 6b2e13447841cd0fc45d9fa4172f99c0166a0e66
4
+ data.tar.gz: 37e57f6b0021ffdb432a67eb35276a7ef4d4005b
5
5
  SHA512:
6
- metadata.gz: bea0d7b4bbaede8c99cf24b49b4e5e7ce19438a126ba0d94bd08e6fb8978a86dbbadb8e3fa13a5c00da8494cbd487391d4d7c634e75be4d09c85cca821899837
7
- data.tar.gz: d44ef11168014e53a89d6e32b3c10371040018ed531570a429fab3c922002417332b9f77bcc30722f61737f42b20f14ef0c9dc6af0236ce741f8a9a7dee47c08
6
+ metadata.gz: f02189f8e20e455c6939952b579f9e54dd4e0c7df1ea71e3071e4a08d56137b4a010e5556472df07216a80bb21e3d2f206f692354a5dfcb825d45b0778bc8316
7
+ data.tar.gz: 05d06260874fbdb0875c4fa6220bd8a07425cfda8f1c23bd64540ac26ebb1a48b66bc669979ca9bb3e3b4879180bb7f98d85b62f1b3873cc5c3eb2f0c17d9bf9
@@ -41,7 +41,7 @@ module Cinch
41
41
 
42
42
  def tweet_text(user, status)
43
43
  # Scrub the tweet for returns so we don't have multilined responses.
44
- status.gsub!(/[\n]+/, ' ') if status.match(/\n/)
44
+ status = status.gsub(/[\n]+/, ' ') if status.match(/\n/)
45
45
  "@#{user} tweeted \"#{status}\""
46
46
  end
47
47
 
@@ -3,7 +3,7 @@ module Cinch
3
3
  module Plugins
4
4
  # Versioning info
5
5
  class TwitterStatus
6
- VERSION = '1.1.1'
6
+ VERSION = '1.1.2'
7
7
  end
8
8
  end
9
9
  end
@@ -15,7 +15,8 @@ describe Cinch::Plugins::TwitterStatus do
15
15
  @status =
16
16
  { normal: 'https://twitter.com/weirdo513/status/344186643609174016',
17
17
  protected: 'https://twitter.com/brewtopian/status/68071618055901184',
18
- invalid: 'https://twitter.com/weirdo513/status/3INVALI643609174016' }
18
+ invalid: 'https://twitter.com/weirdo513/status/3INVALI643609174016',
19
+ multiline: 'https://twitter.com/Peeardee/status/502209346038951937'}
19
20
  end
20
21
 
21
22
  describe "Twitter Link Parsing" do
@@ -25,6 +26,12 @@ describe Cinch::Plugins::TwitterStatus do
25
26
  expect(msg.text).to eq('@weirdo513 tweeted "HOW IS THAT MIC STILL ON JESUS"')
26
27
  end
27
28
 
29
+ it 'should return the text of the tweet when linked in the channel' do
30
+ msg = get_replies(make_message(@bot, @status[:multiline],
31
+ { channel: '#foo', nick: 'bar' })).first
32
+ expect(msg.text).to eq('@Peeardee tweeted "Dear My RP Group, I *will* be working on the Enforcer schedule during our Call of Cthulhu session tonight. Will make frequent sanity rolls."')
33
+ end
34
+
28
35
  it 'should not return any text if the status is invalid' do
29
36
  msg = get_replies(make_message(@bot, @status[:invalid],
30
37
  { channel: '#foo', nick: 'bar' }))
@@ -44,13 +51,4 @@ describe Cinch::Plugins::TwitterStatus do
44
51
  expect(msg).to be_empty
45
52
  end
46
53
  end
47
-
48
- describe "Watchers" do
49
- # FIXME: cinch-test does not allow timers to function
50
- it 'should not post tweets that already existed when the bot was started' do
51
- sleep 20
52
- get_replies(make_message(@bot, @status[:normal],
53
- { channel: '#foo', nick: 'bar' }))
54
- end
55
- end
56
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinch-twitterstatus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Haberer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-01 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake