sharepoint-ruby 0.1.5 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sharepoint-files.rb +2 -2
- data/lib/sharepoint-lists.rb +3 -3
- data/lib/sharepoint-object.rb +3 -3
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e89b4148b8e4f96f5002a9f5557f5a6c7332f83fe78ac1b9564bc9217a6586d0
|
4
|
+
data.tar.gz: 3fad6def3b0b62bc735e6324faae7823f6438c9f704318f9cbe5140b85af23d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c44a42d671d9fed0eccaaf40b16dcd9be39d70e6565b0634bfaccda08b4d0423b73658aa6b17c03bf9e0c68e835b5fbc56e6d035afca715410554b41bca7ed70
|
7
|
+
data.tar.gz: a99aed04d07b437d08d61f9a21eb8e9879b2056cfaf83ae9421c5453cf566e476826edb55e93d605f70502a4fe1e50158923bcf578e41f587e256efa030d314c
|
data/lib/sharepoint-files.rb
CHANGED
@@ -13,11 +13,11 @@ module Sharepoint
|
|
13
13
|
method :recycle
|
14
14
|
|
15
15
|
def file_from_name name
|
16
|
-
@site.query :get, "#{__metadata['uri']}/files/getbyurl('#{
|
16
|
+
@site.query :get, "#{__metadata['uri']}/files/getbyurl('#{CGI.escape(name.to_s)}')"
|
17
17
|
end
|
18
18
|
|
19
19
|
def add_file name, content
|
20
|
-
uri = "#{__metadata['uri']}/files/add(overwrite=true,url='#{
|
20
|
+
uri = "#{__metadata['uri']}/files/add(overwrite=true,url='#{CGI.escape(name.to_s)}')"
|
21
21
|
@site.query :post, uri, content
|
22
22
|
end
|
23
23
|
|
data/lib/sharepoint-lists.rb
CHANGED
@@ -157,7 +157,7 @@ module Sharepoint
|
|
157
157
|
has_options = false
|
158
158
|
options.each do |key,value|
|
159
159
|
url += if has_options then '&' else '?' end
|
160
|
-
url += "$#{key}=#{
|
160
|
+
url += "$#{key}=#{CGI.escape value.to_s}"
|
161
161
|
has_options = true
|
162
162
|
end
|
163
163
|
url
|
@@ -214,7 +214,7 @@ module Sharepoint
|
|
214
214
|
belongs_to :view
|
215
215
|
|
216
216
|
def add_view_field name
|
217
|
-
@site.query :post, "#{__metadata['uri']}/addviewfield('#{URI.
|
217
|
+
@site.query :post, "#{__metadata['uri']}/addviewfield('#{URI::Parser.new.escape name}')"
|
218
218
|
end
|
219
219
|
|
220
220
|
def move_view_field_to name, index
|
@@ -229,7 +229,7 @@ module Sharepoint
|
|
229
229
|
end
|
230
230
|
|
231
231
|
def remove_view_field name
|
232
|
-
@site.query :post, "#{__metadata['uri']}/removeviewfield('#{URI.
|
232
|
+
@site.query :post, "#{__metadata['uri']}/removeviewfield('#{URI::Parser.new.escape name}')"
|
233
233
|
end
|
234
234
|
end
|
235
235
|
end
|
data/lib/sharepoint-object.rb
CHANGED
@@ -44,7 +44,7 @@ module Sharepoint
|
|
44
44
|
action += ',' unless params.keys.first == key
|
45
45
|
action += key + '='
|
46
46
|
action += (if (value.class < String) or (value.class < Symbol)
|
47
|
-
"'#{(URI.
|
47
|
+
"'#{(URI::Parser.new.escape value.gsub("'", %q(\\\')))}'"
|
48
48
|
else
|
49
49
|
value
|
50
50
|
end)
|
@@ -70,7 +70,7 @@ module Sharepoint
|
|
70
70
|
if id =~ /^[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}$/
|
71
71
|
self.query :get, "#{options[:getter]}(guid'#{id}')"
|
72
72
|
else
|
73
|
-
self.query :get, "#{options[:get_from_name]}('#{URI.
|
73
|
+
self.query :get, "#{options[:get_from_name]}('#{URI::Parser.new.escape id}')"
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -83,7 +83,7 @@ module Sharepoint
|
|
83
83
|
resource.site.query :get, "#{resource.__metadata['uri']}/#{method_name}"
|
84
84
|
end
|
85
85
|
define_singleton_method "get_from_#{resource_name}" do |resource, name|
|
86
|
-
resource.site.query :get, "#{resource.__metadata['uri']}/#{method_name}('#{URI.
|
86
|
+
resource.site.query :get, "#{resource.__metadata['uri']}/#{method_name}('#{URI::Parser.new.escape name}')"
|
87
87
|
end
|
88
88
|
define_method "create_uri" do
|
89
89
|
unless self.parent.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharepoint-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Martin Moro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -54,7 +54,7 @@ files:
|
|
54
54
|
- lib/soap/authenticate.xml.erb
|
55
55
|
homepage: https://github.com/Plaristote/sharepoint-ruby
|
56
56
|
licenses:
|
57
|
-
-
|
57
|
+
- 0BSD
|
58
58
|
metadata: {}
|
59
59
|
post_install_message:
|
60
60
|
rdoc_options: []
|
@@ -71,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
|
-
|
75
|
-
rubygems_version: 2.7.9
|
74
|
+
rubygems_version: 3.0.9
|
76
75
|
signing_key:
|
77
76
|
specification_version: 4
|
78
77
|
summary: sharepoint client
|