Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwitterUserAgent Tweaks #363

Merged
merged 5 commits into from
Jun 11, 2014
Merged

Conversation

0xdevalias
Copy link
Member

Solves #357 #359

@0xdevalias 0xdevalias changed the title TwitterUserAgent Updates TwitterUserAgent Tweaks Jun 2, 2014
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) when pulling 370297c on alias1:twitteruseragent-tweaks into 43d0256 on cantino:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) when pulling 2eee88e on alias1:twitteruseragent-tweaks into 43d0256 on cantino:master.

}
def include_retweets?
if options[:include_retweets].present?
!!options[:include_retweets]
Copy link
Member

Choose a reason for hiding this comment

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

It might be present but "false". I'd suggest

def include_retweets?
  options[:include_retweets] != "false"
end

Copy link
Member Author

Choose a reason for hiding this comment

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

That's probably a cleaner way than what I have, though same outcome.

Edit: In fact, by that regard, could I not just use the following?

def include_retweets?
  !!options[:include_retweets]
end

Edit2: Nevermind, I can't because of the default being true. Done.

@cantino
Copy link
Member

cantino commented Jun 3, 2014

You should add a spec that shows it skipping older tweets. Let me know if you need assistance!

@0xdevalias
Copy link
Member Author

I was originally going to write a spec for that, but then I couldn't think of a nice way to do it (since the boilerplate in the 'before' clause doesn't really apply for this test, so I didn't bother.

Will make an attempt at it now, but would be happy to hear a 'best practice' way to do it.

Edit: How's that?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) when pulling fe75d6b on alias1:twitteruseragent-tweaks into 43d0256 on cantino:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) when pulling 4b48a6e on alias1:twitteruseragent-tweaks into 43d0256 on cantino:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) when pulling 1bf0e3b on alias1:twitteruseragent-tweaks into 43d0256 on cantino:master.

@cantino
Copy link
Member

cantino commented Jun 6, 2014

Looks good to me @alias1. If you're happy with it and have manually tested it with some Twitter data, go ahead and merge. Nice work!

@cantino
Copy link
Member

cantino commented Jun 11, 2014

@alias1 are you happy with this?

0xdevalias added a commit that referenced this pull request Jun 11, 2014
@0xdevalias 0xdevalias merged commit 94a8465 into huginn:master Jun 11, 2014
@0xdevalias
Copy link
Member Author

Been a bit busy with life priorities, but yup, happy with it and merged :)

DataMinerUK pushed a commit to DataMinerUK/huginn that referenced this pull request Oct 6, 2014
@0xdevalias 0xdevalias deleted the twitteruseragent-tweaks branch March 6, 2017 05:57
@0xdevalias 0xdevalias restored the twitteruseragent-tweaks branch March 6, 2017 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants