twterm 2.8.0 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,6 @@ module Twterm
16
16
  end
17
17
 
18
18
  include Readline
19
- include Curses
20
19
  include Publisher
21
20
 
22
21
  def initialize(app, client)
@@ -104,7 +103,7 @@ module Twterm
104
103
  end
105
104
 
106
105
  def ask_and_post(leading_text, prompt, postprocessor, options = {})
107
- close_screen
106
+ Curses.close_screen
108
107
  puts "\e[H\e[2J#{leading_text}\n\n"
109
108
  ask(prompt, postprocessor) { |text| client.post(postprocessor.call(text), options) }
110
109
  end
@@ -120,7 +119,7 @@ module Twterm
120
119
  end
121
120
 
122
121
  def reset
123
- reset_prog_mode
122
+ Curses.reset_prog_mode
124
123
  sleep 0.1
125
124
  publish(Event::Screen::Refresh.new)
126
125
  end
data/lib/twterm/user.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Twterm
2
+ # A Twitter user
2
3
  class User
3
4
  attr_reader :description, :favorites_count, :followers_count,
4
5
  :friends_count, :id, :location, :name, :protected, :profile_image,
@@ -1,3 +1,3 @@
1
1
  module Twterm
2
- VERSION = '2.8.0'
2
+ VERSION = '2.9.0'
3
3
  end
data/nix/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'twterm'
data/nix/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ addressable (2.7.0)
5
+ public_suffix (>= 2.0.2, < 5.0)
6
+ buftok (0.2.0)
7
+ citrus (3.0.2)
8
+ concurrent-ruby (1.0.5)
9
+ curses (1.3.2)
10
+ domain_name (0.5.20190701)
11
+ unf (>= 0.0.5, < 1.0.0)
12
+ equalizer (0.0.11)
13
+ http (3.3.0)
14
+ addressable (~> 2.3)
15
+ http-cookie (~> 1.0)
16
+ http-form_data (~> 2.0)
17
+ http_parser.rb (~> 0.6.0)
18
+ http-cookie (1.0.3)
19
+ domain_name (~> 0.5)
20
+ http-form_data (2.3.0)
21
+ http_parser.rb (0.6.0)
22
+ idn-ruby (0.1.0)
23
+ launchy (2.4.3)
24
+ addressable (~> 2.3)
25
+ memoizable (0.4.2)
26
+ thread_safe (~> 0.3, >= 0.3.1)
27
+ multipart-post (2.1.1)
28
+ naught (1.1.0)
29
+ oauth (0.5.4)
30
+ public_suffix (4.0.5)
31
+ simple_oauth (0.3.1)
32
+ terminal-notifier (2.0.0)
33
+ thread_safe (0.3.6)
34
+ toml-rb (0.3.15)
35
+ citrus (~> 3.0, > 3.0)
36
+ twitter (6.2.0)
37
+ addressable (~> 2.3)
38
+ buftok (~> 0.2.0)
39
+ equalizer (~> 0.0.11)
40
+ http (~> 3.0)
41
+ http-form_data (~> 2.0)
42
+ http_parser.rb (~> 0.6.0)
43
+ memoizable (~> 0.4.0)
44
+ multipart-post (~> 2.0)
45
+ naught (~> 1.0)
46
+ simple_oauth (~> 0.3.0)
47
+ twitter-text (2.1.0)
48
+ idn-ruby
49
+ unf (~> 0.1.0)
50
+ twterm (2.8.0)
51
+ concurrent-ruby (~> 1.0.5)
52
+ curses (~> 1.3.2)
53
+ launchy (~> 2.4.3)
54
+ oauth (~> 0.5.1)
55
+ terminal-notifier (~> 2.0.0)
56
+ toml-rb (~> 0.3.14)
57
+ twitter (~> 6.2.0)
58
+ twitter-text (~> 2.1.0)
59
+ unf (0.1.4)
60
+ unf_ext
61
+ unf_ext (0.0.7.7)
62
+
63
+ PLATFORMS
64
+ ruby
65
+
66
+ DEPENDENCIES
67
+ twterm
68
+
69
+ BUNDLED WITH
70
+ 2.1.4
data/nix/gemset.nix ADDED
@@ -0,0 +1,283 @@
1
+ {
2
+ addressable = {
3
+ dependencies = ["public_suffix"];
4
+ groups = ["default"];
5
+ platforms = [];
6
+ source = {
7
+ remotes = ["https://rubygems.org"];
8
+ sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy";
9
+ type = "gem";
10
+ };
11
+ version = "2.7.0";
12
+ };
13
+ buftok = {
14
+ groups = ["default"];
15
+ platforms = [];
16
+ source = {
17
+ remotes = ["https://rubygems.org"];
18
+ sha256 = "1rzsy1vy50v55x9z0nivf23y0r9jkmq6i130xa75pq9i8qrn1mxs";
19
+ type = "gem";
20
+ };
21
+ version = "0.2.0";
22
+ };
23
+ citrus = {
24
+ groups = ["default"];
25
+ platforms = [];
26
+ source = {
27
+ remotes = ["https://rubygems.org"];
28
+ sha256 = "0l7nhk3gkm1hdchkzzhg2f70m47pc0afxfpl6mkiibc9qcpl3hjf";
29
+ type = "gem";
30
+ };
31
+ version = "3.0.2";
32
+ };
33
+ concurrent-ruby = {
34
+ groups = ["default"];
35
+ platforms = [];
36
+ source = {
37
+ remotes = ["https://rubygems.org"];
38
+ sha256 = "183lszf5gx84kcpb779v6a2y0mx9sssy8dgppng1z9a505nj1qcf";
39
+ type = "gem";
40
+ };
41
+ version = "1.0.5";
42
+ };
43
+ curses = {
44
+ groups = ["default"];
45
+ platforms = [];
46
+ source = {
47
+ remotes = ["https://rubygems.org"];
48
+ sha256 = "0hic9kq09dhh8jqjx3k1991rnqhlj3glz82w0g7ndcri52m1hgqg";
49
+ type = "gem";
50
+ };
51
+ version = "1.3.2";
52
+ };
53
+ domain_name = {
54
+ dependencies = ["unf"];
55
+ groups = ["default"];
56
+ platforms = [];
57
+ source = {
58
+ remotes = ["https://rubygems.org"];
59
+ sha256 = "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0";
60
+ type = "gem";
61
+ };
62
+ version = "0.5.20190701";
63
+ };
64
+ equalizer = {
65
+ groups = ["default"];
66
+ platforms = [];
67
+ source = {
68
+ remotes = ["https://rubygems.org"];
69
+ sha256 = "1kjmx3fygx8njxfrwcmn7clfhjhb6bvv3scy2lyyi0wqyi3brra4";
70
+ type = "gem";
71
+ };
72
+ version = "0.0.11";
73
+ };
74
+ http = {
75
+ dependencies = ["addressable" "http-cookie" "http-form_data" "http_parser.rb"];
76
+ groups = ["default"];
77
+ platforms = [];
78
+ source = {
79
+ remotes = ["https://rubygems.org"];
80
+ sha256 = "1jlm5prw437wqpfxcigh88lfap3m7g8mnmj5as7qw6dzqnvrxwmc";
81
+ type = "gem";
82
+ };
83
+ version = "3.3.0";
84
+ };
85
+ http-cookie = {
86
+ dependencies = ["domain_name"];
87
+ groups = ["default"];
88
+ platforms = [];
89
+ source = {
90
+ remotes = ["https://rubygems.org"];
91
+ sha256 = "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g";
92
+ type = "gem";
93
+ };
94
+ version = "1.0.3";
95
+ };
96
+ http-form_data = {
97
+ groups = ["default"];
98
+ platforms = [];
99
+ source = {
100
+ remotes = ["https://rubygems.org"];
101
+ sha256 = "1wx591jdhy84901pklh1n9sgh74gnvq1qyqxwchni1yrc49ynknc";
102
+ type = "gem";
103
+ };
104
+ version = "2.3.0";
105
+ };
106
+ "http_parser.rb" = {
107
+ groups = ["default"];
108
+ platforms = [];
109
+ source = {
110
+ remotes = ["https://rubygems.org"];
111
+ sha256 = "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi";
112
+ type = "gem";
113
+ };
114
+ version = "0.6.0";
115
+ };
116
+ idn-ruby = {
117
+ groups = ["default"];
118
+ platforms = [];
119
+ source = {
120
+ remotes = ["https://rubygems.org"];
121
+ sha256 = "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr";
122
+ type = "gem";
123
+ };
124
+ version = "0.1.0";
125
+ };
126
+ launchy = {
127
+ dependencies = ["addressable"];
128
+ groups = ["default"];
129
+ platforms = [];
130
+ source = {
131
+ remotes = ["https://rubygems.org"];
132
+ sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2";
133
+ type = "gem";
134
+ };
135
+ version = "2.4.3";
136
+ };
137
+ memoizable = {
138
+ dependencies = ["thread_safe"];
139
+ groups = ["default"];
140
+ platforms = [];
141
+ source = {
142
+ remotes = ["https://rubygems.org"];
143
+ sha256 = "0v42bvghsvfpzybfazl14qhkrjvx0xlmxz0wwqc960ga1wld5x5c";
144
+ type = "gem";
145
+ };
146
+ version = "0.4.2";
147
+ };
148
+ multipart-post = {
149
+ groups = ["default"];
150
+ platforms = [];
151
+ source = {
152
+ remotes = ["https://rubygems.org"];
153
+ sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj";
154
+ type = "gem";
155
+ };
156
+ version = "2.1.1";
157
+ };
158
+ naught = {
159
+ groups = ["default"];
160
+ platforms = [];
161
+ source = {
162
+ remotes = ["https://rubygems.org"];
163
+ sha256 = "1wwjx35zgbc0nplp8a866iafk4zsrbhwwz4pav5gydr2wm26nksg";
164
+ type = "gem";
165
+ };
166
+ version = "1.1.0";
167
+ };
168
+ oauth = {
169
+ groups = ["default"];
170
+ platforms = [];
171
+ source = {
172
+ remotes = ["https://rubygems.org"];
173
+ sha256 = "1zszdg8q1b135z7l7crjj234k4j0m347hywp5kj6zsq7q78pw09y";
174
+ type = "gem";
175
+ };
176
+ version = "0.5.4";
177
+ };
178
+ public_suffix = {
179
+ groups = ["default"];
180
+ platforms = [];
181
+ source = {
182
+ remotes = ["https://rubygems.org"];
183
+ sha256 = "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g";
184
+ type = "gem";
185
+ };
186
+ version = "4.0.5";
187
+ };
188
+ simple_oauth = {
189
+ groups = ["default"];
190
+ platforms = [];
191
+ source = {
192
+ remotes = ["https://rubygems.org"];
193
+ sha256 = "0dw9ii6m7wckml100xhjc6vxpjcry174lbi9jz5v7ibjr3i94y8l";
194
+ type = "gem";
195
+ };
196
+ version = "0.3.1";
197
+ };
198
+ terminal-notifier = {
199
+ groups = ["default"];
200
+ platforms = [];
201
+ source = {
202
+ remotes = ["https://rubygems.org"];
203
+ sha256 = "1slc0y8pjpw30hy21v8ypafi8r7z9jlj4bjbgz03b65b28i2n3bs";
204
+ type = "gem";
205
+ };
206
+ version = "2.0.0";
207
+ };
208
+ thread_safe = {
209
+ groups = ["default"];
210
+ platforms = [];
211
+ source = {
212
+ remotes = ["https://rubygems.org"];
213
+ sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy";
214
+ type = "gem";
215
+ };
216
+ version = "0.3.6";
217
+ };
218
+ toml-rb = {
219
+ dependencies = ["citrus"];
220
+ groups = ["default"];
221
+ platforms = [];
222
+ source = {
223
+ remotes = ["https://rubygems.org"];
224
+ sha256 = "03sr3k193i1r5bh9g4zc7iq9jklapmwj0rndcvhr9q7v5xm7x4rf";
225
+ type = "gem";
226
+ };
227
+ version = "0.3.15";
228
+ };
229
+ twitter = {
230
+ dependencies = ["addressable" "buftok" "equalizer" "http" "http-form_data" "http_parser.rb" "memoizable" "multipart-post" "naught" "simple_oauth"];
231
+ groups = ["default"];
232
+ platforms = [];
233
+ source = {
234
+ remotes = ["https://rubygems.org"];
235
+ sha256 = "0fjyz3viabz3xs5d9aad18zgdbhfwm51jsnzigc8kxk77p1x58n5";
236
+ type = "gem";
237
+ };
238
+ version = "6.2.0";
239
+ };
240
+ twitter-text = {
241
+ dependencies = ["idn-ruby" "unf"];
242
+ groups = ["default"];
243
+ platforms = [];
244
+ source = {
245
+ remotes = ["https://rubygems.org"];
246
+ sha256 = "1igv713wn6wqhq4nlr81r93v7wmgjqny24jwp3ai5i4ipk2f2k6a";
247
+ type = "gem";
248
+ };
249
+ version = "2.1.0";
250
+ };
251
+ twterm = {
252
+ dependencies = ["concurrent-ruby" "curses" "launchy" "oauth" "terminal-notifier" "toml-rb" "twitter" "twitter-text"];
253
+ groups = ["default"];
254
+ platforms = [];
255
+ source = {
256
+ remotes = ["https://rubygems.org"];
257
+ sha256 = "075rq11axsz41hcrmm6ixjyy0kz3axf0mhkvq3cgryqib2isjbk9";
258
+ type = "gem";
259
+ };
260
+ version = "2.8.0";
261
+ };
262
+ unf = {
263
+ dependencies = ["unf_ext"];
264
+ groups = ["default"];
265
+ platforms = [];
266
+ source = {
267
+ remotes = ["https://rubygems.org"];
268
+ sha256 = "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9";
269
+ type = "gem";
270
+ };
271
+ version = "0.1.4";
272
+ };
273
+ unf_ext = {
274
+ groups = ["default"];
275
+ platforms = [];
276
+ source = {
277
+ remotes = ["https://rubygems.org"];
278
+ sha256 = "0wc47r23h063l8ysws8sy24gzh74mks81cak3lkzlrw4qkqb3sg4";
279
+ type = "gem";
280
+ };
281
+ version = "0.0.7.7";
282
+ };
283
+ }
data/shell.nix ADDED
@@ -0,0 +1,40 @@
1
+ { pkgs ? import <nixpkgs> { }, ruby ? 2.7 }:
2
+
3
+ with pkgs;
4
+ let
5
+ mri =
6
+ if ruby == 2.5
7
+ then ruby_2_5
8
+ else if ruby == 2.6
9
+ then ruby_2_6
10
+ else if ruby == 2.7
11
+ then ruby_2_7
12
+ else if ruby == 3.0
13
+ then ruby_3_0
14
+ else abort "Unsupported Ruby version";
15
+ gems = bundlerEnv {
16
+ pname = "twterm";
17
+ gemdir = ./.;
18
+ ruby = mri;
19
+ };
20
+ in
21
+ mkShell rec {
22
+ buildInputs = [
23
+ bundix
24
+ bundler
25
+ gems
26
+ libffi
27
+ libidn
28
+ mri
29
+ ncurses
30
+ readline
31
+ ];
32
+ shellHook = ''
33
+ alias twterm='bundle exec bin/twterm'
34
+
35
+ bundle install -j=4 --path=vendor/bundle
36
+
37
+ ruby --version
38
+ bundle --version
39
+ '';
40
+ }
data/twterm.gemspec CHANGED
@@ -16,21 +16,21 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |i| i == 'Gemfile.lock' }
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ['lib']
19
- spec.required_ruby_version = '>= 2.1.0'
19
+ spec.required_ruby_version = spec.required_ruby_version = Gem::Requirement.new('~> 2.5')
20
20
 
