DEVELOPER-833 update video structured data #41

Merged
merged 1 commit into from Aug 5, 2014

Conversation

Projects
None yet
2 participants
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

Owner

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.

Owner

LightGuard commented Aug 4, 2014

@pmuir are you going to try that change?

Member

pmuir commented Aug 5, 2014

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

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

Owner

LightGuard commented Aug 5, 2014

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)

Member

pmuir commented Aug 5, 2014

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

Owner

LightGuard commented Aug 5, 2014

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

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 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