Sha256: cce618c93791efd3ef65e431147e4ed04aea054a26ca23655bd49157793166f1

Contents?: true

Size: 592 Bytes

Versions: 5

Compression:

Stored size: 592 Bytes

Contents

module Datapimp
  class Sync::DropboxFolder < Hashie::Mash
    def dropbox
      @dropbox ||= Datapimp::Sync.dropbox
    end

    def delta
      @delta ||= dropbox.delta(cursor, remote_path)
    end

    def local_path
      Pathname(local)
    end

    def remote_path
      Datapimp::Sync.dropbox.ls(remote)
    end

    def cursor
      cursor_path.exist? && cursor_path.read
    end

    def cursor_path
      local_path.join('.dropbox-cursor')
    end

    def run(action)
      action = action.to_sym

      if action == :push

      elsif action == :pull

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
datapimp-1.0.5 lib/datapimp/sync/dropbox_folder.rb
datapimp-1.0.4 lib/datapimp/sync/dropbox_folder.rb
datapimp-1.0.3 lib/datapimp/sync/dropbox_folder.rb
datapimp-1.0.2 lib/datapimp/sync/dropbox_folder.rb
datapimp-1.0.1 lib/datapimp/sync/dropbox_folder.rb