lib/t/list.rb in t-1.7.2 vs lib/t/list.rb in t-2.0.0

- old
+ new

@@ -54,13 +54,12 @@ def information(list) owner, list = extract_owner(list, options) list = client.list(owner, list) if options['csv'] require 'csv' - require 'fastercsv' unless Array.new.respond_to?(:to_csv) say ["ID", "Description", "Slug", "Screen name", "Created at", "Members", "Subscribers", "Following", "Mode", "URL"].to_csv - say [list.id, list.description, list.slug, list.user.screen_name, csv_formatted_time(list), list.member_count, list.subscriber_count, list.following?, list.mode, "https://twitter.com#{list.uri}"].to_csv + say [list.id, list.description, list.slug, list.user.screen_name, csv_formatted_time(list), list.member_count, list.subscriber_count, list.following?, list.mode, list.uri].to_csv else array = [] array << ["ID", list.id.to_s] array << ["Description", list.description] unless list.description.nil? array << ["Slug", list.slug] @@ -68,11 +67,11 @@ array << ["Created at", "#{ls_formatted_time(list)} (#{time_ago_in_words(list.created_at)} ago)"] array << ["Members", number_with_delimiter(list.member_count)] array << ["Subscribers", number_with_delimiter(list.subscriber_count)] array << ["Status", list.following ? "Following" : "Not following"] array << ["Mode", list.mode] - array << ["URL", "https://twitter.com#{list.uri}"] + array << ["URL", list.uri] print_table(array) end end map %w(details) => :information @@ -83,12 +82,10 @@ method_option "reverse", :aliases => "-r", :type => :boolean, :default => false, :desc => "Reverse the order of the sort." method_option "sort", :aliases => "-s", :type => :string, :enum => %w(favorites followers friends listed screen_name since tweets tweeted), :default => "screen_name", :desc => "Specify the order of the results.", :banner => "ORDER" method_option "unsorted", :aliases => "-u", :type => :boolean, :default => false, :desc => "Output is not sorted." def members(list) owner, list = extract_owner(list, options) - users = collect_with_cursor do |cursor| - client.list_members(owner, list, :cursor => cursor) - end + users = client.list_members(owner, list).to_a print_users(users) end desc "remove LIST USER [USER...]", "Remove members from a list." method_option "id", :aliases => "-i", :type => :boolean, :default => false, :desc => "Specify input as Twitter user IDs instead of screen names."