cloudapp 0.0.1 → 0.0.2
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.
- data/Gemfile.lock +6 -0
- data/README.md +32 -0
- data/bin/cloudapp +30 -0
- data/cloudapp.gemspec +5 -2
- data/lib/cloudapp.rb +1 -1
- metadata +30 -6
data/Gemfile.lock
CHANGED
@@ -3,6 +3,8 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
cloudapp (0.0.1)
|
5
5
|
main
|
6
|
+
typhoeus
|
7
|
+
yajl-ruby
|
6
8
|
|
7
9
|
GEM
|
8
10
|
remote: http://rubygems.org/
|
@@ -16,7 +18,11 @@ GEM
|
|
16
18
|
fattr (~> 2.2.0)
|
17
19
|
map (~> 5.1.0)
|
18
20
|
map (5.1.0)
|
21
|
+
mime-types (1.17.2)
|
19
22
|
rake (0.9.2.2)
|
23
|
+
typhoeus (0.3.3)
|
24
|
+
mime-types
|
25
|
+
yajl-ruby (1.1.0)
|
20
26
|
|
21
27
|
PLATFORMS
|
22
28
|
ruby
|
data/README.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
1
|
# CloudApp CLI
|
2
2
|
|
3
3
|
Experience all the pleasures of sharing with CloudApp now in your terminal.
|
4
|
+
|
5
|
+
|
6
|
+
## Desired Usage
|
7
|
+
|
8
|
+
The goal of `cloudapp` is to be Unix-friendly and handle the following uses:
|
9
|
+
|
10
|
+
- Bookmark a link: `cloudapp bookmark http://getcloudapp.com`
|
11
|
+
- Share a file: `cloudapp file screenshot.png`
|
12
|
+
- Share several files: `cloudapp file *.png`
|
13
|
+
- Archive and share several files: `cloudapp file *.png --archive`
|
14
|
+
- Encrypt and share a file: `cloudapp file launch_codes.txt --encrypt`
|
15
|
+
- Download and decrypt an encrypted drop: `cloudapp http://cl.ly/abc123 def456`
|
16
|
+
|
17
|
+
|
18
|
+
## Harness the Power
|
19
|
+
|
20
|
+
Sure you could copy the new drop's link by piping the output to `pbcopy`, but
|
21
|
+
that's a lot of extra key presses. Instead, try setting this super secret
|
22
|
+
Cloud.app preference:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
defaults write com.linebreak.CloudAppMacOSX CLUploadShouldCopyExternallyUploadedItems -bool YES
|
26
|
+
```
|
27
|
+
|
28
|
+
Now the link to every new drop shared with your account--even using a tool other
|
29
|
+
than the Mac app--will be copied to your Mac's clipboard. If you're using the
|
30
|
+
[stand-alone version][stand-alone] of Cloud.app and not
|
31
|
+
[the Mac App Store version][mas], use the domain
|
32
|
+
`com.linebreak.CloudAppMacOSXSparkle`.
|
33
|
+
|
34
|
+
[stand-alone]: http://getcloudapp.com/download
|
35
|
+
[mas]: http://itunes.apple.com/us/app/cloud/id417602904?mt=12&ls=1
|
data/bin/cloudapp
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'main'
|
4
|
+
require 'typhoeus'
|
5
|
+
require 'yajl'
|
6
|
+
|
7
|
+
Main do
|
8
|
+
config email: 'arthur@dent.com', password: 'towel'
|
9
|
+
|
10
|
+
# Bookmark a link: `cloudapp bookmark http://getcloudapp.com`
|
11
|
+
mode :bookmark do
|
12
|
+
argument('uri') { cast :uri }
|
13
|
+
|
14
|
+
def run
|
15
|
+
uri = params[:uri].value
|
16
|
+
body = Yajl::Encoder.encode item: { redirect_url: uri }
|
17
|
+
response = Typhoeus::Request.post 'http://my.cl.ly/items',
|
18
|
+
verbose: ENV.fetch('DEBUG', false),
|
19
|
+
body: body,
|
20
|
+
username: config[:email],
|
21
|
+
password: config[:password],
|
22
|
+
auth_method: :digest,
|
23
|
+
headers: { 'Accept' => 'application/json',
|
24
|
+
'Content-Type' => 'application/json' }
|
25
|
+
|
26
|
+
json = Yajl::Parser.new(:symbolize_keys => true).parse(response.body)
|
27
|
+
puts json.fetch :url
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/cloudapp.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'cloudapp'
|
16
|
-
s.version = '0.0.
|
16
|
+
s.version = '0.0.2'
|
17
17
|
s.date = '2012-01-31'
|
18
18
|
s.rubyforge_project = 'cloudapp'
|
19
19
|
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.require_paths = %w[lib]
|
35
35
|
|
36
36
|
## If your gem includes any executables, list them here.
|
37
|
-
|
37
|
+
s.executables = ["cloudapp"]
|
38
38
|
|
39
39
|
## Specify any RDoc options here. You'll want to add your README and
|
40
40
|
## LICENSE files to the extra_rdoc_files list.
|
@@ -44,6 +44,8 @@ Gem::Specification.new do |s|
|
|
44
44
|
## List your runtime dependencies here. Runtime dependencies are those
|
45
45
|
## that are needed for an end user to actually USE your code.
|
46
46
|
s.add_dependency 'main'
|
47
|
+
s.add_dependency 'typhoeus'
|
48
|
+
s.add_dependency 'yajl-ruby'
|
47
49
|
|
48
50
|
## List your development dependencies here. Development dependencies are
|
49
51
|
## those that are only needed during development
|
@@ -59,6 +61,7 @@ Gem::Specification.new do |s|
|
|
59
61
|
MIT-LICENSE
|
60
62
|
README.md
|
61
63
|
Rakefile
|
64
|
+
bin/cloudapp
|
62
65
|
cloudapp.gemspec
|
63
66
|
lib/cloudapp.rb
|
64
67
|
]
|
data/lib/cloudapp.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: main
|
16
|
-
requirement: &
|
16
|
+
requirement: &70234698905420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,32 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70234698905420
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: typhoeus
|
27
|
+
requirement: &70234698904840 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70234698904840
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: yajl-ruby
|
38
|
+
requirement: &70234698904040 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70234698904040
|
25
47
|
- !ruby/object:Gem::Dependency
|
26
48
|
name: rake
|
27
|
-
requirement: &
|
49
|
+
requirement: &70234698903340 !ruby/object:Gem::Requirement
|
28
50
|
none: false
|
29
51
|
requirements:
|
30
52
|
- - ! '>='
|
@@ -32,10 +54,11 @@ dependencies:
|
|
32
54
|
version: '0'
|
33
55
|
type: :development
|
34
56
|
prerelease: false
|
35
|
-
version_requirements: *
|
57
|
+
version_requirements: *70234698903340
|
36
58
|
description: Experience all the pleasures of sharing with CloudApp now in your terminal.
|
37
59
|
email: larry@marburger.cc
|
38
|
-
executables:
|
60
|
+
executables:
|
61
|
+
- cloudapp
|
39
62
|
extensions: []
|
40
63
|
extra_rdoc_files:
|
41
64
|
- README.md
|
@@ -46,6 +69,7 @@ files:
|
|
46
69
|
- MIT-LICENSE
|
47
70
|
- README.md
|
48
71
|
- Rakefile
|
72
|
+
- bin/cloudapp
|
49
73
|
- cloudapp.gemspec
|
50
74
|
- lib/cloudapp.rb
|
51
75
|
homepage: https://github.com/cloudapp/cli
|