Skip to content

Commit

Permalink
addapted to official dropbox sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
panterch committed Nov 23, 2011
1 parent a312bef commit 23c2244
Show file tree
Hide file tree
Showing 8 changed files with 252 additions and 240 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pkg
*.swp
*.gem
17 changes: 7 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
PATH
remote: .
specs:
dummy_dropbox (0.0.5)
dropbox
dummy_dropbox_sdk (0.0.11)
dropbox-sdk (>= 1.1)

GEM
remote: http://rubygems.org/
specs:
dropbox (1.3.0)
json (>= 1.2.0)
multipart-post (>= 1.1.0)
oauth (>= 0.3.6)
json (1.5.3)
multipart-post (1.1.3)
oauth (0.4.5)
dropbox-sdk (1.1)
json
json (1.6.1)

PLATFORMS
ruby

DEPENDENCIES
bundler (>= 1.0.0.rc.6)
dummy_dropbox!
dropbox-sdk (>= 1.1)
dummy_dropbox_sdk!
20 changes: 12 additions & 8 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ http://farm5.static.flickr.com/4136/4925714505_3a3a0a6134_o.jpg

<b>I can image a Dropbox session, just for testing.</b>

Very simple library for mocking the dropbox_ruby_gem[http://rubygems.org/gems/dropbox].
Very simple library for mocking the dropbox-sdk gem
[https://www.dropbox.com/developers/start/setup#ruby].

You can test your application without making real calls to Dropbox API using a *local* *folder* to fake a Dropbox account.


== Install

$ [sudo] gem install dummy_dropbox
$ [sudo] gem install dummy_dropbox_sdk


== Usage

require 'dummy_dropbox'
require 'dummy_dropbox_sdk'

# Optional:
# Point where your local folder structure is located.
# It will be used as if the real Dropbox structure was been reading.
DummyDropbox.root_path = <your_local_folder>

session = Dropbox::Session.new('key', 'secret')
assert_equal( File.read( "<your_local_folder>/file1.txt" ) , @session.download( '/file1.txt' ) )
session = DropboxSession.new('x','y')

See the *test* folder.

Expand All @@ -38,6 +38,10 @@ Please fork it and complete the holes as you need it, them send me your pull req

== Credits

Author:: Fernando Guillen: http://fernandoguillen.info
Copyright:: Copyright (c) 2010 Fernando Guillen
License:: Released under the MIT license.
This is an adapted version of the dummy_dropbox gem mocking another dropbox
library [https://github.com/fguillen/DummyDropbox].

Original Author:: Fernando Guillen: http://fernandoguillen.info
Author:: Panter llc: http://www.panter.ch
Copyright:: Copyright (c) 2011 Panter llc
License:: Released under the MIT license.
14 changes: 7 additions & 7 deletions dummy_dropbox.gemspec → dummy_dropbox_sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ $:.push File.expand_path("../lib", __FILE__)
require "version"

Gem::Specification.new do |s|
s.name = "dummy_dropbox"
s.name = "dummy_dropbox_sdk"
s.version = DummyDropbox::VERSION
s.authors = ["Fernando Guillen"]
s.email = ["[email protected]"]
s.homepage = "https://github.com/fguillen/DummyDropbox"
s.summary = "Dummy monkey patching for the dropbox ruby gem: 'dropbox'"
s.description = "Dummy monkey patching for the dropbox ruby gem: 'dropbox'. You can test your Dropbox utility using a local folder to simulate your Dropbox folder."
s.authors = ["Panter llc"]
s.email = ["[email protected]"]
s.homepage = "https://github.com/panter/dummy_dropbox_sdk"
s.summary = "Dummy monkey patching for the dropbox-sdk ruby gem: 'dropbox-sdk'"
s.description = "Dummy monkey patching for the dropbox-sdk ruby gem: 'dropbox-sdk'. You can test your Dropbox utility using a local folder to simulate your Dropbox folder."

s.rubyforge_project = "DummyDropbox"

s.add_development_dependency "bundler", ">= 1.0.0.rc.6"

s.add_dependency "dropbox"
s.add_dependency "dropbox-sdk", ">= 1.1"

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down
151 changes: 0 additions & 151 deletions lib/dummy_dropbox.rb

This file was deleted.

Loading

0 comments on commit 23c2244

Please sign in to comment.