t 3.1.0 → 4.1.0

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
- SHA1:
3
- metadata.gz: 864dd4cb66b11688ff534ea3a90ea95b8397e3fb
4
- data.tar.gz: 1ddaa027afd51be321daee9f46b62b24594c0899
2
+ SHA256:
3
+ metadata.gz: f132b268c436dcf3e1107b9747e8dd3f506f1883970c27b152cd1b6b3239e217
4
+ data.tar.gz: 3c267e930330b7cd736e444b34b508e89e4eedf38124d69b13c15a79e38f49a1
5
5
  SHA512:
6
- metadata.gz: 543cb8d65d78f4f062736240d907354c8fcf23eedb16f138e8dd10c335ec9c7fdf8777e71d4343bda15f99c8bbcfe336f1163ea17e750897722789ed24b1b946
7
- data.tar.gz: 60977b775338eb84864af689d8ab66baa7ff311cb417bfad0ae03721afc79836d7c28e0a8e8871685951356a73dca77e56d5b3f0f402386535d6422190f2568a
6
+ metadata.gz: '0308f8a1a345f776f6226cd04d7ac6dce6d7532f63a1182c8fba908babf156ce7a4a0a2ee6674db01ddad1651dce06335d0f84a13388d6fb9851f6fd6d123be7'
7
+ data.tar.gz: 9804666bcde9a82bc9c8350c3f39b297c6c2c5c6629da53b8ebd96eaad80d46a6477779f8a15a467a773a9ccbcedf06fdb6d124e2b858f1307030c6c88d7405b
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2016 Erik Michaels-Ober
1
+ Copyright (c) 2011-2024 Erik Berlin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -5,13 +5,11 @@
5
5
  [![Gem Version](https://img.shields.io/gem/v/t.svg)][gem]
6
6
  [![Build Status](https://img.shields.io/travis/sferik/t.svg)][travis]
7
7
  [![Dependency Status](https://img.shields.io/gemnasium/sferik/t.svg)][gemnasium]
8
- [![Coverage Status](https://img.shields.io/coveralls/sferik/t.svg)][coveralls]
9
8
  [![tip for next commit](https://tip4commit.com/projects/102.svg)](https://tip4commit.com/github/sferik/t)
10
9
 
11
10
  [gem]: https://rubygems.org/gems/t
12
11
  [travis]: https://travis-ci.org/sferik/t
13
12
  [gemnasium]: https://gemnasium.com/sferik/t
14
- [coveralls]: https://coveralls.io/r/sferik/t
15
13
 
16
14
  #### A command-line power tool for Twitter.
17
15
  The CLI takes syntactic cues from the [Twitter SMS commands][sms], but it
@@ -31,6 +29,7 @@ If the output looks something like this, you're in good shape:
31
29
  ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
32
30
 
33
31
  If the output looks more like this, you need to [install Ruby][ruby]:
32
+
34
33
  [ruby]: https://www.ruby-lang.org/en/downloads/
35
34
 
36
35
  ruby: command not found
@@ -45,7 +44,8 @@ or for Red Hat-based distros like Fedora and CentOS, type:
45
44
 
46
45
  (if necessary, adapt for your package manager)
47
46
 
48
- **On Windows**, you can install Ruby with [RubyInstaller][].
47
+ **On Windows**, you can install Ruby with [RubyInstaller][rubyinstaller].
48
+
49
49
  [rubyinstaller]: http://rubyinstaller.org/downloads/
50
50
 
51
51
  ## Installation
@@ -199,7 +199,7 @@ example, here's how to send a user a direct message only if they already follow
199
199
 
200
200
  #### Search Tweets in your home timeline that match a specified query
201
201
  t search timeline "query"
202
- **Note**: In Twitter API parlance, your “home timeline” is your “Newsfeed” whereas your “user timeline” are the tweets tweeted (and retweeted) by you.
202
+ **Note**: In Twitter API parlance, your “home timeline” is your “Newsfeed” whereas your “user timeline” are the tweets tweeted (and retweeted) by you.
203
203
 
204
204
  #### Search Tweets in a specified user’s timeline
205
205
  t search timeline @sferik "query"
@@ -288,10 +288,9 @@ the original code.
288
288
  This library aims to support and is [tested against][travis] the following Ruby
289
289
  implementations:
290
290
 
291
- * Ruby 2.0.0
292
- * Ruby 2.1
293
- * Ruby 2.2
294
- * Ruby 2.3
291
+ * Ruby 3.1
292
+ * Ruby 3.2
293
+ * Ruby 3.3
295
294
 
296
295
  If something doesn't work on one of these Ruby versions, it's a bug.
297
296
 
@@ -312,7 +311,7 @@ If you are running t on a remote computer you can use the flag --display-uri dur
312
311
  t authorize --display-uri
313
312
 
314
313
  ## Copyright
315
- Copyright (c) 2011-2016 Erik Michaels-Ober. See [LICENSE][] for details.
314
+ Copyright (c) 2011-2024 Erik Berlin. See [LICENSE][] for details.
316
315
  Application icon by [@nvk][nvk].
317
316
 
318
317
  [license]: https://github.com/sferik/t/blob/master/LICENSE.md
data/bin/t CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  # Trap interrupts to quit cleanly. See
4
4
  # https://twitter.com/mitchellh/status/283014103189053442
5
- Signal.trap('INT') { abort }
5
+ Signal.trap("INT") { abort }
6
6
 
7
- require 'oauth'
8
- require 't'
9
- require 'twitter'
7
+ require "oauth"
8
+ require "t"
9
+ require "twitter"
10
10
 
11
11
  # Output message to $stderr, prefixed with the program name
12
12
  def pute(*args)
@@ -19,24 +19,24 @@ end
19
19
  begin
20
20
  T::CLI.start(ARGV)
21
21
  rescue Interrupt
22
- pute 'Quitting...'
22
+ pute "Quitting..."
23
23
  rescue OAuth::Unauthorized
24
- pute 'Authorization failed'
25
- rescue Twitter::Error::TooManyRequests => error
26
- pute error.message, "The rate limit for this request will reset in #{error.rate_limit.reset_in} #{error.rate_limit.reset_in == 1 ? 'second' : 'seconds'}."
27
- rescue Twitter::Error::BadRequest => error
28
- pute error.message, 'Run `t authorize` to authorize.'
29
- rescue Twitter::Error::Forbidden, Twitter::Error::Unauthorized => error
30
- if error.message == 'Error processing your OAuth request: Read-only application cannot POST' ||
31
- error.message == 'This application is not allowed to access or delete your direct messages'
32
- $stderr.puts(%q(Make sure to set your Twitter application's Access Level to "Read, Write and Access direct messages".))
33
- require 'thor'
34
- Thor::Shell::Basic.new.ask 'Press [Enter] to open the Twitter Developer site.'
35
- require 'launchy'
36
- Launchy.open('https://dev.twitter.com/apps') { |u, _, _| $stderr.puts "Manually open #{u}" }
24
+ pute "Authorization failed"
25
+ rescue Twitter::Error::TooManyRequests => e
26
+ pute e.message, "The rate limit for this request will reset in #{e.rate_limit.reset_in} #{e.rate_limit.reset_in == 1 ? 'second' : 'seconds'}."
27
+ rescue Twitter::Error::BadRequest => e
28
+ pute e.message, "Run `t authorize` to authorize."
29
+ rescue Twitter::Error::Forbidden, Twitter::Error::Unauthorized => e
30
+ if e.message == "Error processing your OAuth request: Read-only application cannot POST" ||
31
+ e.message == "This application is not allowed to access or delete your direct messages"
32
+ warn(%q(Make sure to set your Twitter application's Access Level to "Read, Write and Access direct messages".))
33
+ require "thor"
34
+ Thor::Shell::Basic.new.ask "Press [Enter] to open the Twitter Developer site."
35
+ require "launchy"
36
+ Launchy.open("https://dev.twitter.com/apps") { |u, _, _| warn "Manually open #{u}" }
37
37
  else
38
- pute error.message
38
+ pute e.message
39
39
  end
40
- rescue Twitter::Error => error
41
- pute error.message
40
+ rescue Twitter::Error => e
41
+ pute e.message
42
42
  end