rubiojr-iorb 0.3.96 → 0.3.98
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/THANKS.txt +21 -0
- data/iorb.gemspec +3 -3
- data/lib/iorb.rb +17 -1
- data/lib/iorb/commands/create.rb +15 -7
- metadata +3 -1
data/THANKS.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
THANKS:
|
2
|
+
-------
|
3
|
+
To the drop.io team. They gave me a warm welcome,
|
4
|
+
encouragement and some freebies!
|
5
|
+
The drop.io api and their web app is awesome.
|
6
|
+
|
7
|
+
To all the ruby developers around the world. They give us
|
8
|
+
code and building blocks to have some fun developing software.
|
9
|
+
Their effort is really appreciated.
|
10
|
+
|
11
|
+
To the github.com team. github really rocks!
|
12
|
+
A must for open source developers.
|
13
|
+
|
14
|
+
REFERENCES:
|
15
|
+
-----------
|
16
|
+
http://drop.io
|
17
|
+
http://github.com
|
18
|
+
http://github.com/visionmedia/commander
|
19
|
+
http://github.com/whoisjake/dropio_api_ruby
|
20
|
+
http://highline.rubyforge.org
|
21
|
+
|
data/iorb.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{iorb}
|
3
|
-
s.version = "0.3.
|
3
|
+
s.version = "0.3.98"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Sergio RubioSergio Rubio"]
|
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.description = %q{drop.io CLI interface}
|
10
10
|
s.email = %q{sergio@rubio.namesergio@rubio.name}
|
11
11
|
s.executables = ["iorb"]
|
12
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
|
13
|
-
s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/iorb", "dropio-ruby-api-examples/add_files.rb", "dropio-ruby-api-examples/basic_client.rb", "dropio-ruby-api-examples/destroy_drop.rb", "dropio-ruby-api-examples/find_drop.rb", "dropio-ruby-api-examples/find_my_drop.rb", "dropio-ruby-api-examples/list_files.rb", "iorb.gemspec", "lib/iorb.rb", "lib/iorb/commands/add.rb", "lib/iorb/commands/create.rb", "lib/iorb/commands/destroy.rb", "lib/iorb/commands/info.rb", "lib/iorb/commands/list.rb", "lib/iorb/commands/mydrops.rb", "scripts/newrelease"]
|
12
|
+
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt", "THANKS.txt"]
|
13
|
+
s.files = ["History.txt", "Manifest.txt", "README.txt", "Rakefile", "THANKS.txt", "bin/iorb", "dropio-ruby-api-examples/add_files.rb", "dropio-ruby-api-examples/basic_client.rb", "dropio-ruby-api-examples/destroy_drop.rb", "dropio-ruby-api-examples/find_drop.rb", "dropio-ruby-api-examples/find_my_drop.rb", "dropio-ruby-api-examples/list_files.rb", "iorb.gemspec", "lib/iorb.rb", "lib/iorb/commands/add.rb", "lib/iorb/commands/create.rb", "lib/iorb/commands/destroy.rb", "lib/iorb/commands/info.rb", "lib/iorb/commands/list.rb", "lib/iorb/commands/mydrops.rb", "scripts/newrelease"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://github.com/rubiojr/iorb}
|
16
16
|
s.rdoc_options = ["--main", "README.txt"]
|
data/lib/iorb.rb
CHANGED
@@ -15,7 +15,7 @@ class Dropio::Asset
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
module IORB
|
18
|
-
VERSION = "0.3.
|
18
|
+
VERSION = "0.3.98"
|
19
19
|
module Util
|
20
20
|
# Code stolen from:
|
21
21
|
# http://evan.tiggerpalace.com/2008/04/26/pastie-from-the-mac-clipboard/
|
@@ -92,6 +92,13 @@ module IORB
|
|
92
92
|
details['public-url'] = "http://drop.io/#{drop.name}"
|
93
93
|
details['hidden-uploads'] = drop.hidden_upload_url
|
94
94
|
details['max-bytes'] = drop.max_bytes
|
95
|
+
details['password'] = drop.password
|
96
|
+
details['admin-password'] = drop.admin_password
|
97
|
+
details['expiration-length'] = drop.expiration_length
|
98
|
+
details['guests-can-add'] = drop.guests_can_add
|
99
|
+
details['guests-can-comment'] = drop.guests_can_comment
|
100
|
+
details['guests-can-delete'] = drop.guests_can_delete
|
101
|
+
details['current-bytes'] = drop.current_bytes
|
95
102
|
else
|
96
103
|
details['name'] = drop['name']
|
97
104
|
details['email'] = drop['email']
|
@@ -100,6 +107,14 @@ module IORB
|
|
100
107
|
details['public-url'] = "http://drop.io/#{drop['name']}"
|
101
108
|
details['hidden-uploads'] = drop['hidden-uploads']
|
102
109
|
details['max-bytes'] = drop['max-bytes']
|
110
|
+
details['created-at'] = drop['created-at']
|
111
|
+
details['password'] = drop['password']
|
112
|
+
details['admin-password'] = drop['admin-password']
|
113
|
+
details['expiration-length'] = drop['expiration-length']
|
114
|
+
details['guests-can-add'] = drop['guests-can-add']
|
115
|
+
details['guests-can-comment'] = drop['guests-can-comment']
|
116
|
+
details['guests-can-delete'] = drop['guests-can-delete']
|
117
|
+
details['current-bytes'] = drop['current-bytes']
|
103
118
|
end
|
104
119
|
details
|
105
120
|
end
|
@@ -111,6 +126,7 @@ module IORB
|
|
111
126
|
puts "Max Bytes: #{self['max-bytes']}"
|
112
127
|
puts "Admin Token: #{self['admin-token']}"
|
113
128
|
puts "Hidden Upload URL: #{self['hidden-uploads']}"
|
129
|
+
puts "Created at: #{self['created-at'] || 'unknown'}"
|
114
130
|
# Get the admin URL
|
115
131
|
puts "Admin URL: #{self['admin-url']}"
|
116
132
|
end
|
data/lib/iorb/commands/create.rb
CHANGED
@@ -2,28 +2,36 @@ command :create do |c|
|
|
2
2
|
c.description = 'Create a new drop'
|
3
3
|
c.option '--expiration-length LENGTH', String, 'Drop expiration length'
|
4
4
|
c.option '--save YES/NO', TrueClass, 'Save the drop info to the config file (defaut: yes)'
|
5
|
-
c.option '--
|
6
|
-
c.option '--
|
5
|
+
c.option '--guests-can-comment YES/NO', TrueClass, 'Guest can add comments (defaut: yes)'
|
6
|
+
c.option '--guests-can-add YES/NO', TrueClass, 'Guest can add to this drop (defaut: yes)'
|
7
|
+
c.option '--guests-can-delete YES/NO', TrueClass, 'Guest can delete assets in this drop (defaut: yes)'
|
8
|
+
c.option '--admin-password PASSWORD', String, 'Admin password to manage this drop (defaut: none)'
|
9
|
+
c.option '--password PASSWORD', String, 'Password to access this drop (defaut: none)'
|
10
|
+
c.option '--premium-code CODE', String, 'Premium code to apply to the drop (defaut: none)'
|
7
11
|
c.when_called do |args, options|
|
8
12
|
drop_name = args.first
|
9
13
|
options.default(
|
10
14
|
:expiration_length => '1_WEEK_FROM_LAST_VIEW',
|
11
15
|
:save => true,
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
16
|
+
:guests_can_comment => true,
|
17
|
+
:guests_can_add => true,
|
18
|
+
:guests_can_delete => true
|
15
19
|
)
|
16
20
|
drop_options = {
|
17
21
|
:name => drop_name,
|
18
22
|
:expiration_length => options.expiration_length,
|
19
23
|
:guests_can_add => options.guest_can_add,
|
20
|
-
:guests_can_comment => options.guest_can_comment
|
24
|
+
:guests_can_comment => options.guest_can_comment,
|
25
|
+
:guests_can_delete => options.guest_can_delete,
|
26
|
+
:admin_password => options.admin_password,
|
27
|
+
:password => options.password,
|
28
|
+
:premium_code => options.premium_code
|
21
29
|
}
|
22
30
|
begin
|
23
31
|
drop = Drop.create(drop_options)
|
24
32
|
details = IORB::DropDetails.build_from(drop)
|
25
|
-
puts details.class
|
26
33
|
details.print
|
34
|
+
details['created-at'] = DateTime.now.to_s
|
27
35
|
details.save if options.save
|
28
36
|
rescue Dropio::AuthorizationError
|
29
37
|
$stderr.puts 'Error creating drop.'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubiojr-iorb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.98
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio RubioSergio Rubio
|
@@ -52,11 +52,13 @@ extra_rdoc_files:
|
|
52
52
|
- History.txt
|
53
53
|
- Manifest.txt
|
54
54
|
- README.txt
|
55
|
+
- THANKS.txt
|
55
56
|
files:
|
56
57
|
- History.txt
|
57
58
|
- Manifest.txt
|
58
59
|
- README.txt
|
59
60
|
- Rakefile
|
61
|
+
- THANKS.txt
|
60
62
|
- bin/iorb
|
61
63
|
- dropio-ruby-api-examples/add_files.rb
|
62
64
|
- dropio-ruby-api-examples/basic_client.rb
|