Giter Club home page Giter Club logo

akismet's People

Contributors

flameeyes avatar jonahb avatar pwim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

akismet's Issues

Add an option to enable test mode

Akismet has a test mode; we should be able to use it.

The reason for this is mentioned on https://github.com/joshfrench/rakismet:

Rakismet can be configued to tell Akismet that it should operate in test mode - so Akismet will not change its behavior based on any test API calls, meaning they will have no training effect. That means your tests can be somewhat repeatable in the sense that one test won't influence subsequent calls.

This sounds like a reasonable behavior too:

NOTE: When running in Rails, Rakismet will run in test mode when your Rails environment is test or development, unless explictly configured otherwise. Outside of Rails Rakismet defaults to test mode turned off.

Nothing gets flagged as blatant

I've used this gem for 100K+ spam checks, 10K+ were marked as spam, and exactly 0 were marked as blatant. Is there a problem with Akismet, or this gem, or maybe there's a problem with my code (is there specific content I can send to trigger the blatant flag?).

client.rb:376 typo for "referrer"

The internet made a mistake on the spelling of "referrer" so we need to make sure we always use "referer" instead.

client.rb:376 needs to be updated to referer: :referer

Test failure with ruby 2.0 and ruby 2.1

  • Running test phase for ruby20 ...
    Loaded suite ClientTest
    Started
    ...F

    Failure:
    test_comment_check_with_invalid_api_key_raises(ClientTest)
    /var/tmp/portage/dev-ruby/akismet-1.0.1/work/ruby20/akismet-1.0.1/test/client_test.rb:39:in `test_comment_check_with_invalid_api_key_raises'
    36: end
    37:
    38: def test_comment_check_with_invalid_api_key_raises
    => 39: error = assert_raise( Akismet::Error ) do
    40: @invalid_client.comment_check 'ip', 'ua'
    41: end
    42: assert_equal Akismet::Error::INVALID_API_KEY, error.code

Akismet::Error expected but was
<URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.akismet.com:80 (or bad hostname?)>)>

diff:
? A kismet ::Error

? URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.a .com 80 ( bad hostname?)>)

....F

Failure:
test_submit_ham_with_invalid_api_key_raises(ClientTest)
/var/tmp/portage/dev-ruby/akismet-1.0.1/work/ruby20/akismet-1.0.1/test/client_test.rb:54:in `test_submit_ham_with_invalid_api_key_raises'
51: end
52:
53: def test_submit_ham_with_invalid_api_key_raises
=> 54: error = assert_raise( Akismet::Error ) do
55: @invalid_client.submit_ham 'ip', 'ua'
56: end
57: assert_equal Akismet::Error::INVALID_API_KEY, error.code

Akismet::Error expected but was
<URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.akismet.com:80 (or bad hostname?)>)>

diff:
? A kismet ::Error

? URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.a .com 80 ( bad hostname?)>)

.F

Failure:
test_submit_spam_with_invalid_api_key_raises(ClientTest)
/var/tmp/portage/dev-ruby/akismet-1.0.1/work/ruby20/akismet-1.0.1/test/client_test.rb:65:in `test_submit_spam_with_invalid_api_key_raises'
62: end
63:
64: def test_submit_spam_with_invalid_api_key_raises
=> 65: error = assert_raise( Akismet::Error ) do
66: @invalid_client.submit_spam 'ip', 'ua'
67: end
68: assert_equal Akismet::Error::INVALID_API_KEY, error.code

Akismet::Error expected but was
<URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.akismet.com:80 (or bad hostname?)>)>

diff:
? A kismet ::Error

? URI::InvalidURIError(<the scheme http does not accept registry part: invalid_api_key.rest.a .com 80 ( bad hostname?)>)

..

Finished in 2.922023833 seconds.

13 tests, 22 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
76.9231% passed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.