glossyapp 0.2.1 → 0.2.2
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 +4 -4
- data/lib/glossyapp/session.rb +4 -8
- data/lib/glossyapp/session/documents.rb +2 -2
- data/lib/glossyapp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7fd19dfd700e8d9fd1d1a718d7984372e18b66bb
|
|
4
|
+
data.tar.gz: 109bf1c638c4357885d9fea2e80e8af947c4ecb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7afd647147c88f45665e5785911fd62991cb152f92f2160d8c74120b4e9c5d11c53fa9828354d0cd6de7b3c6ea827409992dae2f2bda7b7927eb709dd363fb07
|
|
7
|
+
data.tar.gz: c74b265f86354fbba571f197e678bc818dd6f26d9c387ec11d7cdb18ac8b6dbdaf1d6b69273a948635d7c3116f8d52e1c8ae8b291b2bf52956af9e92a1e8e8ab
|
data/lib/glossyapp/session.rb
CHANGED
|
@@ -69,14 +69,10 @@ module GlossyApp
|
|
|
69
69
|
data.each_pair { |key, value| post_data[key] = value }
|
|
70
70
|
files.each_pair { |key, value| post_data[key] = UploadIO.new(File.new(value), 'application/octet-stream', File.basename(value)) }
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# uri = build_uri(path)
|
|
77
|
-
# request = Net::HTTP::Post::Multipart.new(uri, post_data)
|
|
78
|
-
#
|
|
79
|
-
# return make_request(request, headers)
|
|
72
|
+
uri = build_uri(path)
|
|
73
|
+
request = Net::HTTP::Post::Multipart.new(uri, post_data)
|
|
74
|
+
|
|
75
|
+
return make_request(request, headers)
|
|
80
76
|
end
|
|
81
77
|
|
|
82
78
|
def glossy_delete(path, headers = {})
|
|
@@ -79,7 +79,7 @@ module GlossyApp
|
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def publish_document(document_id)
|
|
82
|
-
response = glossy_post("/documents/#{document_id}/publish", {})
|
|
82
|
+
response = glossy_post("/documents/#{document_id}/publish", {}.to_json)
|
|
83
83
|
if [200, 201].include?(response.status)
|
|
84
84
|
return true
|
|
85
85
|
else
|
|
@@ -88,7 +88,7 @@ module GlossyApp
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def unpublish_document(document_id)
|
|
91
|
-
response = glossy_post("/documents/#{document_id}/unpublish", {})
|
|
91
|
+
response = glossy_post("/documents/#{document_id}/unpublish", {}.to_json)
|
|
92
92
|
if [200, 201].include?(response.status)
|
|
93
93
|
return true
|
|
94
94
|
else
|
data/lib/glossyapp/version.rb
CHANGED