fog-local 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: 5059e832e9d246d3d6248701810c868c1a7b4bc77b4446ccefa888f511c894f3
4
- data.tar.gz: 8c5968aae7995ca18bac5d9caa7c8b384b9146e8e888206fec8fcafbfc76dd00
3
+ metadata.gz: e7569fa5ae2ee41c45358a28ddb0400a7b9f3224ecda75e03493bd7db059f308
4
+ data.tar.gz: 37b5d624939ad7da579bef36f4751ecb74fb829aeade62f6b41b2fdc12f20ced
5
5
  SHA512:
6
- metadata.gz: 8d8aaf3d6c71a320f62fbd5477459bf288a96ce0adbb2bc4137543ba612f58ee4bcdb1cbc31c43345eb08154f1f84b6fb54384579eeb195b5ce343b9e5a0a2c0
7
- data.tar.gz: 1df8b44a820c6434bfc2ffaea43388ec38968cf5aabc81304b3a4bb45db7e540bdc8479760f8eba86e2cbfda255adc5ba4583219244f931ba46e6442cd108968
6
+ metadata.gz: 2d15633fba2df0006079c9e6e1c51eb72862561b29d57f051045996b754e8378ad24e1d2f100132dcd2063b5bc18baceffafb68162638894584fc2dbfb47c619
7
+ data.tar.gz: ed7462cf6ce37d131afa6406bfbb87db8394c573a1fb45dc496420cdbcf2dacc6aee01cc10f54e10ad819ee71a9d63a1f69a82960c5b55b42ab40ae50c073b12
@@ -107,7 +107,7 @@ module Fog
107
107
  end
108
108
 
109
109
  def uri_escape(string)
110
- string.b.gsub(/([^a-zA-Z0-9_.\-~]+)/) do |m|
110
+ string.b.gsub(URI::DEFAULT_PARSER.regexp[:UNSAFE]) do |m|
111
111
  '%' + m.unpack('H2' * m.bytesize).join('%').upcase
112
112
  end
113
113
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Local
3
- VERSION = '0.7.0'
3
+ VERSION = '0.8.0'
4
4
  end
5
5
  end
@@ -41,6 +41,17 @@ Shindo.tests('Storage[:local] | file', ["local"]) do
41
41
  directory = connection.directories.new(:key => 'my directory')
42
42
  file = directory.files.new(:key => 'my file.txt')
43
43
 
44
+ file.public_url
45
+ end
46
+
47
+ tests('when key has safe characters').
48
+ returns('http://example.com/files/my/directory/my/file.txt') do
49
+ @options[:endpoint] = 'http://example.com/files'
50
+
51
+ connection = Fog::Local::Storage.new(@options)
52
+ directory = connection.directories.new(:key => 'my/directory')
53
+ file = directory.files.new(:key => 'my/file.txt')
54
+
44
55
  file.public_url
45
56
  end
46
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Beary
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-20 00:00:00.000000000 Z
12
+ date: 2022-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler