sharepoint_api 2.2.1 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6b07883d80dbfaf3b87f352c8df343b61b8b7ae2a02825725429ed0c5a47915
4
- data.tar.gz: 18fa74004691d59f173bc5c5e95718c51c1e1d237d5c14efe4e3b6c490e5b901
3
+ metadata.gz: 7a9fa238166ddb188042912a71988869b1b443fa55ebd214be69bc6a139f52b4
4
+ data.tar.gz: db2dd49b85094a1235363c6d0cc6960722d7c4b7400b82d02ce2e1a2f4b44b8b
5
5
  SHA512:
6
- metadata.gz: a9e176e297670491aca1a556f4c019f498e409637ca17c144b6a76cfd183c02c1de2d5b0359d24d1659381e4b7a62b506b96d023db8d91453a1b4af8726f5274
7
- data.tar.gz: eaf88cbd106de7ed5546861e55b74444d7db253e917b62fd317584048243c7db559bf9c6b6a05ddaabcfd822a98bd29542eadadda6866c9a7edfb50362dd6cba
6
+ metadata.gz: 697f6dd8982e69879bf30fc086596803ee8198ae52f129286949cbcb728ca2d14491e9ec2416c77a44e380adf86dfbe9175d4c21973be4c1d5790d2324bd5b1c
7
+ data.tar.gz: e904aae5d3086713aec14cd31a486a1195822fa12d4e76a40e8a598dbf5468aa8d0a904d9469602354e62d2e345366998396fca3157a26cf17fe71d18bf19f92
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [2.3.1] - 2021-11-02
2
+ * Add ability to rename groups
3
+
1
4
  ## [2.2.0] - 2021-07-06
2
5
  * Use $select queries to vastly speed up FileInfo#version lookup.
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sharepoint_api (2.2.1)
4
+ sharepoint_api (2.3.1)
5
5
  addressable (~> 2.7)
6
6
  proof-sharepoint-ruby (~> 2.0)
7
7
 
@@ -120,4 +120,4 @@ DEPENDENCIES
120
120
  sharepoint_api!
121
121
 
122
122
  BUNDLED WITH
123
- 2.2.4
123
+ 2.2.29
@@ -45,6 +45,22 @@ class SharepointApi
45
45
  false
46
46
  end
47
47
 
48
+ # to rename a sp group when the acronym changes
49
+ def rename_group(old_group_name, new_group_name)
50
+ escaped_group_name = encode_path(old_group_name)
51
+ site.query(:post, "SiteGroups/GetByName('#{escaped_group_name}')", {
52
+ '__metadata' => { 'type': 'SP.Group' },
53
+ 'Title' => new_group_name,
54
+ 'Description' => "Access Group for #{new_group_name}"
55
+ }.to_json) do |curl|
56
+ curl.headers['X-HTTP-Method'] = 'MERGE'
57
+ end
58
+ true
59
+ rescue Sharepoint::SPException => e
60
+ log_as(__method__, e)
61
+ false
62
+ end
63
+
48
64
  ##
49
65
  # This also removes any role definitions the groups is using.
50
66
  def remove_group(group_name)
@@ -1,3 +1,3 @@
1
1
  class SharepointApi
2
- VERSION = '2.2.1'.freeze
2
+ VERSION = '2.3.1'.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.2.1
4
+ version: 2.3.1
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-10-06 00:00:00.000000000 Z
13
+ date: 2021-11-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable