{"id":13858868,"url":"https://github.com/evanleck/sinatra-boilerplate","last_synced_at":"2025-07-14T01:32:02.637Z","repository":{"id":138786649,"uuid":"2032075","full_name":"evanleck/sinatra-boilerplate","owner":"evanleck","description":"A great place to start with Sinatra, HTML5 Boilerplate and Compass all cooked together.","archived":true,"fork":false,"pushed_at":"2014-10-14T22:48:21.000Z","size":442,"stargazers_count":79,"open_issues_count":2,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-12T08:53:16.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/l3ck/sinatra-boilerplate#readme","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/evanleck.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":"2011-07-11T19:21:57.000Z","updated_at":"2023-03-26T16:53:06.000Z","dependencies_parsed_at":"2023-03-12T17:00:46.120Z","dependency_job_id":null,"html_url":"https://github.com/evanleck/sinatra-boilerplate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/evanleck/sinatra-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanleck%2Fsinatra-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanleck%2Fsinatra-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanleck%2Fsinatra-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanleck%2Fsinatra-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evanleck","download_url":"https://codeload.github.com/evanleck/sinatra-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evanleck%2Fsinatra-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265231181,"owners_count":23731534,"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-08-05T03:02:23.536Z","updated_at":"2025-07-14T01:32:02.337Z","avatar_url":"https://github.com/evanleck.png","language":"Ruby","funding_links":[],"categories":["Ruby","Boilerplate and Template"],"sub_categories":[],"readme":"# Sinatra Boilerplate\nA great place to start with [Sinatra](http://www.sinatrarb.com/), [HTML5 Boilerplate](http://html5boilerplate.com/), [Compass](http://compass-style.org/), [CoffeeScript](http://coffeescript.org/) and [Sprockets](https://github.com/sstephenson/sprockets) all cooked together.\n\n## TL;DR\n1. Grab the code and `bundle` the gems.\n2. Make sure you have [memcached](http://www.memcached.org/) installed.\n3. Run `rake s` to start the development server.\n\n# What's in the Box\n## HTML5 Boilerplate\nsinatra-boilerplate uses *some* of the utter uber-hawtness that is the [HTML5 Boilerplate](http://html5boilerplate.com/) but *not all*. I opted not to use the build script stuff because I feel like it adds an extra layer of trouble when working with Sinatra.\n\nThe base layout file is pretty compliant with what the Boilerplate puts out except for a few minor tweaks. Most of the comments have been left in place as well.\n\nDirect implementations from HTML5BP:\n\n* `html` scoping by class.\n* Viewport settings for mobile browsers.\n* Better analytics script.\n* More awesome CSS base.\n* ... probably more that I've forgotten :)\n\n## Modernizr\n[Modernizr](http://www.modernizr.com/) is fantastic and I threw it in because... well, it's fantastic!\n\n## Compass\nBecause CSS sucks and SASS + Compass doesn't; it gives you all kinds of great mixins and nesting stuff that would surely make anyone who's done a lot of CSS quiver in delight. [Scope the docs and get crackin'.](http://compass-style.org/)\n\n### Susy\nSusy is a fantastic grid system built to be responsive and lithe. [Check out the docs here and get griddin'](http://susy.oddbird.net/)\n\n## Sinatra Addons\n### Form Tag Helpers\nThe thing I missed most in Sinatra was the glorious `input_for` kind of stuff you get with Rails, so I made some! I've included them by way of the [gem I made, 'sinatra-tag-helpers'](https://github.com/l3ck/sinatra-tag-helpers).\n\n### Routing Helpers\nSome [simple routing helpers](https://github.com/l3ck/sinatra-routing-helpers) I end up using a lot with Sinatra. Methods like:\n* `is_page?`\n* `url_with_params`\n* `back_with_params`\n* `parsed_referrer_path`\n\n## Extra Hawt Sauce\nI've added a bunch of modules and helper functions that I use all the time to this to (hopefully) make your life easier when you're getting your app first setup. Some of the helpers methods I've added include:\n\n* **Sprockets**\n  * holy crap that's nice!!\n  * there's a Rake task that pre-compiles your assets so nginx (or Apache or whatever) can serve them up _super_ fast too!\n* **core extensions**\n  * adds a `try` method and `blank?` method to everything (totally stolen from Rails) so you can stop doing `!nil? \u0026\u0026 !empty?`\n* **Sinatra Modifications**\n  * a better `erb` method so you don't have to do crap like `erb :\"folder/file\"` anymore; just pass a string and it'll take care of the rest (including skipping the layout on XHR requests).\n\n## Server Goodies\n* **nginx configuration** - all based on H5BP and a simple upstream setup for Unicorn.\n* **logrotate configuration** - so your logs don't get crazy.\n\n## How to Use It\nYou like it? **Awesome!** Here's how to use it:\n\n1. Download it (either through git or the download button).\n2. `bundle`\n3. Make sure you have [memcached](http://www.memcached.org/) installed and running (`memcached -d`).\n4. Run `rake s` from the directory you checked the code out to.\n5. Profit!\n\nIf you have suggestions or think I goofed please let me know or send a pull request!\n\n## Acknowledgements\nAll the stuff used here is either open source or donation ware and totally the work of the people who made it, not me. I just put the pieces together and bundled it up all pretty-like. This little starter package wouldn't be possible without the awesome work these guys have done and their generosity in sharing their code with the rest of us.\n\nOh, and...\n\n\u003cpre\u003e\n# . . . . . . . . . . . . . . . . _,,,--~~~~~~~~--,_\n# . . . . . . . . . . . . . . ,-' : : : :::: :::: :: : : : : :º '-, ITS A TRAP!\n# . . . . . . . . . . . . .,-' :: : : :::: :::: :::: :::: : : :o : '-,\n# . . . . . . . . . . . ,-' :: ::: :: : : :: :::: :::: :: : : : : :O '-,\n# . . . . . . . . . .,-' : :: :: :: :: :: : : : : : , : : :º :::: :::: ::';\n# . . . . . . . . .,-' / / : :: :: :: :: : : :::: :::-, ;; ;; ;; ;; ;; ;; ;\\\n# . . . . . . . . /,-',' :: : : : : : : : : :: :: :: : '-, ;; ;; ;; ;; ;; ;;|\n# . . . . . . . /,',-' :: :: :: :: :: :: :: : ::_,-~~,_'-, ;; ;; ;; ;; |\n# . . . . . _/ :,' :/ :: :: :: : : :: :: _,-'/ : ,-';'-'''''~-, ;; ;; ;;,'\n# . . . ,-' / : : : : : : ,-''' : : :,--'' :|| /,-'-'--'''__,''' \\ ;; ;,-'/\n# . . . \\ :/,, : : : _,-' --,,_ : : \\ :\\ ||/ /,-'-'x### ::\\ \\ ;;/\n# . . . . \\/ /---'''' : \\ #\\ : :\\ : : \\ :\\ \\| | : (O##º : :/ /-''\n# . . . . /,'____ : :\\ '-#\\ : \\, : :\\ :\\ \\ \\ : '-,___,-',-`-,,\n# . . . . ' ) : : : :''''--,,--,,,,,,¯ \\ \\ :: ::--,,_''-,,'''¯ :'- :'-,\n# . . . . .) : : : : : : ,, : ''''~~~~' \\ :: :: :: :'''''¯ :: ,-' :,/\\\n# . . . . .\\,/ /|\\\\| | :/ / : : : : : : : ,'-, :: :: :: :: ::,--'' :,-' \\ \\\n# . . . . .\\\\'|\\\\ \\|/ '/ / :: :_--,, : , | )'; :: :: :: :,-'' : ,-' : : :\\ \\,\n# . . . ./¯ :| \\ |\\ : |/\\ :: ::----, :\\/ :|/ :: :: ,-'' : :,-' : : : : : : ''-,,\n# . . ..| : : :/ ''-(, :: :: :: '''''~,,,,,'' :: ,-'' : :,-' : : : : : : : : :,-'''\\\\\n# . ,-' : : : | : : '') : : :¯''''~-,: : ,--''' : :,-'' : : : : : : : : : ,-' :¯'''''-,_ .\n# ./ : : : : :'-, :: | :: :: :: _,,-''''¯ : ,--'' : : : : : : : : : : : / : : : : : : :''-,\n# / : : : : : -, :¯'''''''''''¯ : : _,,-~'' : : : : : : : : : : : : : :| : : : : : : : : :\n# : : : : : : : :¯''~~~~~~''' : : : : : : : : : : : : : : : : : : | : : : : : : : : :\n\u003c/pre\u003e\n\nSo, ya know, watch out...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanleck%2Fsinatra-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevanleck%2Fsinatra-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevanleck%2Fsinatra-boilerplate/lists"}