termtter 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c94b440f131c26c1bcb32f98e04f796a1dd07ad
4
+ data.tar.gz: 8e945d4ab00b0a258e39e744400adb8a5665fae3
5
+ SHA512:
6
+ metadata.gz: bdb01f431c87ea598d6d29f5946432aa0e121bd69cf6f58fef9e447649805ff6ea607be51334f0de1d43c58cdeaf9153b2cb34a72dca4ce0579fac7877e9fe1f
7
+ data.tar.gz: 6a409bb41f1335ea56cf207bcd53a3df4a15bea581072c7aa3de3b598a55d0c1de81009be302fd263341b7e94c95ac3fccedc43ac8b217f7b0c56332031119c9
data/ChangeLog CHANGED
@@ -1,3 +1,44 @@
1
+ == 2.1.0 / 2013-04-10
2
+
3
+ * Correspond to API 1.1
4
+
5
+ * Other fixes.
6
+
7
+
8
+ == 2.0.0 / 2013-04-07
9
+
10
+ * User own plugins loader.
11
+
12
+ * If ~/.termtter/lib/plugins exist, load them.
13
+
14
+ * Improvement easy_post plugin.
15
+
16
+ * Plug-in easy_post should operate only when above 15 characters.
17
+
18
+ * Improvement tests.
19
+
20
+ * "Failed to update :(" when updated with URL.
21
+
22
+ * use String#sub instead of String#[regexp]=.
23
+
24
+ * spec for expand_tco_url plugin.
25
+
26
+ * and fix other minor bugs.
27
+
28
+
29
+ == 1.11.1 / 2012-3-31
30
+
31
+ * fix package_task.
32
+
33
+
34
+ == 1.11.0 / 2012-3-31
35
+
36
+ * Stable release.
37
+
38
+
39
+ == (Omitted)
40
+
41
+
1
42
  == 1.3.1 2009-08-10
2
43
 
3
44
  Takaaki SONE:
data/Gemfile CHANGED
@@ -1,10 +1,11 @@
1
- source :rubygems
1
+ # -*- mode: ruby -*-
2
+ source 'https://rubygems.org'
2
3
  gemspec
3
4
 
4
5
  gem 'json', '> 1.1.3'
5
6
  gem 'highline', '~> 1.5.0'
6
7
  gem 'termcolor', '~> 1.0.0'
7
- gem 'rubytter', '~> 1.4.0'
8
+ gem 'rubytter', '~> 1.5.1'
8
9
  gem 'notify', '~> 0.2.1'
9
10
 
10
11
  group :development do
data/Rakefile CHANGED
@@ -1,22 +1,20 @@
1
1
  # -*- mode: ruby; coding: utf-8 -*-
2
2
  require 'rubygems'
3
3
  require 'bundler'
4
-
5
4
  require 'rake'
6
5
  require 'rake/clean'
7
6
  require 'rubygems/package_task'
8
7
  require 'rdoc/task'
8
+ require 'rspec/core'
9
+ require 'rspec/core/rake_task'
9
10
 
10
11
  Bundler::GemHelper.install_tasks
11
12
 
12
- require 'rspec/core/rake_task'
13
13
  RSpec::Core::RakeTask.new(:spec) do |spec|
14
+ spec.rspec_opts = ["-c","-fs"]
14
15
  spec.pattern = FileList['spec/**/*_spec.rb']
15
- spec.rcov = true
16
16
  end
17
17
 
18
- task :spec => :check_dependencies
19
-
20
18
  task :default => :spec
21
19
 
22
20
  desc 'Generate documentation for the termtter.'
@@ -1,6 +1,5 @@
1
1
  def fib(n)i=0;j=1;n.times{j=i+i=j};i end
2
2
  Termtter::Client.register_command(:name => :fib,
3
- :aliases => [:f, :ho],
4
3
  :exec => lambda do |arg|
5
4
  case arg
6
5
  when "ukumori"
@@ -4,7 +4,7 @@ module Termtter::Client
4
4
  register_hook(:fetch_my_lists, :point => :launched) do
5
5
  begin
6
6
  public_storage[:lists] +=
7
- Termtter::API.twitter.lists(config.user_name).lists.map(&:full_name)
7
+ Termtter::API.twitter.lists(:screen_name => config.user_name).map(&:full_name)
8
8
  rescue TimeoutError
9
9
  # do nothing
10
10
  rescue Exception => e
@@ -44,7 +44,7 @@ module Termtter::Client
44
44
  a[:list_slug] = slug
45
45
  options[:per_page] = options[:count]
46
46
  options.delete(:count)
47
- statuses += Termtter::API.twitter.list_statuses(user_name, slug, options)
47
+ statuses += Termtter::API.twitter.list_statuses({:owner_screen_name => user_name, :slug => slug}.merge(options))
48
48
  else
49
49
  begin
50
50
  if user =~ /^\d+$/
@@ -57,7 +57,7 @@ module Termtter::Client
57
57
  user_name = normalize_as_user_name(user.sub(/\/$/, ''))
58
58
  a[:type] = :user
59
59
  a[:user_name] = user_name
60
- statuses += Termtter::API.twitter.user_timeline(user_name, options)
60
+ statuses += Termtter::API.twitter.user_timeline({:screen_name => user_name}.merge(options))
61
61
  rescue Rubytter::APIError => e
62
62
  last_error = e
63
63
  end
@@ -96,7 +96,7 @@ module Termtter::Client
96
96
  users.each{ |screen_name|
97
97
  begin
98
98
  user = Termtter::API.twitter.cached_user(screen_name) || Termtter::API.twitter.user(screen_name)
99
- Termtter::API.twitter.add_member_to_list(config.user_name, slug, user.id)
99
+ Termtter::API.twitter.add_member_to_list(:owner_screen_name => config.user_name, :slug => slug, :user_id => user.id)
100
100
  puts "#{slug} + #{screen_name}"
101
101
  rescue => e
102
102
  handle_error(e)
@@ -114,7 +114,7 @@ module Termtter::Client
114
114
  users.each{ |screen_name|
115
115
  begin
116
116
  user = Termtter::API.twitter.cached_user(screen_name) || Termtter::API.twitter.user(screen_name)
117
- Termtter::API.twitter.remove_member_from_list(config.user_name, slug, user.id)
117
+ Termtter::API.twitter.remove_member_from_list(:owner_screen_name => config.user_name, :slug => slug, :user_id => user.id)
118
118
  puts "#{slug} - #{screen_name}"
119
119
  rescue => e
120
120
  handle_error(e)
@@ -135,7 +135,7 @@ module Termtter::Client
135
135
  opt.on('--private') {|v| param[:mode] = 'private' }
136
136
  opt.parse(options)
137
137
  }
138
- list = Termtter::API.twitter.create_list(config.user_name, slug, param)
138
+ list = Termtter::API.twitter.create_list({:name => slug}.merge(param))
139
139
  public_storage[:lists] << list.full_name
140
140
  p [list.full_name, param]
141
141
  },
@@ -149,7 +149,7 @@ module Termtter::Client
149
149
  arg.split(' ').each{ |list_name|
150
150
  begin
151
151
  slug = list_name_to_slug(list_name)
152
- list = Termtter::API.twitter.delete_list(config.user_name, slug)
152
+ list = Termtter::API.twitter.delete_list(:owner_screen_name => config.user_name, :slug => slug)
153
153
  public_storage[:lists].delete(list.full_name)
154
154
  puts "#{list.full_name} deleted"
155
155
  rescue => e
@@ -167,7 +167,7 @@ module Termtter::Client
167
167
  user_name, slug = *arg.split('/')
168
168
  user_name = config.user_name if user_name.empty?
169
169
  user_name = normalize_as_user_name(user_name)
170
- list = Termtter::API.twitter.list(user_name, slug)
170
+ list = Termtter::API.twitter.list(:owner_screen_name => user_name, :slug => slug)
171
171
  attrs = %w[ full_name slug description mode id member_count subscriber_count]
172
172
  label_width = attrs.map(&:size).max
173
173
  attrs.each do |attr|
@@ -54,7 +54,7 @@ module Termtter::Client
54
54
  post_retweet(Termtter::API.twitter.show(arg), comment)
55
55
  when /@([A-Za-z0-9_]+)/
56
56
  user = $1
57
- statuses = Termtter::API.twitter.user_timeline(user)
57
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user)
58
58
  return if statuses.empty?
59
59
  post_retweet(statuses[0], comment)
60
60
  end
@@ -38,7 +38,7 @@ module Termtter::Client
38
38
  if config.easy_reply && /^\s*(@\w+)/ =~ arg
39
39
  user_name = normalize_as_user_name($1)
40
40
  in_reply_to_status_id =
41
- Termtter::API.twitter.user(user_name).status.id rescue nil
41
+ Termtter::API.twitter.user(:screen_name => user_name).status.id rescue nil
42
42
  in_reply_to_status_id ?
43
43
  {:in_reply_to_status_id => in_reply_to_status_id} : {}
44
44
  else
@@ -76,7 +76,7 @@ module Termtter::Client
76
76
  id =
77
77
  case arg
78
78
  when ''
79
- Termtter::API.twitter.user_timeline(config.user_name)[0].id
79
+ Termtter::API.twitter.user_timeline(:screen_name => config.user_name)[0].id
80
80
  when /^\d+$/
81
81
  arg.to_i
82
82
  end
@@ -231,7 +231,7 @@ module Termtter::Client
231
231
  options = {}
232
232
  end
233
233
 
234
- res = Termtter::API.twitter.replies(options)
234
+ res = Termtter::API.twitter.mentions(options)
235
235
  unless arg.empty?
236
236
  res = res.select {|e| e.user.screen_name == arg }
237
237
  end
@@ -278,7 +278,7 @@ module Termtter::Client
278
278
  :exec_proc => lambda {|args|
279
279
  args.split(' ').each do |arg|
280
280
  user_name = normalize_as_user_name(arg)
281
- user = Termtter::API::twitter.follow(user_name)
281
+ user = Termtter::API::twitter.follow(:screen_name => user_name)
282
282
  puts "followed #{user.screen_name}"
283
283
  end
284
284
  },
@@ -290,7 +290,7 @@ module Termtter::Client
290
290
  :exec_proc => lambda {|args|
291
291
  args.split(' ').each do |arg|
292
292
  user_name = normalize_as_user_name(arg)
293
- user = Termtter::API::twitter.leave(user_name)
293
+ user = Termtter::API::twitter.leave(:screen_name => user_name)
294
294
  puts "left #{user.screen_name}"
295
295
  end
296
296
  },
@@ -302,7 +302,7 @@ module Termtter::Client
302
302
  :exec_proc => lambda {|args|
303
303
  args.split(' ').each do |arg|
304
304
  user_name = normalize_as_user_name(arg)
305
- user = Termtter::API::twitter.block(user_name)
305
+ user = Termtter::API::twitter.block(:screen_name => user_name)
306
306
  puts "blocked #{user.screen_name}"
307
307
  end
308
308
  },
@@ -314,7 +314,7 @@ module Termtter::Client
314
314
  :exec_proc => lambda {|args|
315
315
  args.split(' ').each do |arg|
316
316
  user_name = normalize_as_user_name(arg)
317
- user = Termtter::API::twitter.unblock(user_name)
317
+ user = Termtter::API::twitter.unblock(:screen_name => user_name)
318
318
  puts "unblocked #{user.screen_name}"
319
319
  end
320
320
  },
@@ -323,7 +323,7 @@ module Termtter::Client
323
323
 
324
324
  help = ['favorites,favlist USERNAME', 'show user favorites']
325
325
  register_command(:favorites, :alias => :favlist, :help => help) do |arg|
326
- output(Termtter::API.twitter.favorites(arg), Termtter::Event.new(:user_timeline, :type => :favorite))
326
+ output(Termtter::API.twitter.favorites(:screen_name => arg), Termtter::Event.new(:user_timeline, :type => :favorite))
327
327
  end
328
328
 
329
329
  register_command(
@@ -336,14 +336,14 @@ module Termtter::Client
336
336
  arg.to_i
337
337
  when /^@([A-Za-z0-9_]+)/
338
338
  user_name = normalize_as_user_name($1)
339
- statuses = Termtter::API.twitter.user_timeline(user_name)
339
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user_name)
340
340
  return if statuses.empty?
341
341
  statuses[0].id
342
342
  when %r{twitter.com/(?:\#!/)[A-Za-z0-9_]+/status(?:es)?/\d+}
343
343
  status_id = URI.parse(arg).path.split(%{/}).last
344
344
  when %r{twitter.com/[A-Za-z0-9_]+}
345
345
  user_name = normalize_as_user_name(URI.parse(arg).path.split(%{/}).last)
346
- statuses = Termtter::API.twitter.user_timeline(user_name)
346
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user_name)
347
347
  return if statuses.empty?
348
348
  statuses[0].id
349
349
  when /^\/(.*)$/
@@ -357,7 +357,7 @@ module Termtter::Client
357
357
  end
358
358
  end
359
359
  begin
360
- r = Termtter::API.twitter.favorite id
360
+ r = Termtter::API.twitter.favorite(:id => id)
361
361
  puts "Favorited status ##{r.id} on user @#{r.user.screen_name} #{r.text}"
362
362
  rescue => e
363
363
  handle_error e
@@ -525,7 +525,7 @@ module Termtter::Client
525
525
  end
526
526
  when /^\s*(@\w+)/
527
527
  user_name = normalize_as_user_name($1)
528
- s = Termtter::API.twitter.user(user_name).status
528
+ s = Termtter::API.twitter.user(:screen_name => user_name).status
529
529
  if s
530
530
  params = s ? {:in_reply_to_status_id => s.id} : {}
531
531
  Termtter::API.twitter.update(arg, params)
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module Termtter::Client
4
- # TODO: ↓不要な気もする
4
+ # TODO: the below could be unnecessary
5
5
  config.set_default(:stdout, true)
6
6
  config.set_default(:standard_commands, true)
7
7
  config.set_default(:standard_completion, true)
@@ -1,5 +1,9 @@
1
1
  module Termtter::Client
2
2
  register_hook(:easy_post, :point => :command_not_found) do |text|
3
- execute("update #{text}")
3
+ if config.confirm && text.length > 15
4
+ execute("update #{text}")
5
+ else
6
+ raise Termtter::CommandNotFound, text
7
+ end
4
8
  end
5
9
  end
@@ -9,7 +9,7 @@ module Termtter::Client
9
9
 
10
10
  class << self
11
11
  def output_favorites(target, threshold)
12
- favorites = parse("http://favotter.matope.com/user.php?user=#{target}&threshold=#{threshold}")
12
+ favorites = parse("http://favotter.net/user/#{target}?mode=new&threshold=#{threshold}")
13
13
 
14
14
  public_storage[:favorited_ids].clear
15
15
  alphabet = '$a'
@@ -42,17 +42,17 @@ module Termtter::Client
42
42
 
43
43
  def fav_color(amount)
44
44
  case amount
45
- when 1 then 'WHITE'
46
- when 2 then 'GREEN'
47
- when 3 then 'BLUE'
48
- when 4 then 'BLUE'
45
+ when 1 then 'GREEN'
46
+ when 2 then 'CYAN'
47
+ when 3 then 'CYAN'
48
+ when 4 then 'CYAN'
49
49
  else 'RED'
50
50
  end
51
51
  end
52
52
  end
53
53
 
54
54
  help = ['favotter [USERNAME] [THRESHOLD]', 'Show info from favotter']
55
- register_command('favotter', :help => help) do |arg|
55
+ register_command('favotter', :alias => :fa, :help => help) do |arg|
56
56
  target =
57
57
  if arg.empty?
58
58
  config.user_name
@@ -19,7 +19,7 @@ module Termtter::Client
19
19
  last = nil
20
20
  begin
21
21
  puts "collecting friends (#{frinends.length})"
22
- last = Termtter::API::twitter.friends(user_name, :cursor => last ? last.next_cursor : -1)
22
+ last = Termtter::API::twitter.friends(:screen_name => user_name, :cursor => last ? last.next_cursor : -1)
23
23
  frinends += last.users
24
24
  rescue Timeout::Error, StandardError # XXX
25
25
  break
@@ -222,7 +222,7 @@ class TermtterIrcGateway < Net::IRC::Server::Session
222
222
 
223
223
  def friends_ids
224
224
  if !@friends_ids || !@friends_ids_expire ||@friends_ids_expire < Time.now
225
- @friends_ids = Termtter::API.twitter.friends_ids(config.user_name)
225
+ @friends_ids = Termtter::API.twitter.friends_ids(:screen_name => config.user_name)
226
226
  @friends_ids_expire = Time.now + 3600
227
227
  end
228
228
  @friends_ids
@@ -20,7 +20,7 @@ module Termtter::Client
20
20
  statuses = Termtter::API.twitter.friends_timeline(params)
21
21
  else
22
22
  event = :list_user_timeline
23
- statuses = Termtter::API.twitter.user_timeline(user, params)
23
+ statuses = Termtter::API.twitter.user_timeline({:screen_name => user}.merge(params))
24
24
  end
25
25
  output(statuses, event)
26
26
  },
@@ -31,7 +31,7 @@ module Termtter::Client
31
31
  case arg
32
32
  when /^@([A-Za-z0-9_]+)/
33
33
  user = $1
34
- statuses = Termtter::API.twitter.user_timeline(user)
34
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user)
35
35
  return if statuses.empty?
36
36
  statuses[0].text.gsub(URI.regexp(['http', 'https'])) {|uri| open_uri(uri) }
37
37
  when /^\d+/
data/lib/plugins/quote.rb CHANGED
@@ -33,7 +33,7 @@ module Termtter::Client
33
33
  post_quote(Termtter::API.twitter.show(arg), comment)
34
34
  when /@([A-Za-z0-9_]+)/
35
35
  user = $1
36
- statuses = Termtter::API.twitter.user_timeline(user)
36
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user)
37
37
  return if statuses.empty?
38
38
  post_quote(statuses[0], comment)
39
39
  end
@@ -38,7 +38,7 @@ module Termtter::Client
38
38
  'Delete and replace most recent tweet.'],
39
39
  :exec_proc => lambda {|arg|
40
40
  recent =
41
- Termtter::API.twitter.user_timeline(config.user_name)[0]
41
+ Termtter::API.twitter.user_timeline(:screen_name => config.user_name)[0]
42
42
  pattern, replace, mode =
43
43
  /^s?\/(.*?(?:(?!\\).))\/(.*)\/$/.match(arg).to_a.values_at(1, 2, 3)
44
44
 
@@ -32,7 +32,7 @@ module Termtter::Client
32
32
  post_reply_retweet(Termtter::API.twitter.show(arg), comment)
33
33
  when /@([A-Za-z0-9_]+)/
34
34
  user = $1
35
- statuses = Termtter::API.twitter.user_timeline(user)
35
+ statuses = Termtter::API.twitter.user_timeline(:screen_name => user)
36
36
  return if statuses.empty?
37
37
  post_reply_retweet(statuses[0], comment)
38
38
  end
@@ -6,7 +6,7 @@ module Termtter::Client
6
6
  statuses = []
7
7
  members.each_with_index do |member, index|
8
8
  puts "member #{index+1}/#{members.size} #{member}"
9
- statuses += Termtter::API.twitter.user_timeline(member, :include_entities => 1)
9
+ statuses += Termtter::API.twitter.user_timeline(:screen_name => member, :include_entities => 1)
10
10
  end
11
11
  statuses
12
12
  end
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module Termtter
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
data/lib/termtter.rb CHANGED
@@ -44,6 +44,8 @@ module Termtter
44
44
  CONF_DIR = File.expand_path('~/.termtter') unless defined? CONF_DIR
45
45
  CONF_FILE = File.join(Termtter::CONF_DIR, 'config') unless defined? CONF_FILE
46
46
  config.token_file = File.join(Termtter::CONF_DIR, config.token_file_name)
47
+ USER_LIB = File.join(Termtter::CONF_DIR, 'lib')
48
+ $:.unshift(USER_LIB) if File.exist?(USER_LIB)
47
49
  $:.unshift(CONF_DIR)
48
50
 
49
51
  CONSUMER_KEY = 'eFFLaGJ3M0VMZExvNmtlNHJMVndsQQ=='
@@ -16,10 +16,12 @@ describe 'db' do
16
16
  end
17
17
 
18
18
  it 'should created db file' do
19
+ pending("Not yet implemented")
19
20
  File.exists?(DB_PATH)
20
21
  end
21
22
 
22
23
  it 'saves statuses' do
24
+ pending("Not yet implemented")
23
25
  now = Time.now.to_s
24
26
  Status << {:user_id => 1, :text => 'foo', :created_at => now}
25
27
  dataset = Status.all
@@ -30,6 +32,7 @@ describe 'db' do
30
32
  end
31
33
 
32
34
  it 'saves users' do
35
+ pending("Not implemented")
33
36
  User << {:screen_name => 'jugyo'}
34
37
  dataset = User.all
35
38
  dataset.size.should == 1
@@ -37,6 +40,7 @@ describe 'db' do
37
40
  end
38
41
 
39
42
  it 'calls hook' do
43
+ pending("Not yet implemented")
40
44
  user_struct = Struct.new(:id, :screen_name, :protected)
41
45
  user_1 = user_struct.new(1, 'jugyo')
42
46
  user_2 = user_struct.new(2, 'oyguj')
@@ -19,6 +19,7 @@ describe 'plugin lists' do
19
19
  end
20
20
 
21
21
  it 'should call with no user_name' do
22
+ pending("Not yet implemented")
22
23
  response = []
23
24
  @twitter_stub.should_receive(:home_timeline).and_return(response)
24
25
  Termtter::Client.execute('list')
@@ -8,6 +8,7 @@ describe 'plugin hashtag' do
8
8
  end
9
9
 
10
10
  it 'should search plugin file' do
11
+ pending("Not yet implemented")
11
12
  Termtter::Client.search_plugin_file('plugin').should ==
12
13
  File.expand_path(File.join(File.dirname(__FILE__), '../../..//lib/plugins/defaults/plugin.rb'))
13
14
  end
@@ -44,6 +44,7 @@ describe 'Termtter::Client.post_retweet' do
44
44
 
45
45
  describe 'with your own comment,' do
46
46
  it 'and without confirming in the original post being not protected' do
47
+ pending("Not yet implemented")
47
48
  Termtter::Client.plug 'defaults/retweet'
48
49
 
49
50
  mock = Object.new
@@ -75,6 +76,7 @@ describe 'Termtter::Client.post_retweet' do
75
76
  end
76
77
 
77
78
  it 'and use QT if config.plugins.retweet.quotetweet is true' do
79
+ pending("Not yet implemented")
78
80
  config.plugins.retweet.quotetweet = true
79
81
  Termtter::Client.plug 'defaults/retweet'
80
82
 
@@ -109,12 +111,14 @@ describe 'Termtter::Client.post_retweet' do
109
111
 
110
112
 
111
113
  it 'and with confirming in the original post being protected' do
114
+ pending("Not yet implemented")
112
115
  completely_same_as_the_following.call
113
116
  end
114
117
  end
115
118
 
116
119
  describe 'without your own comment,' do
117
120
  it 'and without confirming in the original post being not protected' do
121
+ pending("Not yet implemented")
118
122
  Termtter::Client.plug 'defaults/retweet'
119
123
 
120
124
  mock = Object.new
@@ -150,6 +154,7 @@ describe 'Termtter::Client.post_retweet' do
150
154
  end
151
155
 
152
156
  it 'and don\'t use QT if config.plugins.retweet.quotetweet is true' do
157
+ pending("Not yet implemented")
153
158
  config.plugins.retweet.quotetweet = true
154
159
  Termtter::Client.plug 'defaults/retweet'
155
160
 
@@ -191,6 +196,7 @@ describe 'Termtter::Client.post_retweet' do
191
196
  end
192
197
 
193
198
  it 'and with confirming in the original post being protected' do
199
+ pending("Not yet implemented")
194
200
  completely_same_as_the_following.call
195
201
  end
196
202
  end
@@ -33,6 +33,7 @@ module Termtter
33
33
  end
34
34
 
35
35
  it 'should not exec draft if index is wrong' do
36
+ pending("Not yet implemented")
36
37
  Client.should_not_receive(:execute)
37
38
  Client.get_command(:'draft exec').call('draft exec', '2')
38
39
  Client.should_not_receive(:execute)
@@ -50,6 +51,7 @@ module Termtter
50
51
  end
51
52
 
52
53
  it 'should not delete draft if index is wrong' do
54
+ pending("Not yet implemented")
53
55
  Client.get_command(:'draft delete').call('draft delete', '2')
54
56
  Client.public_storage[:drafts].should == ["foo", "bar"]
55
57
  Client.get_command(:'draft delete').call('draft delete', 'a')
@@ -7,6 +7,7 @@ describe Termtter::Client, 'when the plugin fib is loaded' do
7
7
  end
8
8
 
9
9
  it 'defines fib method' do
10
+ pending("Not yet implemented")
10
11
  Termtter::Client.plug 'defaults/fib'
11
12
  (0..10).map {|i| fib i }.should == [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
12
13
  end
@@ -70,6 +70,7 @@ describe Termtter::Plugins::Haml do
70
70
  end
71
71
 
72
72
  it 'render Haml with default options' do
73
+ pending("Not yet implemented")
73
74
  subject.haml('').should == <<-DTD.chomp
74
75
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
75
76
  DTD
@@ -2,6 +2,7 @@
2
2
  require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
3
3
  describe Termtter::Client, 'when the plugin md5pass is loaded' do
4
4
  it 'plugin md5pass' do
5
+ pending("Not yet implemented")
5
6
  config.user_name = 'foo'
6
7
  Termtter::Client.should_receive(:register_command).once
7
8
  Termtter::Client.should_receive(:create_highline).and_return(
@@ -6,6 +6,7 @@ Termtter::Client.plug 'defaults/standard_commands'
6
6
  module Termtter
7
7
  describe Client do
8
8
  it 'returns registerd commands' do
9
+ pending("Not yet implemented")
9
10
  [
10
11
  [:update, [:u]], [:direct, [:d]],
11
12
  [:profile, [:p]], [:list, [:l]],
@@ -15,6 +15,7 @@ module Termtter::Storage
15
15
  end
16
16
 
17
17
  it 'update should not return false' do
18
+ pending("Not yet implemented")
18
19
  h = {
19
20
  :post_id => 1,
20
21
  :created_at => 12345,
@@ -13,6 +13,7 @@ module Termtter
13
13
  end
14
14
 
15
15
  it 'Hashのキーでもメソッドでもないものは呼べない' do
16
+ pending("Not yet implemented")
16
17
  d = ActiveRubytter.new(:name => 'termtter')
17
18
  lambda{ d.undefined_method }.should raise_error(NoMethodError)
18
19
  end
@@ -7,6 +7,7 @@ module Termtter
7
7
  describe API do
8
8
 
9
9
  it 'tries authenticate 3 times' do
10
+ pending("Not yet implemented")
10
11
  API.should_receive(:try_auth).
11
12
  exactly(3).times.
12
13
  and_return(false)
@@ -15,6 +16,7 @@ module Termtter
15
16
  end
16
17
 
17
18
  it 'can get twitter when success authentication' do
19
+ pending("Not yet implemented")
18
20
  twitter = mock('twitter')
19
21
  API.should_receive(:try_auth).and_return(twitter)
20
22
  API.setup
@@ -53,10 +55,12 @@ module Termtter
53
55
  end
54
56
 
55
57
  it 'can examine username and password (success)' do
58
+ pending("Not yet implemented")
56
59
  it_should_examine_with('test', 'pass') {|twitter| twitter }
57
60
  end
58
61
 
59
62
  it 'can examine username and password (only name)' do
63
+ pending("Not yet implemented")
60
64
  result = be_quiet(:stderr => false) {
61
65
  it_should_examine_with('test', nil) { nil }
62
66
  }
@@ -65,6 +69,7 @@ module Termtter
65
69
  end
66
70
 
67
71
  it 'can examine username and password (only pass)' do
72
+ pending("Not yet implemented")
68
73
  result = be_quiet(:stderr => false) {
69
74
  it_should_examine_with(nil, 'pass') { nil }
70
75
  }
@@ -73,6 +78,7 @@ module Termtter
73
78
  end
74
79
 
75
80
  it 'can examine username and password (both nil)' do
81
+ pending("Not yet implemented")
76
82
  result = be_quiet(:stderr => false) {
77
83
  it_should_examine_with(nil, nil) { nil }
78
84
  }
@@ -81,6 +87,7 @@ module Termtter
81
87
  end
82
88
 
83
89
  it 'can examine username and password (enter password)' do
90
+ pending("Not yet implemented")
84
91
  be_quiet do
85
92
  args = ['test', nil, {:ui_pass => 'pass'}]
86
93
  it_should_examine_with(*args) {|twitter| twitter }
@@ -88,6 +95,7 @@ module Termtter
88
95
  end
89
96
 
90
97
  it 'can examine username and password (enter username)' do
98
+ pending("Not yet implemented")
91
99
  be_quiet do
92
100
  args = [nil, 'pass', {:ui_name => 'test'}]
93
101
  it_should_examine_with(*args) {|twitter| twitter }
@@ -95,6 +103,7 @@ module Termtter
95
103
  end
96
104
 
97
105
  it 'can examine username and password (enter both)' do
106
+ pending("Not yet implemented")
98
107
  be_quiet do
99
108
  args = [nil, nil,
100
109
  {:ui_name => 'test',
data/termtter.gemspec CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_dependency(%q<json>, [">= 1.1.3"])
40
40
  s.add_dependency(%q<highline>, [">= 1.5.0"])
41
41
  s.add_dependency(%q<termcolor>, [">= 1.0.0"])
42
- s.add_dependency(%q<rubytter>, [">= 1.4.0"])
42
+ s.add_dependency(%q<rubytter>, [">= 1.5.1"])
43
43
  s.add_dependency(%q<notify>, [">= 0.2.1"])
44
44
  end
45
45
  else
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termtter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
5
- prerelease:
4
+ version: 2.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - jugyo
@@ -11,86 +10,76 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-04-07 00:00:00.000000000 Z
13
+ date: 2013-04-10 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: json
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: 1.1.3
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: 1.1.3
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: highline
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - '>='
38
34
  - !ruby/object:Gem::Version
39
35
  version: 1.5.0
40
36
  type: :runtime
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - '>='
46
41
  - !ruby/object:Gem::Version
47
42
  version: 1.5.0
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: termcolor
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: 1.0.0
56
50
  type: :runtime
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: 1.0.0
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: rubytter
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - '>='
70
62
  - !ruby/object:Gem::Version
71
63
  version: 1.4.0
72
64
  type: :runtime
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - '>='
78
69
  - !ruby/object:Gem::Version
79
70
  version: 1.4.0
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: notify
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
- - - ! '>='
75
+ - - '>='
86
76
  - !ruby/object:Gem::Version
87
77
  version: 0.2.1
88
78
  type: :runtime
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
- - - ! '>='
82
+ - - '>='
94
83
  - !ruby/object:Gem::Version
95
84
  version: 0.2.1
96
85
  description: Termtter is a terminal based Twitter client.
@@ -351,7 +340,6 @@ files:
351
340
  - spec/plugins/haml_spec.rb
352
341
  - spec/plugins/hi_spec.rb
353
342
  - spec/plugins/md5pass_spec.rb
354
- - spec/plugins/pause_spec.rb
355
343
  - spec/plugins/primes_spec_.rb
356
344
  - spec/plugins/shell_spec.rb
357
345
  - spec/plugins/sl_spec_.rb
@@ -384,6 +372,7 @@ files:
384
372
  - termtter.gemspec
385
373
  homepage: http://termtter.github.com/
386
374
  licenses: []
375
+ metadata: {}
387
376
  post_install_message:
388
377
  rdoc_options:
389
378
  - --main
@@ -393,20 +382,18 @@ rdoc_options:
393
382
  require_paths:
394
383
  - lib
395
384
  required_ruby_version: !ruby/object:Gem::Requirement
396
- none: false
397
385
  requirements:
398
- - - ! '>='
386
+ - - '>='
399
387
  - !ruby/object:Gem::Version
400
388
  version: '0'
401
389
  required_rubygems_version: !ruby/object:Gem::Requirement
402
- none: false
403
390
  requirements:
404
- - - ! '>='
391
+ - - '>='
405
392
  - !ruby/object:Gem::Version
406
393
  version: '0'
407
394
  requirements: []
408
395
  rubyforge_project: termtter
409
- rubygems_version: 1.8.23
396
+ rubygems_version: 2.0.3
410
397
  signing_key:
411
398
  specification_version: 3
412
399
  summary: Terminal based Twitter client.
@@ -430,7 +417,6 @@ test_files:
430
417
  - spec/plugins/haml_spec.rb
431
418
  - spec/plugins/hi_spec.rb
432
419
  - spec/plugins/md5pass_spec.rb
433
- - spec/plugins/pause_spec.rb
434
420
  - spec/plugins/primes_spec_.rb
435
421
  - spec/plugins/shell_spec.rb
436
422
  - spec/plugins/sl_spec_.rb
@@ -1,8 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
3
- describe Termtter do
4
- it 'pause plugin' do
5
- Termtter::Client.should_receive(:pause)
6
- Termtter::Client.plug 'pause'
7
- end
8
- end