{"id":16948388,"url":"https://github.com/technicalpickles/sinatra-mongo","last_synced_at":"2025-09-27T20:31:32.983Z","repository":{"id":755218,"uuid":"412177","full_name":"technicalpickles/sinatra-mongo","owner":"technicalpickles","description":"A light extension to sinatra for using mongo","archived":false,"fork":false,"pushed_at":"2012-01-23T06:12:35.000Z","size":140,"stargazers_count":39,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-11T15:59:09.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technicalpickles.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-12-10T00:13:21.000Z","updated_at":"2016-10-10T19:15:48.000Z","dependencies_parsed_at":"2022-07-18T22:59:49.823Z","dependency_job_id":null,"html_url":"https://github.com/technicalpickles/sinatra-mongo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fsinatra-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fsinatra-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fsinatra-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fsinatra-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicalpickles","download_url":"https://codeload.github.com/technicalpickles/sinatra-mongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234456503,"owners_count":18835803,"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","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-13T21:50:37.681Z","updated_at":"2025-09-27T20:31:27.738Z","avatar_url":"https://github.com/technicalpickles.png","language":"Ruby","funding_links":[],"categories":["NoSQL"],"sub_categories":[],"readme":"= sinatra-mongo\n\nExtends Sinatra with an extension method for dealing with monogodb using the ruby driver.\n\n\nInstall it with gem:\n\n    $ gem install sinatra-mongo\n\nNow we can use it an example application.\n\n    require 'sinatra'\n    require 'sinatra/mongo'\n    \n    # Specify the database to use. Defaults to mongo://localhost:27017/default,\n    # so you will almost definitely want to change this.\n    #\n    # Alternatively, you can specify the MONGO_URL as an environment variable\n    set :mongo, 'mongo://localhost:27017/sinatra-mongo-example'\n    \n    # At this point, you can access the Mongo::Database object using the 'mongo' helper:\n    \n    puts mongo[\"testCollection\"].insert {\"name\" =\u003e \"MongoDB\", \"type\" =\u003e \"database\", \"count\" =\u003e 1, \"info\" =\u003e {\"x\" =\u003e 203, \"y\" =\u003e '102'}}\n    \n    get '/' do\n      mongo[\"testCollection\"].find_one\n    end\n\nIf you need to use authentication, you can specify this in the mongo uri:\n\n    set :mongo, 'mongo://myuser:mypass@localhost:27017/sinatra-mongo-example'\n\n== Mongo Reference\n\n * http://www.mongodb.org/display/DOCS/Ruby+Tutorial\n\n== Note on Patches/Pull Requests\n \n* Fork the project.\n* Make your feature addition or bug fix.\n* Add tests for it. This is important so I don't break it in a\n  future version unintentionally.\n* Commit, do not mess with rakefile, version, or history.\n  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)\n* Send me a pull request. Bonus points for topic branches.\n\n== Copyright\n\nCopyright (c) 2009 Joshua Nichols. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fsinatra-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicalpickles%2Fsinatra-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fsinatra-mongo/lists"}