Sha256: b7f0548ef6899bdce63c79309d61390497a860b056622077b58cf562b41ecee6

Contents?: true

Size: 530 Bytes

Versions: 2

Compression:

Stored size: 530 Bytes

Contents

# library loader
# require 'rubygems'
# require 'bundler'
# Bundler.setup

$LOAD_PATH.unshift(File.dirname(__FILE__)) unless $LOAD_PATH.include?(File.dirname(__FILE__))

require 'cablegator/wikileaks'

module CableGator
  def self.save_file(pathname)
    require 'fileutils'
    save_file = File.expand_path(pathname)
    FileUtils.mkdir_p(File.dirname(save_file))

    tweeted = File.read(save_file).split(',') rescue []
    at_exit do
      File.open(save_file, 'w') { |f| f << tweeted.join(',') }
    end
    tweeted
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cablegator-1.0.0 lib/cablegator.rb
cablegator-0.9.9 lib/cablegator.rb