sharepoint_api 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +2 -2
- data/lib/sharepoint_api/file_system.rb +12 -19
- data/lib/sharepoint_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6e03f01804cbcdcbe4ab35aa6073790f1a57b1500438930c3b48107a4745416
|
4
|
+
data.tar.gz: 7e38e7750fc347cbf61f6fa51bd543cb7614151c718b81d2c48f4953a2f5dae2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c2a532ddd27e3e66d6bc43631e8598a4c868b5dca7f0ff5a4041ebf8d742853da41dc100b1586e37c78d2d6313d48e993ee1a391cd063772d798703796b1398
|
7
|
+
data.tar.gz: dccd4a1f20f644860ecc8a23112987ceaba68474cfbbc7d389dea5a71631e9d4a06ae73a2ade777f1596d9744aa7e0e3931e3c007cd66f6f64245dba710f20aa
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
## [2.
|
1
|
+
## [2.1.0] - 2021-07-06
|
2
|
+
* Drop feature of add_file creating a folder if one didn't exist as it introduced a security issue where a folder could be created that didn't have access restricted to routing participants.
|
3
|
+
|
4
|
+
## [2.0.0] - 2021-06-28
|
2
5
|
* Update proof-sharepoint-ruby to escape apostrophes.
|
3
6
|
* Change usage of apostrophe escaping.
|
4
7
|
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sharepoint_api (2.
|
4
|
+
sharepoint_api (2.1.0)
|
5
5
|
addressable (~> 2.7)
|
6
6
|
proof-sharepoint-ruby (~> 2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
11
|
+
addressable (2.8.0)
|
12
12
|
public_suffix (>= 2.0.2, < 5.0)
|
13
13
|
ast (2.4.1)
|
14
14
|
byebug (11.1.3)
|
@@ -9,26 +9,19 @@ class SharepointApi
|
|
9
9
|
def add_file(path, content)
|
10
10
|
folder_path = File.dirname(path)
|
11
11
|
file_name = encode_path(File.basename(path))
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
"/Add(overwrite=true,url='#{file_name}')",
|
19
|
-
content
|
20
|
-
)
|
12
|
+
FileInfo.wrap(
|
13
|
+
site.query(
|
14
|
+
:post,
|
15
|
+
"GetFolderByServerRelativeUrl('#{site_relative_path(folder_path)}')/Files" \
|
16
|
+
"/Add(overwrite=true,url='#{file_name}')",
|
17
|
+
content
|
21
18
|
)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
retry if (retries += 1) < 2
|
29
|
-
log_as(__method__, e, level: :warn)
|
30
|
-
nil
|
31
|
-
end
|
19
|
+
)
|
20
|
+
rescue Sharepoint::SPException => e
|
21
|
+
reraise_if_lock_error(e)
|
22
|
+
|
23
|
+
log_as(__method__, e)
|
24
|
+
nil
|
32
25
|
end
|
33
26
|
|
34
27
|
def file_exists?(path)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharepoint_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kalek
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|