Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* print error message regarding no DM permissions

* a couple patches
  • Loading branch information...
commit ee7081295ea863ec7f66e578a84d5b68e72002bb 1 parent 6b97cd4
@parkr authored
View
8 ChangeLog.markdown
@@ -1,10 +1,12 @@
-# tit 2.0.2 2011-08-31
+# tit 2.0.3 2011-08-31
-*
+* print error message regarding no DM permissions
+* a couple patches
# tit 2.0.2 2011-08-31
-*
+* dm-ing still not working - twitter needs to give us permission
+* fixed code for dm-ing when twitter approves it, it'll work
# tit 2.0.1 2011-08-23
View
2  VERSION.yml
@@ -1,4 +1,4 @@
---
:major: 2
:minor: 0
-:patch: 2
+:patch: 3
View
3  bin/tit
@@ -49,6 +49,9 @@ def main
options[:payload]["status"] = status
end
opts.on("-d", "--dm [USERNAME] [MESSAGE]", "Read direct messages. Send a direct message if USERNAME and MESSAGE are set") do |user, message|
+ "Tit does not presently have access to Twitter's Direct Messaging functionality. This will be rectified soon.".wrapped(@cols-2).each do |l|
+ puts " #{l}"
+ end
unchanged = false
if not user.nil? and not message.nil?
options[:action] = :new_direct_message
View
5 lib/tit.rb
@@ -91,7 +91,7 @@ def time_ago_in_words
Why are you reading the documentation, you cunt?
=end
class Tit
- VERSION = [2, 0, 2]
+ VERSION = [2, 0, 3]
RCFILE = File.join(ENV["HOME"], ".titrc")
RTFILE = File.join(ENV["HOME"], ".titrt")
@@ -210,6 +210,8 @@ def update(payload)
payload["status"] = STDIN.read
end
+ # Count URLs only as t.co length, not full length.
+
if payload["status"].length > 140
tuts "your status is too long (by #{payload["status"].length - 140} characters)"
tuts "here is what would get posted:"
@@ -221,6 +223,7 @@ def update(payload)
end
def send_dm(payload)
+ # Count URLs only as t.co length, not full length.
if payload["text"].length > 140
tuts "your message is too long (by #{payload["text"].length - 140} characters)"
tuts "here is what would get posted:"
View
2  tit.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{tit}
- s.version = "2.0.2"
+ s.version = "2.0.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Leif Walsh", "Parker Moore"]
Please sign in to comment.
Something went wrong with that request. Please try again.