Gem Version GA analytics

Ideone is a pastebin, as well as an online compiler and debugger. This project is a Ruby binding to the Ideone API.

Requires Ruby =>1.9.2


require 'ideone'

# Authenticate with Ideone
i ='username', 'password')
=> #<Ideone:0x000000021dfd88 ... >

# Enable logging by setting flag to `true`
i ='username', 'password', true)
=> #<Ideone:0x000000021dfd88 ... >

# Create submission
source_code = "puts 'hello, world'"
                    17) # Ruby
=> 'TOKEN'

# Get submission status
=> {:status=>0, :result=>15}

# Get all available languages
=> {"1"=>"C++ (gcc-4.3.4)", "2"=>"Pascal (gpc) (gpc 20070904)",
    "3"=>"Perl (perl 5.12.1)", "4"=>"Python (python 2.6.4)"

# Test that everything's working
=> {"error"=>"OK",

Similar projects

I stole the best ideas from each of the above projects, which, I think, makes it much more robust, and it includes tests (which actually pass).

Running the test suite

To run the test suite, please fill out USER and PASS in test/test_ideone-ruby-api.rb

Then, you can run `rake test`

In the wild

Contributing to ideone-ruby-api

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.



Copyright © 2011-2014 Kenny Meyer. See LICENSE.txt for further details.