Sha256: 59636fc75253bb806fec009301c28c28b70610ac798d8d6677dae213b549cc49

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

#!/usr/bin/env ruby

require 'hive'

config = Hive::Base.connection_config.dup
config[:password] = '*' * 8

puts "hivemind-ruby-#{Hive::VERSION}"

puts "Database config:"
config.each do |k, v|
  puts "\t#{k}: #{v}"
end

case ARGV[0]
when 'console' then exec 'irb -r hive -I #{__FILE__}/../lib'
else
  last_block = begin
    Hive::Block.last
  rescue => e
    puts e.inspect
    exit
  end

  puts "Totals synced so far:"
  puts "\tBlocks: #{last_block.num} (#{last_block.created_at})"
  puts "\tAccounts: #{Hive::Account.count}"
  puts "\tPosts: #{Hive::Post.count}"
  puts "\tReblogs: #{Hive::Reblog.count}"
  puts "\tFollows: #{Hive::Follow.count}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hivemind-ruby-0.1.0 bin/hivemind-ruby