vortex_client 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/vortex_client.rb +21 -11
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/lib/vortex_client.rb
CHANGED
@@ -366,7 +366,7 @@ module Vortex
|
|
366
366
|
# TODO: Fill out the stub.
|
367
367
|
class StructuredArticle < HtmlArticle
|
368
368
|
|
369
|
-
attr_accessor :title, :introduction, :content, :filename, :modifiedDate, :
|
369
|
+
attr_accessor :title, :introduction, :content, :filename, :modifiedDate, :publishDate, :owner, :url, :picture, :hideAdditionalContent
|
370
370
|
|
371
371
|
# Create an article
|
372
372
|
# Options:
|
@@ -423,13 +423,23 @@ module Vortex
|
|
423
423
|
if(picture)
|
424
424
|
json += " \"picture\": \"#{picture}\",\n"
|
425
425
|
end
|
426
|
-
if(@hideAdditionalContent)then
|
427
|
-
|
428
|
-
|
426
|
+
if(@hideAdditionalContent != nil)then
|
427
|
+
if(@hideAdditionalContent.kind_of?(FalseClass))
|
428
|
+
value = "false"
|
429
|
+
elsif(@hideAdditionalContent.kind_of?(TrueClass))then
|
430
|
+
value = "true"
|
431
|
+
elsif(@hideAdditionalContent.kind_of?(String))
|
432
|
+
value = @hideAdditionalContent
|
433
|
+
end
|
434
|
+
json += <<-EOF
|
435
|
+
"hideAdditionalContent": "#{value}"
|
436
|
+
EOF
|
437
|
+
end
|
438
|
+
json += <<-EOF
|
429
439
|
}
|
430
440
|
}
|
431
441
|
EOF
|
432
|
-
|
442
|
+
|
433
443
|
return json
|
434
444
|
end
|
435
445
|
|
@@ -439,19 +449,19 @@ module Vortex
|
|
439
449
|
'<v:userSpecifiedCharacterEncoding xmlns:v="vrtx">utf-8</v:userSpecifiedCharacterEncoding>' +
|
440
450
|
'<d:getcontenttype>application/json</d:getcontenttype>'
|
441
451
|
|
442
|
-
if(@
|
443
|
-
if(@
|
444
|
-
@
|
452
|
+
if(@publishDate and @publishDate != "")
|
453
|
+
if(@publishDate.kind_of? Time)
|
454
|
+
@publishDate = @publishDate.httpdate.to_s
|
445
455
|
end
|
446
|
-
props += '<v:
|
456
|
+
props += '<v:publish-date xmlns:v="vrtx">' + @publishDate + '</v:publish-date>'
|
447
457
|
end
|
448
458
|
|
449
459
|
if(date and date != "")
|
450
460
|
if(date.kind_of? Time)
|
451
461
|
date = @date.httpdate.to_s
|
452
462
|
end
|
453
|
-
if(@
|
454
|
-
props += '<v:
|
463
|
+
if(@publishDate == nil or @publishDate != "")
|
464
|
+
props += '<v:publish-date xmlns:v="vrtx">' + date + '</v:publish-date>'
|
455
465
|
end
|
456
466
|
props += '<d:getlastmodified>' + date + '</d:getlastmodified>' +
|
457
467
|
'<v:contentLastModified xmlns:v="vrtx">' + date + '</v:contentLastModified>' +
|