filecluster 0.4.17 → 0.4.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/fc-manage +5 -5
- data/lib/fc/version.rb +1 -1
- data/lib/manage/item.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fef3c7d2db488cd43e844f7e237e8696f4715ff
|
4
|
+
data.tar.gz: 88696b276b74b2aec6595798ddfaf3f1909ec2e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df5d53cdee92041d9fb71c753d4255edccd2f6a4e5475785063adda9161867b537627e333a41256ea6386be118677ccfdbbe5f3ca2c64d24c594f2db588698b8
|
7
|
+
data.tar.gz: 1e11a7586394c716a9f42d09063c7716b70d2b173f0a667f6fbec09405479a4b1d7c4ff90bbdbcc21fe3ff70e0a730c1ad89f5cdbf5aa216d723d143ed6d5353
|
data/bin/fc-manage
CHANGED
@@ -77,10 +77,10 @@ Command:
|
|
77
77
|
'show and manage items',
|
78
78
|
%q{Usage: fc-manage [options] item <command>
|
79
79
|
Command:
|
80
|
-
info <name>
|
81
|
-
add_local <storage name> <path> <policy id/name> add file in local storage as item (as <path> name) with policy
|
82
|
-
add <path> <name> <policy id/name>
|
83
|
-
rm <name>
|
80
|
+
info <name> show item info, name can contain ? and *
|
81
|
+
add_local <storage name> <path> <policy id/name> <tag> <outer_id> add file in local storage as item (as <path> name) with policy, tag & outer_id is not required
|
82
|
+
add <path> <name> <policy id/name> add file as item <name> with policy
|
83
|
+
rm <name> delete item
|
84
84
|
}]
|
85
85
|
}
|
86
86
|
desc = %q{Get info and manage for storages, policies and items.
|
@@ -121,4 +121,4 @@ elsif commands_help[command]
|
|
121
121
|
end
|
122
122
|
else
|
123
123
|
puts "'#{command}' is not a fc-manage command. See 'fc-manage --help'."
|
124
|
-
end
|
124
|
+
end
|
data/lib/fc/version.rb
CHANGED
data/lib/manage/item.rb
CHANGED
@@ -64,6 +64,8 @@ def item_add_local
|
|
64
64
|
policy = FC::Policy.where('id = ?', ARGV[4]).first
|
65
65
|
policy = FC::Policy.where('name = ?', ARGV[4]).first unless policy
|
66
66
|
puts "Policy #{ARGV[4]} not found." unless policy
|
67
|
+
tag = ARGV[5] || 'fc-manage-add-local'
|
68
|
+
outer_id = ARGV[6]
|
67
69
|
|
68
70
|
if policy && storage
|
69
71
|
if name.index(storage.path) == 0
|
@@ -73,7 +75,7 @@ def item_add_local
|
|
73
75
|
path = (storage.path+name).gsub('//', '/')
|
74
76
|
end
|
75
77
|
begin
|
76
|
-
item = FC::Item.create_from_local(path, name, policy, :tag =>
|
78
|
+
item = FC::Item.create_from_local(path, name, policy, :tag => tag, :outer_id => outer_id, :replace => true)
|
77
79
|
item_storage = item.get_item_storages.first
|
78
80
|
storage = FC::Storage.where('name = ?', item_storage.storage_name).first
|
79
81
|
puts "Saved as #{storage.name+':'+storage.path+item.name}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filecluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|