sharepoint_api 2.0.0 → 2.1.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: 5551919c5f64298b80dc13b11ce01ac83414add68d5dc396cb9eb63c92d0f442
4
- data.tar.gz: 02f98ff2506480e49310ceeefb041b8f5ca6d8099de499776307d765c0777e1d
3
+ metadata.gz: a6e03f01804cbcdcbe4ab35aa6073790f1a57b1500438930c3b48107a4745416
4
+ data.tar.gz: 7e38e7750fc347cbf61f6fa51bd543cb7614151c718b81d2c48f4953a2f5dae2
5
5
  SHA512:
6
- metadata.gz: 520c21578a7fa4bde6c3e44a063782a2fb6d453ff74d0ad593e1f7d5eac005427ce6734de67858b174c315d4337a370d93342dd8ca5b7196456c9201b8273a88
7
- data.tar.gz: dca7e0ad99915314213295fc60a7d83c6bf70bccded29fefdd55e57aad3717e9561acbc4939a7678e4153e37ac1fdd13d682a36bf44fbc014160a9373ce2df24
6
+ metadata.gz: 8c2a532ddd27e3e66d6bc43631e8598a4c868b5dca7f0ff5a4041ebf8d742853da41dc100b1586e37c78d2d6313d48e993ee1a391cd063772d798703796b1398
7
+ data.tar.gz: dccd4a1f20f644860ecc8a23112987ceaba68474cfbbc7d389dea5a71631e9d4a06ae73a2ade777f1596d9744aa7e0e3931e3c007cd66f6f64245dba710f20aa
data/CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
- ## [2.0.0] - 2021-01-12
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.0.0)
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.7.0)
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
- begin
13
- retries ||= 0
14
- FileInfo.wrap(
15
- site.query(
16
- :post,
17
- "GetFolderByServerRelativeUrl('#{site_relative_path(folder_path)}')/Files" \
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
- rescue Sharepoint::SPException => e
23
- reraise_if_lock_error(e)
24
-
25
- log_as(__method__, e)
26
- log_as(__method__, "adding folder with path #{folder_path}")
27
- add_folder(folder_path)
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)
@@ -1,3 +1,3 @@
1
1
  class SharepointApi
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
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.0.0
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-06-29 00:00:00.000000000 Z
13
+ date: 2021-07-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable