slipsquare 0.0.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +9 -1
- data/README.md +7 -2
- data/lib/slipsquare/middleware/chunked_upload.rb +7 -7
- data/lib/slipsquare/version.rb +1 -1
- data/slipsquare.gemspec +2 -1
- data/spec/cli/{delete_file.rb → delete_file_spec.rb} +2 -2
- data/spec/spec_helper.rb +10 -0
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27886ae060f6f3a98828b7829876e2cf2f4b59bc
|
4
|
+
data.tar.gz: 18f889a72b027a4bcc50d8ca72a05357dd507a16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c15c78db5eb3da0ae7efe62bdafbe634dc919ab5ad1bf72af85c8785eb32fb5a031567b2e583a2497d9e174ff619643739b058f6550b0fbe3e13687fe4bf74e
|
7
|
+
data.tar.gz: 24ad692525bd079ab6d04d1338c517a055d7bdc9cd9afd70656c93aa2e938345fa05c4e492cab5aea8f7729493de4dd329e8e3b1e888805ce817328878f288a1
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
## 0.0.
|
1
|
+
## 0.0.2 (Unreleased)
|
2
|
+
|
3
|
+
* Implement Delete method
|
4
|
+
* Add various copy methods for directories
|
5
|
+
* Work out how Table Print works to prevent the "method not found" stuff
|
6
|
+
* Refactor tests and do more stubbing
|
7
|
+
* Add ability to give pathnames as "" strings, as OSX terminal doesn't like spaces...
|
8
|
+
|
9
|
+
## 0.0.1
|
2
10
|
|
3
11
|
Initial release.
|
4
12
|
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Slipsquare
|
2
2
|
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/petems/slipsquare/badge.png?branch=master)](https://coveralls.io/r/petems/slipsquare?branch=master)
|
4
|
+
[![Build Status](https://travis-ci.org/petems/slipsquare.svg?branch=master)](https://travis-ci.org/petems/slipsquare)
|
5
|
+
|
3
6
|
A work-in-progress command line tool for uploading files to Dropbox, heavily inspired by tools such as
|
4
7
|
[Dropbox Uploader](https://github.com/andreafabrizi/Dropbox-Uploader) and [Tugboat](https://github.com/pearkes/tugboat)
|
5
8
|
|
@@ -7,8 +10,6 @@ A work-in-progress command line tool for uploading files to Dropbox, heavily ins
|
|
7
10
|
|
8
11
|
gem install slipsquare
|
9
12
|
|
10
|
-
Note: Currently not on Rubygems yet...
|
11
|
-
|
12
13
|
### Configuration
|
13
14
|
|
14
15
|
Run the configuration utility, `slipsquare authorize`.
|
@@ -91,3 +92,7 @@ Feel free to open issues in case of bugs or improvments.
|
|
91
92
|
## Contributing
|
92
93
|
|
93
94
|
See the [contributing guide](CONTRIBUTING.md). Pull-requests welcome!
|
95
|
+
|
96
|
+
|
97
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/petems/slipsquare/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
98
|
+
|
@@ -5,23 +5,23 @@ module Slipsquare
|
|
5
5
|
class ChunkedUpload < Base
|
6
6
|
def call(env)
|
7
7
|
say "Starting chunked upload"
|
8
|
-
|
8
|
+
|
9
9
|
file_name = env['chunked_upload_file_name']
|
10
10
|
contents = File.open(env['chunked_upload_file_name'])
|
11
11
|
total_size = File.size(env['chunked_upload_file_name'])
|
12
12
|
|
13
13
|
say "Total Size: #{total_size} bytes"
|
14
|
-
upload_progress_bar = ProgressBar.create(:title => "Upload progress",
|
14
|
+
upload_progress_bar = ProgressBar.create(:title => "Upload progress",
|
15
15
|
:format => '%a <%B> %p%% %t',
|
16
|
-
:starting_at => 0,
|
16
|
+
:starting_at => 0,
|
17
17
|
:total => total_size)
|
18
18
|
|
19
|
-
response = env['dropbox-client'].chunked_upload file_name, contents do |offset, upload|
|
20
|
-
upload_progress_bar.progress
|
21
|
-
end
|
19
|
+
response = env['dropbox-client'].chunked_upload file_name, contents do |offset, upload|
|
20
|
+
upload_progress_bar.progress = offset
|
21
|
+
end
|
22
22
|
|
23
23
|
say "File uploaded successfully!"
|
24
|
-
|
24
|
+
|
25
25
|
@app.call(env)
|
26
26
|
end
|
27
27
|
end
|
data/lib/slipsquare/version.rb
CHANGED
data/slipsquare.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_dependency "thor", "~> 0.18.1"
|
22
22
|
gem.add_dependency "middleware" , "~> 0.1.0"
|
23
23
|
|
24
|
-
gem.add_dependency "dropbox-api-petems", "
|
24
|
+
gem.add_dependency "dropbox-api-petems", "1.1.0"
|
25
25
|
gem.add_dependency "table_print", "~> 1.1.5"
|
26
26
|
gem.add_dependency "ruby-progressbar", "~> 1.2.0"
|
27
27
|
|
@@ -30,5 +30,6 @@ Gem::Specification.new do |gem|
|
|
30
30
|
gem.add_development_dependency "rspec-expectations", "~> 2.13.0"
|
31
31
|
gem.add_development_dependency "rspec-mocks", "~> 2.13.0"
|
32
32
|
gem.add_development_dependency "webmock", "~> 1.11.0"
|
33
|
+
gem.add_development_dependency "coveralls", "~> 0.7.1"
|
33
34
|
|
34
35
|
end
|
@@ -9,14 +9,14 @@ describe Slipsquare::CLI do
|
|
9
9
|
stub_request(:get, "https://api.dropbox.com/1/metadata/dropbox/foo?").
|
10
10
|
with(:headers => {'Accept'=>'*/*', 'Authorization'=>/OAuth oauth_consumer_key="#{app_key}", oauth_nonce="\S+", oauth_signature="\S+", oauth_signature_method="HMAC-SHA1", oauth_timestamp="\S+", oauth_token="#{app_token}", oauth_version="1.0"/, 'User-Agent'=>'OAuth gem v0.4.7'}).
|
11
11
|
to_return(:status => 200, :body => fixture('find_foo_directory'))
|
12
|
-
|
12
|
+
|
13
13
|
@cli.delete('foo')
|
14
14
|
expect($stdout.string).to eq <<-eos
|
15
15
|
Deleting file on Dropbox...
|
16
16
|
To be implemented...
|
17
17
|
eos
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -2,6 +2,16 @@ require 'slipsquare'
|
|
2
2
|
require 'webmock/rspec'
|
3
3
|
require 'shared/environment'
|
4
4
|
|
5
|
+
require 'simplecov'
|
6
|
+
require 'coveralls'
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
8
|
+
SimpleCov::Formatter::HTMLFormatter,
|
9
|
+
Coveralls::SimpleCov::Formatter
|
10
|
+
]
|
11
|
+
SimpleCov.start do
|
12
|
+
coverage_dir('coverage/')
|
13
|
+
end
|
14
|
+
|
5
15
|
RSpec.configure do |config|
|
6
16
|
# Pretty tests
|
7
17
|
config.color_enabled = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slipsquare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Souter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.1.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: table_print
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.11.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: coveralls
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.7.1
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.7.1
|
153
167
|
description: A command line tool for uploading to dropbox.
|
154
168
|
email:
|
155
169
|
- p.morsou@gmail.com
|
@@ -189,7 +203,7 @@ files:
|
|
189
203
|
- spec/cli/account.rb
|
190
204
|
- spec/cli/authorize_spec.rb
|
191
205
|
- spec/cli/chunked_upload_spec.rb
|
192
|
-
- spec/cli/
|
206
|
+
- spec/cli/delete_file_spec.rb
|
193
207
|
- spec/cli/download_file.rb
|
194
208
|
- spec/cli/get_keys_spec.rb
|
195
209
|
- spec/cli/help_cli_spec.rb
|
@@ -235,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
249
|
version: '0'
|
236
250
|
requirements: []
|
237
251
|
rubyforge_project:
|
238
|
-
rubygems_version: 2.
|
252
|
+
rubygems_version: 2.4.5
|
239
253
|
signing_key:
|
240
254
|
specification_version: 4
|
241
255
|
summary: Slipsquare is a CLI for Dropbox, for downloading and uploading files.
|
@@ -243,7 +257,7 @@ test_files:
|
|
243
257
|
- spec/cli/account.rb
|
244
258
|
- spec/cli/authorize_spec.rb
|
245
259
|
- spec/cli/chunked_upload_spec.rb
|
246
|
-
- spec/cli/
|
260
|
+
- spec/cli/delete_file_spec.rb
|
247
261
|
- spec/cli/download_file.rb
|
248
262
|
- spec/cli/get_keys_spec.rb
|
249
263
|
- spec/cli/help_cli_spec.rb
|