GithubHelp home page GithubHelp logo

timothyf / rubydrop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meltingice/coffeedrop

1.0 2.0 0.0 132 KB

RubyDrop is my first ever Ruby project that aims to be an open-source, roll-your-own, Dropbox clone. It uses Git as the backend for file tracking and remote syncing.

Home Page: http://blog.meltingice.net/programming/rubydrop-open-source-alternative-dropbox/

License: BSD 3-Clause "New" or "Revised" License

rubydrop's Introduction

RubyDrop

RubyDrop is my first ever Ruby project that aims to be an open-source, roll-your-own, Dropbox clone using Git as the backend. There's still a lot of details to work out, and the code may be a little messy, so you'll have to bear with me (it's a process).

Prerequisites

  • RubyGems
  • Grit
  • Ruby 1.9+ (need require_relative function)

How to Run

You can start RubyDrop by simply running:

./RubyDrop &

By default, the RubyDrop folder that it monitors is created (if it doesn't exist already) at ~/RubyDrop. To change this path, simply edit config.yml. It also initializes a Git repository in the folder automatically, if it doesn't already exist.

Handling Remote File Syncing and Tracking

After much deliberation, I have decided to go with Git for handling file tracking and remote file syncing. We'll see how well this pans out...

Currently, you must manually create the git repo on your remote server. This will be automated as soon as I can write RubyDrop-Server. If you are new to Git, this is how you do it (assuming you are SSH'd into your remote server):

First, you will probably want to make a new user for RubyDrop:

adduser rubydrop

Then, make it possible for RubyDrop to make a passwordless SSH connection to the server:

"Shortest passwordless ssh tutorial, ever"

Finally, you will need to make the repository folder on the remote server (login to the remote server the newly created 'rubydrop' user):

cd ~/
git init RubyDrop.git --bare

That's it! Yes, I'm aware that was a really rough guide.

Controlling RubyDrop

RubyDrop has a TCP interface that you can use to communicate with it while its running. The simplest and easiest way to do so is by using telnet.

Here's an example that halts the RubyDrop daemon (by sending 'stop'):

telnet localhost 11311
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Thu Nov 25 03:23:48 2010
Welcome to RubyDrop
stop
RubyDrop daemon halting!
Connection closed by foreign host.

TCP Interface Commands

* config_get [name] * Retrieves the value from the RubyDrop config specified by [name] * stop * Halts the daemon * quit * Ends the TCP session, but leaves the daemon and TCP server running

rubydrop's People

Contributors

meltingice avatar

Stargazers

Timothy Fisher avatar

Watchers

Timothy Fisher avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.