rubiojr-iorb 0.3.98 → 0.3.99

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -15,3 +15,5 @@
15
15
  * listing assets from drops now support filtering (regexp)
16
16
  * destroy assets matching a given filter
17
17
  * implemented info command
18
+ * help system improved
19
+ * new website http://iorb.netcorex.org
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
- = iorb
1
+ == WEBSITE
2
2
 
3
- * http://rubiojr.github.com/
3
+ * http://iorb.netcorex.org/
4
4
 
5
5
  == DESCRIPTION:
6
6
 
@@ -14,6 +14,8 @@ You will need a drop.io API key. Get it at http://api.drop.io
14
14
 
15
15
  == SYNOPSIS:
16
16
 
17
+ Getting started tutorial: http://iorb.netcorex.org/tutorial
18
+
17
19
  === Creating drops
18
20
  iorb create [drop_name]
19
21
 
data/bin/iorb CHANGED
@@ -21,6 +21,26 @@ end
21
21
  program :name, 'iorb'
22
22
  program :version, IORB::VERSION
23
23
  program :description, 'drop.io command line interface'
24
+ program :help, 'Examples', """
25
+ * Create a drop named 'mydrop'
26
+ iorb create mydrop
27
+
28
+ * Add file1, file2, ... to drop 'mydrop'
29
+ iorb add --drop-name mydrop file1 file2 ...
30
+
31
+ * Create a drop named mydrop and set some properties
32
+ iorb create mydrop --password private --expiration-length 1_YEAR_FROM_NOW
33
+ * Create a drop and add files to it
34
+ iorb create mydrop --files file1 file2 ..
35
+
36
+ * List 'mydrop' audio assets
37
+ iorb list mydrop --filter type:audio
38
+
39
+ * Destroy drop 'mydrop'
40
+ iorb destroy mydrop
41
+
42
+ Get more examples at http://iorb.netcorex.org/examples
43
+ """
24
44
  default_command :help
25
45
 
26
46
  # API Docs http://groups.google.com/group/dropio-api/web/full-api-documentation
data/iorb.gemspec CHANGED
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{iorb}
3
- s.version = "0.3.98"
3
+ s.version = "0.3.99"
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"]
7
- s.date = %q{2009-04-23}
7
+ s.date = %q{2009-04-24}
8
8
  s.default_executable = %q{iorb}
9
9
  s.description = %q{drop.io CLI interface}
10
10
  s.email = %q{sergio@rubio.namesergio@rubio.name}
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.98"
18
+ VERSION = "0.3.99"
19
19
  module Util
20
20
  # Code stolen from:
21
21
  # http://evan.tiggerpalace.com/2008/04/26/pastie-from-the-mac-clipboard/
@@ -129,6 +129,10 @@ module IORB
129
129
  puts "Created at: #{self['created-at'] || 'unknown'}"
130
130
  # Get the admin URL
131
131
  puts "Admin URL: #{self['admin-url']}"
132
+ puts "Guests can:"
133
+ puts " add #{self['guests-can-add'] ? '*' : ''}"
134
+ puts " comment #{self['guests-can-comment'] ? '*' : ''}"
135
+ puts " delete #{self['guests-can-delete'] ? '*' : ''}"
132
136
  end
133
137
 
134
138
  def save
@@ -2,9 +2,9 @@ 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 '--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)'
5
+ c.option '--guests-can-comment YES/NO', String, 'Guest can add comments (defaut: yes)'
6
+ c.option '--guests-can-add YES/NO', String, 'Guest can add to this drop (defaut: yes)'
7
+ c.option '--guests-can-delete YES/NO', String, 'Guest can delete assets in this drop (defaut: yes)'
8
8
  c.option '--admin-password PASSWORD', String, 'Admin password to manage this drop (defaut: none)'
9
9
  c.option '--password PASSWORD', String, 'Password to access this drop (defaut: none)'
10
10
  c.option '--premium-code CODE', String, 'Premium code to apply to the drop (defaut: none)'
@@ -20,9 +20,9 @@ command :create do |c|
20
20
  drop_options = {
21
21
  :name => drop_name,
22
22
  :expiration_length => options.expiration_length,
23
- :guests_can_add => options.guest_can_add,
24
- :guests_can_comment => options.guest_can_comment,
25
- :guests_can_delete => options.guest_can_delete,
23
+ :guests_can_add => (options.guests_can_add =~ /^yes|y$/ ? true : false),
24
+ :guests_can_comment => (options.guests_can_comment =~ /^yes|y$/ ? true : false),
25
+ :guests_can_delete => (options.guests_can_delete =~ /^yes|y$/ ? true : false),
26
26
  :admin_password => options.admin_password,
27
27
  :password => options.password,
28
28
  :premium_code => options.premium_code
@@ -7,12 +7,12 @@ command :info do |c|
7
7
  begin
8
8
  drop_name = args.first
9
9
  details = IORB::DropManager.find(drop_name)
10
- if details
11
- details.print
12
- else
13
- drop = Drop.find(args.first)
14
- IORB::DropDetails.build_from(drop).print
15
- end
10
+ admin_token = nil
11
+ admin_token = details.admin_token if details
12
+ drop = Drop.find(args.first, admin_token)
13
+ details = IORB::DropDetails.build_from(drop)
14
+ details.save
15
+ details.print
16
16
  rescue Dropio::MissingResourceError
17
17
  $stderr.puts "Drop/Asset does not exist"
18
18
  rescue Dropio::AuthorizationError
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.98
4
+ version: 0.3.99
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio RubioSergio Rubio
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-23 00:00:00 -07:00
12
+ date: 2009-04-24 00:00:00 -07:00
13
13
  default_executable: iorb
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency