filecluster 0.5.6 → 0.5.7
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 +4 -4
- data/lib/fc/item.rb +3 -1
- data/lib/fc/version.rb +1 -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: 513efeda9b8bc064c2ac65cff2b96f96ab3f2a13
|
4
|
+
data.tar.gz: a91430765fbf496273b7c25bed7c0f3fb1b89172
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c452b42e5e0ef6ff4611b7d111a3b9f07ad351411636ebef0b50389463457a7d9796c3a104759da9d53bf66e48cb47ecde7ccc643cfb47303b9073fd5fd51416
|
7
|
+
data.tar.gz: 35a68af5f2165b48310777dcd9f1f5de141fee06e5625b1c77831859d6c07392879cd6f11f54e95489a5ffa0be80a1df3b0220919043a187fc112605d7d87c3c
|
data/lib/fc/item.rb
CHANGED
@@ -12,6 +12,7 @@ module FC
|
|
12
12
|
# :remove_local=true - delete local_path file/dir after add
|
13
13
|
# :additional_fields - hash of additional FC:Item fields
|
14
14
|
# :no_md5 - don't use md5
|
15
|
+
# :speed_limit - limit copy speed
|
15
16
|
# If item_name is part of local_path it processed as inplace - local_path is valid path to the item for policy
|
16
17
|
def self.create_from_local(local_path, item_name, policy, options={}, &block)
|
17
18
|
raise 'Path not exists' unless File.exists?(local_path)
|
@@ -77,7 +78,8 @@ module FC
|
|
77
78
|
FC::DB.query("UPDATE #{FC::ItemStorage.table_name} SET status='delete' WHERE item_id = #{item.id} AND storage_name <> '#{storage.name}'") if options[:replace]
|
78
79
|
|
79
80
|
item_storage = item.make_item_storage(storage)
|
80
|
-
|
81
|
+
speed_limit = options[:speed_limit].present? ? options[:speed_limit] : nil
|
82
|
+
item.copy_item_storage(local_path, storage, item_storage, options[:remove_local], speed_limit)
|
81
83
|
end
|
82
84
|
|
83
85
|
return item
|
data/lib/fc/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mysql2
|