dbox 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ require 'mechanize'
2
+
3
+
4
+
5
+ def login_and_authorize(authorize_url, config)
6
+ a = WWW::Mechanize.new
7
+ a.get(authorize_url) do |page|
8
+ login_form = page.form_with(:action => '/login')
9
+
10
+ login_form.login_email = config['testing_user']
11
+ login_form.login_password = config['testing_password']
12
+ auth_page = login_form.submit()
13
+
14
+ auth_form = auth_page.form_with(:action => 'authorize')
15
+ if auth_form
16
+ auth_button = auth_form.button_with(:value => "Allow")
17
+ auth_form.click_button
18
+ end
19
+
20
+ end
21
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dbox
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Ken Pratt
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-05-14 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: An easy-to-use Dropbox client with fine-grained control over syncs.
22
+ email: ken@kenpratt.net
23
+ executables:
24
+ - dbox
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - LICENSE.txt
29
+ - README.md
30
+ files:
31
+ - .document
32
+ - LICENSE.txt
33
+ - README.md
34
+ - Rakefile
35
+ - TODO.txt
36
+ - VERSION
37
+ - bin/dbox
38
+ - lib/dbox.rb
39
+ - lib/dbox/api.rb
40
+ - lib/dbox/db.rb
41
+ - test/helper.rb
42
+ - test/test_dbox.rb
43
+ - vendor/dropbox-client-ruby/LICENSE
44
+ - vendor/dropbox-client-ruby/README
45
+ - vendor/dropbox-client-ruby/Rakefile
46
+ - vendor/dropbox-client-ruby/config/testing.json.example
47
+ - vendor/dropbox-client-ruby/lib/dropbox.rb
48
+ - vendor/dropbox-client-ruby/manifest
49
+ - vendor/dropbox-client-ruby/test/authenticator_test.rb
50
+ - vendor/dropbox-client-ruby/test/client_test.rb
51
+ - vendor/dropbox-client-ruby/test/util.rb
52
+ homepage: http://github.com/kenpratt/dbox
53
+ licenses:
54
+ - MIT
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirements: []
79
+
80
+ rubyforge_project:
81
+ rubygems_version: 1.8.1
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: Dropbox made easy.
85
+ test_files: []
86
+