{"id":16548095,"url":"https://github.com/mscoutermarsh/mathy-poll","last_synced_at":"2025-10-12T04:42:44.082Z","repository":{"id":6010409,"uuid":"7233678","full_name":"mscoutermarsh/Mathy-Poll","owner":"mscoutermarsh","description":"Voting API with basic match CAPTCHA.","archived":false,"fork":false,"pushed_at":"2014-06-01T19:31:15.000Z","size":338,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T01:57:50.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mscoutermarsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-19T02:13:33.000Z","updated_at":"2019-07-09T14:29:12.000Z","dependencies_parsed_at":"2022-08-30T15:01:06.605Z","dependency_job_id":null,"html_url":"https://github.com/mscoutermarsh/Mathy-Poll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mscoutermarsh/Mathy-Poll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscoutermarsh%2FMathy-Poll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscoutermarsh%2FMathy-Poll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscoutermarsh%2FMathy-Poll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscoutermarsh%2FMathy-Poll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mscoutermarsh","download_url":"https://codeload.github.com/mscoutermarsh/Mathy-Poll/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mscoutermarsh%2FMathy-Poll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010282,"owners_count":26084720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T19:24:54.835Z","updated_at":"2025-10-12T04:42:44.031Z","avatar_url":"https://github.com/mscoutermarsh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Mathy-Poll](https://github.com/mscoutermarsh/Mathy-Poll)\n-----\nA Grape/Goliath API for tracking votes. With simple math captcha! \n\n1. Vote is created.\n2. API asks a simple math question (What's 2+2?).\n3. If user answers correctly. Vote is counted in poll.\n\nVery simple rate limiting by IP address.\n\nDemo:\n-----\nSee a live demo: [Mathy-Poll on Heroku](http://mathy-poll.herokuapp.com/)\n\nScreenshot:\n\n[![Mathy-poll](https://dl.dropbox.com/u/18216283/blog/mathy-poll.jpg)](http://mathy-poll.herokuapp.com/)\n\nSetup:\n------\nClone the repo:\n\n     git clone https://github.com/mscoutermarsh/Mathy-Poll.git\n     cd Mathy-Poll\n\nInstall gems:\n\n     bundle install\n\nSetup the database:\n\n     rake db:setup\n\nStart the server!\n\n     ruby server.rb -vs\n\nDeploy to [Heroku](http://heroku.com):\n------\nCreate a new app.\n\n    heroku apps:create APPNAMEHERE\n\nRun migrations\n\n    heroku run rake db:migrate RACK_ENV=production\n\nCheck out your new poll on heroku!\n\n    yourappname.herokuapp.com\n\nAPI Documentation:\n------\n\n### Create a new Vote\n\n    http POST 0.0.0.0:9000/vote/1\n\nThis will return the vote id and the math question:\n\n    {\n        \"id\": 7, \n        \"question\": \"What's 13+3?\"\n    }\n\nNow to confirm your vote... answer the question by POSTing to /vote/confirm/:id/:answer.\n\n    http POST 0.0.0.0:9000/vote/confirm/7/16\n\nIf your math is correct, the vote will be confirmed.\n\n    {\n        \"message\": \"Thanks for voting!\"\n    }\n\n### Get number of votes\nTo see how many votes there are for contestant #1.\n\n    http GET 0.0.0.0:9000/votes/1\n\nAnd it will return:\n\n    {\n        \"votes\": 4\n    }\n\n### Performance Specs on Heroku\nGoliath/Grape handles high loads **really** well. This has been tested at 200-300 requests per second on a single Heroku dyno.\n\n    1 Dyno:\n \n    Transactions:              12715 hits\n    Availability:              99.99 %\n    Elapsed time:              59.85 secs\n    Data transferred:          0.13 MB\n    Response time:            0.44 secs\n    Transaction rate:          212.45 trans/sec\n    Throughput:              0.00 MB/sec\n    Concurrency:                94.16\n    Successful transactions:    12715\n    Failed transactions:        1\n    Longest transaction:        11.56\n    Shortest transaction:      0.08\n\n\nNeed help?\n---------\n+ Twitter [@mscccc](http://twitter.com/mscccc \"@mscccc\") \n+ [mikecoutermarsh.com](http://mikecoutermarsh.com/ \"mikecoutermarsh\") \n\nCredits\n-------\n+ Based off of: [Grape-Goliath-Example](https://github.com/djones/grape-goliath-example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscoutermarsh%2Fmathy-poll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmscoutermarsh%2Fmathy-poll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmscoutermarsh%2Fmathy-poll/lists"}