Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

DEVELOPER-833 update video structured data #41

Merged
merged 1 commit into from Aug 5, 2014

Conversation

Projects
None yet
2 participants
Contributor

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

Contributor

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?

Contributor

pmuir commented Aug 5, 2014

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

Contributor

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)

Contributor

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

Contributor

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 added a commit that referenced this pull request Aug 5, 2014

@LightGuard LightGuard Merge pull request #41 from pmuir/DEVELOPER-833
DEVELOPER-833 update video structured data
1ce581a

@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