cinch-twitter 0.3.7 → 0.3.10
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.
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/cinch-twitter.gemspec +2 -2
- data/lib/cinch/plugins/twitter/formatter.rb +8 -5
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.10
|
data/cinch-twitter.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "cinch-twitter"
|
|
8
|
-
s.version = "0.3.
|
|
8
|
+
s.version = "0.3.10"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Mark Seymour"]
|
|
12
|
-
s.date = "2012-
|
|
12
|
+
s.date = "2012-09-21"
|
|
13
13
|
s.description = "A Twitter plugin for Cinch."
|
|
14
14
|
s.email = "mark.seymour.ns@gmail.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -36,7 +36,6 @@ module Cinch
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def format_tweep_info(tweep)
|
|
39
|
-
tweep_status_text = expand_uris(tweep.status.full_text, tweep.status.urls)
|
|
40
39
|
head = "#{Cinch::Formatting.format(:aqua,tweep.name)}" + Cinch::Formatting.format(:silver," (#{tweep.screen_name})") + Cinch::Formatting.format(:grey," - #{tweep.url} https://twitter.com/#{tweep.screen_name}")
|
|
41
40
|
bio = ""
|
|
42
41
|
bio = Cinch::Formatting.format(:aqua,"\"#{tweep.description.strip}\"") if !tweep.description.blank?
|
|
@@ -52,11 +51,15 @@ module Cinch
|
|
|
52
51
|
flags << "is a translator for Twitter" if tweep.is_translator?
|
|
53
52
|
flags << "is verified" if tweep.verified?
|
|
54
53
|
flags << "would rather keep their life secret" if tweep.protected?
|
|
55
|
-
tweet = []
|
|
56
|
-
tweet << CGI::unescapeHTML(tweep_status_text.gsub("\n", " ").squeeze(" "))
|
|
54
|
+
tweet = []
|
|
57
55
|
tweet_tail = []
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
if tweep.status
|
|
57
|
+
tweep_status_text = expand_uris(tweep.status.full_text, tweep.status.urls)
|
|
58
|
+
tweet << Cinch::Formatting.format(:aqua,"Their latest tweet:")
|
|
59
|
+
tweet << CGI::unescapeHTML(tweep_status_text.gsub("\n", " ").squeeze(" "))
|
|
60
|
+
tweet_tail << "from #{tweep.status.place.full_name}" if !tweep.status.place.blank?
|
|
61
|
+
tweet_tail << "at #{tweep.status.created_at.strftime("%B %-d, %Y, %-I:%M%P")}"
|
|
62
|
+
end
|
|
60
63
|
|
|
61
64
|
parts = [head, bio, location, desc, flags].reject(&:blank?).map {|e| e.is_a?(Array) ? "#{tweep.name} " + e.to_sentence + "." : e }
|
|
62
65
|
parts << [tweet, Cinch::Formatting.format(:silver,["(", tweet_tail.join(" "), ")"].join)].join(" ")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cinch-twitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.10
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-09-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
160
160
|
version: '0'
|
|
161
161
|
segments:
|
|
162
162
|
- 0
|
|
163
|
-
hash:
|
|
163
|
+
hash: 540258927
|
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
none: false
|
|
166
166
|
requirements:
|