DEVELOPER-833 update video structured data #41

Merged
merged 1 commit into from Aug 5, 2014

Projects

None yet

2 participants

@pmuir
Member
pmuir commented Jul 21, 2014

No description provided.

@LightGuard LightGuard commented on the diff Jul 23, 2014
lib/aweplug/helpers/vimeo.rb
@@ -240,6 +240,19 @@ def duration_in_seconds
(a.length > 0 ? a[0].to_i : 0) + (a.length > 1 ? a[1].to_i * 60 : 0) + (a.length > 2 ? a[2].to_i * 60 : 0)
end
+ def duration_iso8601
+ t = Integer @video["duration"]
+ Time.at(t).utc.strftime("PT%HH%MM%SS")
@LightGuard
LightGuard Jul 23, 2014 Member

There's a Time#iso8601(number_of_nanoseconds_to_display) but it also includes the offset, which you're not showing here, so not sure if you care.

@pmuir
pmuir Jul 23, 2014 Member

Oh that would have been easier. I can try that one.

@LightGuard
Member

@pmuir are you going to try that change?

@pmuir
Member
pmuir commented Aug 5, 2014

@LightGuard I can't see a method Time#iso8601 Where is it documented?

@pmuir
Member
pmuir commented Aug 5, 2014

I guess you are referring to Date#iso8601 which formats a date using iso8601. I need to format a duration, which AFAIK Ruby doesn't offer.

http://www.ruby-doc.org/stdlib-2.1.2/libdoc/date/rdoc/Date.html#method-i-iso8601

@LightGuard
Member

It isn't documented, but it's there. Try pry/irb—
Sent from Mailbox

On Tue, Aug 5, 2014 at 8:51 AM, Pete Muir notifications@github.com
wrote:

I guess you are referring to Date#iso8601 which formats a date using iso8601. I need to format a duration, which AFAIK Ruby doesn't offer.

http://www.ruby-doc.org/stdlib-2.1.2/libdoc/date/rdoc/Date.html#method-i-iso8601

Reply to this email directly or view it on GitHub:
#41 (comment)

@pmuir
Member
pmuir commented Aug 5, 2014

I did try it. It behaves the same as Date#iso8601, hence my comment.

@LightGuard
Member

Ah. Okay then. Any other changes you wanted to look at, or are we good to
merge this now?

On Tue, Aug 5, 2014 at 9:07 AM, Pete Muir notifications@github.com wrote:

I did try it. It behaves the same as Date#iso8601, hence my comment.


Reply to this email directly or view it on GitHub
#41 (comment).

Jason Porter
http://en.gravatar.com/lightguardjp

@pmuir
Member
pmuir commented Aug 5, 2014

It can be merged.

On 5 Aug 2014, at 16:41, Jason Porter notifications@github.com wrote:

Ah. Okay then. Any other changes you wanted to look at, or are we good to
merge this now?

On Tue, Aug 5, 2014 at 9:07 AM, Pete Muir notifications@github.com wrote:

I did try it. It behaves the same as Date#iso8601, hence my comment.


Reply to this email directly or view it on GitHub
#41 (comment).

Jason Porter
http://en.gravatar.com/lightguardjp

Reply to this email directly or view it on GitHub.

@LightGuard LightGuard merged commit 1ce581a into awestruct:master Aug 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment