Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Got it working with new cacheable-flash gem#29

Closed
pboling wants to merge 6 commits intocarhartl:masterfrom
pboling:master
Closed

Got it working with new cacheable-flash gem#29
pboling wants to merge 6 commits intocarhartl:masterfrom
pboling:master

Conversation

@pboling
Copy link

@pboling pboling commented Sep 22, 2011

No description provided.

@carhartl
Copy link
Owner

Looking at the diff I can't understand how these changes help to make it work with that gem... could you explain?

@pboling
Copy link
Author

pboling commented Jan 19, 2012

Perhaps a better way to say it is, 'a few features were added which are utilized by the cacheable-flash gem, and one bug was fixed, in the expiry date'.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this different from the original code? t === options.expires.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, there is no functional difference. It would be clearer if t were removed altogether. I had misremembered the purpose of the change (which I had pulled from another fork).

                var days = options.expires;
                options.expires.setDate(new Date().getDate() + days);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just to save some code. Otherwise I had to write (your code is missing something):

var days = options.expires;
options.expires = new Date();
options.expires.setDate(option.expires.getDate() + days);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like the following doesn't make it much better I think...

options.expires = new Date(new Date() * 1 + options.expires * 24 * 60 * 60 * 1000);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. :)

@carhartl
Copy link
Owner

Is there a github issue at play? When I look at the Diff, the only (relevant) difference I see is this:

-            t.setDate(t.getDate() + days);
+            options.expires.setDate(t.getDate() + days);

which still doesn't do much.

@pboling
Copy link
Author

pboling commented Jan 24, 2012

This is not dissimilar from the other pull request from @benz303. It looks like the differences are either already part of your master or also included in that other pull request. I am closing this one.

@pboling pboling closed this Jan 24, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants