sharepoint-ruby 0.1.4 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a11cf9062db591f9f0695b4629aedc1b89b5aff255b24e177878b33e7ddd4a2
4
- data.tar.gz: f9576d49206ba34660272b3dd1434a1220f049a3a6e7e1ad6c40ef3ee86a4855
3
+ metadata.gz: b395db257ebda33c64b88dbd20a458d93029e062346e9761dbeb1c5783e60ae8
4
+ data.tar.gz: be1fde7c525cc0b28905bd40d98914528142d3ef4a14e345e73cc376aff0d224
5
5
  SHA512:
6
- metadata.gz: 7d9a594f40b8876d68ab3c727c227f487b362ba2e188506bf5c33eab895f00cb056ad27fb8c94a8806bf6b016428ae10c2fefde21ccfc1304f847df5f9e1c781
7
- data.tar.gz: 1d2a20925810e2c64602e3764192ef763f96097839601db630b0e426da7e3c30f171bd2bdbed62edb661d166dee3d3b93deb6c0cedb75ffb05d43f0786594cc3
6
+ metadata.gz: cb0514576fad6f8727632ff7adc2170f635f43420bd54122cb88040309730096b1325d359c9e49736cd254096c996b450e937f7ff650ff49f29fdbcda8fa033f
7
+ data.tar.gz: ffb84d515c7163fffb3fd70869175197d484f381d59dac264486e98b35cadc21821e420bdcb526b48bceff6efe71f9ddbb8e3253508b00812d363553aadfb623
@@ -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('#{URI::encode(name.to_s)}')"
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='#{URI::encode(name.to_s)}')"
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
 
@@ -157,7 +157,11 @@ 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}=#{URI::encode value.to_s}"
160
+ <<<<<<< Updated upstream
161
+ url += "$#{key}=#{CGI.escape value.to_s}"
162
+ =======
163
+ url += "$#{key}=#{CGI::escape value.to_s}"
164
+ >>>>>>> Stashed changes
161
165
  has_options = true
162
166
  end
163
167
  url
@@ -214,7 +218,7 @@ module Sharepoint
214
218
  belongs_to :view
215
219
 
216
220
  def add_view_field name
217
- @site.query :post, "#{__metadata['uri']}/addviewfield('#{URI.encode name}')"
221
+ @site.query :post, "#{__metadata['uri']}/addviewfield('#{URI::Parser.new.escape name}')"
218
222
  end
219
223
 
220
224
  def move_view_field_to name, index
@@ -229,7 +233,7 @@ module Sharepoint
229
233
  end
230
234
 
231
235
  def remove_view_field name
232
- @site.query :post, "#{__metadata['uri']}/removeviewfield('#{URI.encode name}')"
236
+ @site.query :post, "#{__metadata['uri']}/removeviewfield('#{URI::Parser.new.escape name}')"
233
237
  end
234
238
  end
235
239
  end
@@ -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.encode value.gsub("'", %q(\\\')))}'"
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.encode id}')"
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.encode name}')"
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.1.4
4
+ version: 0.2.1
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: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2022-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '0.8'
20
20
  - - "<="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.9.10
22
+ version: 0.9.11
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '0.8'
30
30
  - - "<="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.9.10
32
+ version: 0.9.11
33
33
  description: Client for Sharepoint's REST API
34
34
  email: michael@unetresgrossebite.com
35
35
  executables: []
@@ -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
- - BSD
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
- rubyforge_project:
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