tw 1.0.6 → 1.0.7

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
  SHA1:
3
- metadata.gz: dc1df0cc1ccd60dd856c096f17518ee3da6c49ad
4
- data.tar.gz: 590bf05cfcacfa7731a38b3b6daea5aa70b02a18
3
+ metadata.gz: a18d1069911e22ecf8d691548a520559636205d2
4
+ data.tar.gz: 0d4e650b8e01e64fe6fc16237bbc7228e4b8ca79
5
5
  SHA512:
6
- metadata.gz: 23805b0bc35830b2554a4c4fa30386459d9a68eb6518244f5a96b89ba0d55bd53256f6a1f790ab5d479189a6b6f19f29f1c99296558ee00496e1646645dd97cb
7
- data.tar.gz: a75fa07add9fc4002fbbab348c1dcddec894c5bdf44ed7fd0e51356de224a711e707dee2d7c197ad661905d69efc2038c286684dc353a562f19abac50cb700e0
6
+ metadata.gz: f64915432c53ac22e884c17f1bbfcbb066c9e0ff5fabe32f8425b449859d24ccd89f8b923f5263277cf548ec25e0e88c570ad8978b89d064c127c4609df07b2e
7
+ data.tar.gz: 8ad9b02f542313971e52ab0d919f141426fee284e0dc8f86f7de7c6ac38ad8212dd0b021d4f502079c7d0c44887c688fe488a801f672658f0e2d0b3673d1de01
@@ -1,3 +1,8 @@
1
+ === 1.0.7 2014-01-25
2
+
3
+ * Add --delete option
4
+ * thank you for contributing @janusadm
5
+
1
6
  === 1.0.6 2014-01-17
2
7
 
3
8
  * rescue Launchy::CommandNotFoundError #56
@@ -105,6 +105,21 @@ module Tw::App
105
105
  on_exit
106
106
  end
107
107
 
108
+ cmd :delete do |v, opts|
109
+ if opts.has_param? :delete
110
+ id = opts[:delete]
111
+ auth
112
+ client.show_status id
113
+ puts 'Delete this?'
114
+ unless opts.has_option? :yes
115
+ puts '[Y/n]'
116
+ on_exit if STDIN.gets.strip =~ /^n/i
117
+ end
118
+ puts "success!" if client.destroy_status id
119
+ end
120
+ on_exit
121
+ end
122
+
108
123
  cmd :pipe do |v, opts|
109
124
  auth
110
125
  while line = STDIN.gets do
@@ -51,6 +51,7 @@ module Tw::App
51
51
  arg 'dm:to', 'create direct message'
52
52
  arg :favorite, 'favorite tweet', :alias => :fav
53
53
  arg :retweet, 'retweet', :alias => :rt
54
+ arg :delete, 'delete tweet', :alias => :del
54
55
  arg :search, 'search public timeline', :alias => :s
55
56
  arg :stream, 'show user stream', :alias => :st
56
57
  arg :status_id, 'show status_id', :alias => :id
@@ -103,6 +104,7 @@ module Tw::App
103
104
  STDERR.puts " tw --rt=334749349588377601"
104
105
  STDERR.puts " tw --format=json"
105
106
  STDERR.puts ' tw --format="@#{user} #{text} - http://twitter.com/#{user}/#{id}"'
107
+ STDERR.puts "delete tw --del=334749349588377601"
106
108
  on_exit
107
109
  end
108
110
 
@@ -111,5 +111,9 @@ module Tw
111
111
  @rest_client.retweet status_id
112
112
  end
113
113
 
114
+ def destroy_status(status_id)
115
+ @rest_client.destroy_status status_id
116
+ end
117
+
114
118
  end
115
119
  end
@@ -1,3 +1,3 @@
1
1
  module Tw
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tw
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter