Coder Social home page Coder Social logo

openminds / ruby-mollom Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 2.0 323 KB

a Ruby class for easy interfacing with the mollom.com open API for spam detection and content quality assesment.

Home Page: http://mollom.rubyforge.org/

License: MIT License

Ruby 100.00%

ruby-mollom's People

Contributors

bradleypriest avatar defv avatar joren avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

maartenvg

ruby-mollom's Issues

REST API

Aloha! :)

There's a new Ruby/Rails gem https://github.com/hernan/rest_mollom, which integrates with Mollom's REST API http://mollom.com/api -- are you aware of that?

It's partially based on the code of this XML-RPC library. Would you be interested in merging that new library into this one and joining efforts? :)

Thanks,
sun / Mollom

`refresh` arg in `server_list()` has inverted behavior

server_list is expected to force refresh if the argument is true. However, it does it when the argument is false, due to a bad if clause.

The related test_server_list_force_reload doesn't need to change because it was wrong too, but becomes valid when fixing the code. The first call to server_list results in a refresh, the second doesn't as it is cached. The third call forces refresh, bringing the total to 2, as specified in the expectation.

The patch is this simple:

--- a/lib/mollom.rb
+++ b/lib/mollom.rb
@@ -137,7 +137,7 @@ class Mollom
   #  mollom.server_list
   #  # => [{:proto=>"http", :host=>"88.151.243.81"}, {:proto=>"http", :host=>"82.103.131.136"}]
   def server_list refresh = false
-    return @server_list if @server_list && refresh
+    return @server_list if @server_list && ! refresh
     STATIC_SERVER_LIST.each do |static_server|
       @server_list = get_server_list_from(static_server)
       return @server_list if @server_list

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.