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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/vortex_client.rb +21 -11
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
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, :publishedDate, :owner, :url, :picture, :hideAdditionalContent
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
- json += <<-EOF
428
- "hideAdditionalContent": "#{@hideAdditionalContent}"
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
- end
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(@publishedDate and @publishedDate != "")
443
- if(@publishedDate.kind_of? Time)
444
- @publishedDate = @publishedDate.httpdate.to_s
452
+ if(@publishDate and @publishDate != "")
453
+ if(@publishDate.kind_of? Time)
454
+ @publishDate = @publishDate.httpdate.to_s
445
455
  end
446
- props += '<v:published-date xmlns:v="vrtx">' + @publishedDate + '</v:published-date>'
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(@publishedDate == nil or @publishedDate != "")
454
- props += '<v:published-date xmlns:v="vrtx">' + date + '</v:published-date>'
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>' +
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 4
9
- version: 0.5.4
8
+ - 5
9
+ version: 0.5.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Thomas Flemming