21
- spec.add_dependency 'curses', '~> 1.3.2'
22
- spec.add_dependency 'concurrent-ruby', '~> 1.0.5'
23
- spec.add_dependency 'launchy', '~> 2.4.3'
21
+ spec.add_dependency 'curses', '~> 1.4.0'
22
+ spec.add_dependency 'concurrent-ruby', '~> 1.1.7'
23
+ spec.add_dependency 'launchy', '~> 2.5.0'
24
24
  spec.add_dependency 'oauth', '~> 0.5.1'
25
25
  spec.add_dependency 'terminal-notifier', '~> 2.0.0'
26
- spec.add_dependency 'toml-rb', '~> 0.3.14'
27
- spec.add_dependency 'twitter', '~> 6.2.0'
28
- spec.add_dependency 'twitter-text', '~> 2.1.0'
26
+ spec.add_dependency 'toml-rb', '~> 2.0.1'
27
+ spec.add_dependency 'twitter', '~> 7.0.0'
28
+ spec.add_dependency 'twitter-text', '~> 3.1.0'
29
29
 
30
- spec.add_development_dependency 'bundler', '~> 1.8'
31
- spec.add_development_dependency 'hashie', '~> 3.5.6'
32
- spec.add_development_dependency 'rake', '~> 12.0'
33
- spec.add_development_dependency 'rspec', '~> 3.7.0'
34
- spec.add_development_dependency 'rubocop', '~> 0.51.0'
35
- spec.add_development_dependency 'yard', '~> 0.9.12'
30
+ spec.add_development_dependency 'bundler', '~> 2.1.4'
31
+ spec.add_development_dependency 'hashie', '~> 4.1.0'
32
+ spec.add_development_dependency 'rake', '~> 13.0.3'
33
+ spec.add_development_dependency 'rspec', '~> 3.10.0'
34
+ spec.add_development_dependency 'rubocop', '~> 1.7.0'
35
+ spec.add_development_dependency 'yard', '~> 0.9.26'
36
36
  end