filecluster 0.5.29 → 0.6.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fc/item.rb +4 -7
  3. data/lib/fc/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62c0aba394cd7245330d1ec4b2e222fb500d5809310d12cc2e23fd96eb32153b
4
- data.tar.gz: d22421a0ddd3f3810a42d19617976a911d8a2883cfb3c38aa4c2f83ff3c4874d
3
+ metadata.gz: 70e781eff2ad964938c028544244ed54f0f5405abc8a666adc7aa177264cf592
4
+ data.tar.gz: 29606a59dfe196df2a625ff848dd5cc3977c80cb75b7614dcb1bd69a0264dd93
5
5
  SHA512:
6
- metadata.gz: 1617ecdbb68b3341677ff122eae10335af41508e996f3b70c6e8df48b690826f2052c6be6add92a9e3ccd44a238acb70dfe0fb246aab7d47ef471fd6969f8c3c
7
- data.tar.gz: d2be6de927e6a056b727082a1dcd32ecdd8a5e66237e4b6b661bb4665eb65e29b3fd68f40183bfad5810746d877796e277bc29cb583dc7f366feaa2f53030eb6
6
+ metadata.gz: efd5d6fee6abcc55800445ac2c6ce67b355d0d619c473c63733a7664a97e9ff03f2a50f88a9633312f98e7007166ab8a1b4f9e58d105ef8dfa0b7c843a89f8fe
7
+ data.tar.gz: 459c19c8258b02000a4cc0d6cf4988ee64fb5e548e8239e7176fa0fc1f4b3ac0976cf8d31a1c1fa07fcd4a5f82685eb641168501a1c6d5f1def50c2889c97af7
data/lib/fc/item.rb CHANGED
@@ -13,7 +13,7 @@ module FC
13
13
  # :additional_fields - hash of additional FC:Item fields
14
14
  # :no_md5 - don't use md5
15
15
  # :speed_limit - limit copy speed
16
- # :force_local_storage_name
16
+ # :force_local_storage
17
17
  # If item_name is part of local_path it processed as inplace - local_path is valid path to the item for policy
18
18
  def self.create_from_local(local_path, item_name, policy, options={}, &block)
19
19
  raise 'Path not exists' unless File.exists?(local_path)
@@ -33,16 +33,13 @@ module FC
33
33
  item_params.delete(:not_local)
34
34
  item_params.delete(:no_md5)
35
35
  item_params.delete(:speed_limit)
36
- item_params.delete(:force_local_storage_name)
36
+ item_params.delete(:force_local_storage)
37
37
  raise 'Name is empty' if item_params[:name].empty?
38
38
  raise 'Zero size path' if item_params[:size] == 0
39
39
 
40
40
  if local_path.include?(item_name) && !options[:not_local]
41
- if options[:force_local_storage_name]
42
- storage = policy.get_create_storages.detect do |s|
43
- s.name == options[:force_local_storage_name]
44
- end
45
- FC::Error.raise "force_local_storage #{options[:force_local_storage_name]} is not valid path for policy ##{policy.id}" unless storage
41
+ if options[:force_local_storage]
42
+ storage = options[:force_local_storage]
46
43
  if local_path.index(storage.path) != 0 || local_path.sub(storage.path, '').sub(/\/$/, '').sub(/^\//, '') != item_params[:name]
47
44
  FC::Error.raise "force_local_storage #{storage.name} is not valid path for local path ##{local_path}"
48
45
  end
data/lib/fc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FC
2
- VERSION = '0.5.29'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
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.29
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-28 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2