filecluster 0.4.17 → 0.4.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 376e00916cd7b2384892f7b11f2835780f767061
4
- data.tar.gz: dd5e27d1796f88edaad7cd3a6c86db1abea85c9b
3
+ metadata.gz: 0fef3c7d2db488cd43e844f7e237e8696f4715ff
4
+ data.tar.gz: 88696b276b74b2aec6595798ddfaf3f1909ec2e6
5
5
  SHA512:
6
- metadata.gz: d23de791e039af872b21516509c6458b93ddcdb74e485bea3f281452999e803f5848fc99367bd5767eebc1ec707ac7881d2db6dc4a72a7840956e4663b20bbb2
7
- data.tar.gz: fef507239f5611148b49f2d99bbba2fa8a0935a5f6fa98a46479fa015b5270a406d397a2fbd61adb8aeb3156ffc7166a3572c851f75299f14148a803fc60ed7d
6
+ metadata.gz: df5d53cdee92041d9fb71c753d4255edccd2f6a4e5475785063adda9161867b537627e333a41256ea6386be118677ccfdbbe5f3ca2c64d24c594f2db588698b8
7
+ data.tar.gz: 1e11a7586394c716a9f42d09063c7716b70d2b173f0a667f6fbec09405479a4b1d7c4ff90bbdbcc21fe3ff70e0a730c1ad89f5cdbf5aa216d723d143ed6d5353
@@ -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> show item info, name can contain ? and *
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> add file as item <name> with policy
83
- rm <name> delete item
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
@@ -1,3 +1,3 @@
1
1
  module FC
2
- VERSION = "0.4.17"
2
+ VERSION = "0.4.18"
3
3
  end
@@ -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 => 'fc-manage-add-local', :replace => true)
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.17
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: 2015-12-30 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2