restful-sharepoint 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restful-sharepoint.rb +11 -2
- data/lib/restful-sharepoint/version.rb +1 -1
- data/restful-sharepoint.gemspec +0 -1
- metadata +1 -16
- data/lib/restful-sharepoint/objects/image.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca5a6d79134a919eb106740ee9c59cdb2f5d08bc
|
4
|
+
data.tar.gz: 83b3941a678cb3da05dc7f4068bb5c51ff01c538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bf90465124a3eb773e56bf541057f8e2c927c5ccd57e07ab4a4b82d71d5d1f38dfa946717bfc2bdf392f1a575e05372c395a2dddce50b1bb40281858461bf17
|
7
|
+
data.tar.gz: cc7ddbb03f5effef14684a74bcc9599e6f77cfb8e95a9958b2877aeac247da9532c6dcc4ab108824714ae930847b5575246816277edfff3b13f7d8c1c8eb2a1d
|
data/lib/restful-sharepoint.rb
CHANGED
@@ -2,7 +2,6 @@ require 'json'
|
|
2
2
|
require 'httpi'
|
3
3
|
require 'curb'
|
4
4
|
require 'cgi'
|
5
|
-
require 'require_pattern'
|
6
5
|
|
7
6
|
HTTPI.adapter = :curb
|
8
7
|
|
@@ -29,4 +28,14 @@ require_relative './restful-sharepoint/connection.rb'
|
|
29
28
|
require_relative './restful-sharepoint/common-base.rb'
|
30
29
|
require_relative './restful-sharepoint/object.rb'
|
31
30
|
require_relative './restful-sharepoint/collection.rb'
|
32
|
-
|
31
|
+
|
32
|
+
require_relative './restful-sharepoint/objects/file.rb'
|
33
|
+
require_relative './restful-sharepoint/objects/attachment.rb'
|
34
|
+
require_relative './restful-sharepoint/objects/list-item.rb'
|
35
|
+
require_relative './restful-sharepoint/objects/list.rb'
|
36
|
+
require_relative './restful-sharepoint/objects/web.rb'
|
37
|
+
|
38
|
+
require_relative './restful-sharepoint/collections/attachments.rb'
|
39
|
+
require_relative './restful-sharepoint/collections/list-items.rb'
|
40
|
+
require_relative './restful-sharepoint/collections/lists.rb'
|
41
|
+
require_relative './restful-sharepoint/collections/webs.rb'
|
data/restful-sharepoint.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restful-sharepoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Wardrop
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.9'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: require_pattern
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
description: Provides a convenient object model to the OData REST API of SharePoint
|
56
42
|
2013 and newer.
|
57
43
|
email: tomw@msc.qld.gov.au
|
@@ -74,7 +60,6 @@ files:
|
|
74
60
|
- lib/restful-sharepoint/object.rb
|
75
61
|
- lib/restful-sharepoint/objects/attachment.rb
|
76
62
|
- lib/restful-sharepoint/objects/file.rb
|
77
|
-
- lib/restful-sharepoint/objects/image.rb
|
78
63
|
- lib/restful-sharepoint/objects/list-item.rb
|
79
64
|
- lib/restful-sharepoint/objects/list.rb
|
80
65
|
- lib/restful-sharepoint/objects/web.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module RestfulSharePoint
|
2
|
-
class File < Object
|
3
|
-
# Overwrite can be true, false, or a date.
|
4
|
-
def save_thumbnail(dest, size: '128x128', format: 'jpg', overwrite: true)
|
5
|
-
if !::File.exist?(dest) || overwrite == true || (Time === overwrite && ::File.mtime(dest) < overwrite)
|
6
|
-
image = MiniMagick::Image.read(content).collapse!
|
7
|
-
image.combine_options do |img|
|
8
|
-
img.thumbnail "#{size}^"
|
9
|
-
img.gravity "center"
|
10
|
-
img.colorspace "sRGB"
|
11
|
-
img.background "white"
|
12
|
-
img.flatten # Merges images with white background
|
13
|
-
end
|
14
|
-
image.format format
|
15
|
-
image.write dest
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|