Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init

  • Loading branch information...
commit c2aa44f0f48f5662e9e7516e283770293146c589 0 parents
@stefl authored
7 .components
@@ -0,0 +1,7 @@
+---
+:orm: mongoid
+:test: none
+:mock: none
+:script: none
+:renderer: haml
+:stylesheet: none
7 .gitignore
@@ -0,0 +1,7 @@
+.DS_Store
+log/**/*
+tmp/**/*
+bin/*
+vendor/gems/*
+!vendor/gems/cache/
+.sass-cache/*
41 Gemfile
@@ -0,0 +1,41 @@
+source :rubygems
+
+# Server requirements (defaults to WEBrick)
+# gem 'thin'
+# gem 'mongrel'
+
+# Project requirements
+gem 'rake'
+gem 'sinatra-flash', :require => 'sinatra/flash'
+
+# Component requirements
+gem 'haml'
+gem 'mongoid'
+gem 'bson_ext', :require => "mongo"
+gem "compass", "0.12.2"
+gem "susy", "1.0.rc.4"
+gem "sassy-buttons"
+gem "unicorn"
+gem "dalli"
+
+# Sprockets on Heroku support
+gem 'sprockets', "2.3.0"
+gem 'sprockets-sass'
+gem 'sass-on-heroku'
+gem 'padrino-sprockets', :require => 'padrino/sprockets', :git => "git://github.com/stefl/padrino-sprockets.git", :branch => "master" #:path => "/repos/padrino-sprockets"
+gem 'execjs'
+gem 'therubyracer', :platforms => :ruby
+gem 'jsmin'
+
+# Test requirements
+
+# Padrino Stable Gem
+gem 'padrino', '0.10.5'
+
+# Or Padrino Edge
+# gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'
+
+# Or Individual Gems
+# %w(core gen helpers cache mailer admin).each do |g|
+# gem 'padrino-' + g, '0.10.5'
+# end
147 Gemfile.lock
@@ -0,0 +1,147 @@
+GIT
+ remote: git://github.com/stefl/padrino-sprockets.git
+ revision: 60751cc1244aa5dec010186123a5780351c23540
+ branch: master
+ specs:
+ padrino-sprockets (0.0.1)
+ sprockets
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.1.6)
+ activesupport (= 3.1.6)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activesupport (3.1.6)
+ multi_json (>= 1.0, < 1.3)
+ bson (1.6.4)
+ bson_ext (1.6.4)
+ bson (~> 1.6.4)
+ builder (3.0.0)
+ chunky_png (1.2.5)
+ compass (0.12.2.rc.0)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ dalli (2.0.5)
+ diff-lcs (1.1.3)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ fssm (0.2.9)
+ grit (2.4.1)
+ diff-lcs (~> 1.1)
+ mime-types (~> 1.15)
+ haml (3.1.6)
+ hike (1.2.1)
+ http_router (0.10.2)
+ rack (>= 1.0.0)
+ url_mount (~> 0.2.1)
+ i18n (0.6.0)
+ jsmin (1.0.1)
+ kgio (2.7.4)
+ libv8 (3.3.10.4)
+ mail (2.3.3)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.18)
+ mongo (1.6.2)
+ bson (~> 1.6.2)
+ mongoid (2.4.11)
+ activemodel (~> 3.1)
+ mongo (<= 1.6.2)
+ tzinfo (~> 0.3.22)
+ multi_json (1.2.0)
+ padrino (0.10.5)
+ padrino-admin (= 0.10.5)
+ padrino-cache (= 0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-gen (= 0.10.5)
+ padrino-helpers (= 0.10.5)
+ padrino-mailer (= 0.10.5)
+ padrino-admin (0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-helpers (= 0.10.5)
+ padrino-cache (0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-core (0.10.5)
+ activesupport (~> 3.1.0)
+ http_router (~> 0.10.2)
+ sinatra (~> 1.3.1)
+ thor (~> 0.14.3)
+ tilt (~> 1.3.0)
+ padrino-gen (0.10.5)
+ bundler (~> 1.0)
+ grit (~> 2.4.1)
+ padrino-core (= 0.10.5)
+ padrino-helpers (0.10.5)
+ i18n (~> 0.6)
+ padrino-core (= 0.10.5)
+ padrino-mailer (0.10.5)
+ mail (~> 2.3.0)
+ padrino-core (= 0.10.5)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ raindrops (0.9.0)
+ rake (0.9.2.2)
+ sass (3.2.0.alpha.244)
+ sass-on-heroku (0.9.0)
+ sassy-buttons (0.1.0)
+ compass (>= 0.12.1)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-flash (0.3.0)
+ sinatra (>= 1.0.0)
+ sprockets (2.3.0)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sprockets-sass (0.9.0)
+ sprockets (~> 2.0)
+ tilt (~> 1.1)
+ susy (1.0.rc.0)
+ compass (>= 0.12.2.rc.0)
+ sass (>= 3.2.0.alpha.237)
+ therubyracer (0.10.1)
+ libv8 (~> 3.3.10)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ unicorn (4.3.1)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
+ url_mount (0.2.1)
+ rack
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bson_ext
+ compass (= 0.12.2.rc.0)
+ dalli
+ execjs
+ haml
+ jsmin
+ mongoid
+ padrino (= 0.10.5)
+ padrino-sprockets!
+ rake
+ sass-on-heroku
+ sassy-buttons
+ sinatra-flash
+ sprockets (= 2.3.0)
+ sprockets-sass
+ susy (= 1.0.rc.0)
+ therubyracer
+ unicorn
2  Procfile
@@ -0,0 +1,2 @@
+web: bundle exec unicorn -p $PORT -c ./unicorn.rb
+worker: bundle exec rake resque:work QUEUE=web
2  Procfile.dev
@@ -0,0 +1,2 @@
+compass: bundle exec compass watch
+web: bundle exec unicorn -p 3333 -c ./unicorn.rb
19 app/app.rb
@@ -0,0 +1,19 @@
+class Bootbuckle < Padrino::Application
+ register Padrino::Rendering
+ register Padrino::Mailer
+ register Padrino::Helpers
+ register Padrino::Sprockets
+
+ sprockets :minify => (Padrino.env == :production)
+
+ enable :sessions
+
+ set :cache, Padrino::Cache::Store::Memcache.new(::Dalli::Client.new(ENV["MEMCACHE_SERVERS"] || '127.0.0.1:11211', :exception_retry_limit => 1))
+
+ set :google_analytics, "XXXXXXXX"
+ set :typekit, "ABC123"
+ set :title, "My new app"
+ set :base_host, "mynewapp.com"
+ set :description, "A new shiny thing, how exciting!"
+ set :mongo_datbase_name, "bootbuckle"
+end
0  app/assets/app.js
No changes.
7 app/assets/application.js
@@ -0,0 +1,7 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
9,266 app/assets/jquery.js
9,266 additions, 0 deletions not shown
4 app/assets/modernizr.js
@@ -0,0 +1,4 @@
+/* Modernizr 2.0.6 | MIT & BSD
+ * Contains: All core tests, html5shiv, yepnope, respond.js. Get your own custom build at www.modernizr.com/download/
+ */
+;window.Modernizr=function(a,b,c){function I(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=a[b]in l;return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function G(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return F(d,b)}function F(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b){return!!~(""+a).indexOf(b)}function D(a,b){return typeof a===b}function C(a,b){return B(o.join(a+";")+(b||""))}function B(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["&shy;","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;v("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y,z={}.hasOwnProperty,A;!D(z,c)&&!D(z.call,c)?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],c)};var H=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b].toLowerCase()+"IndexedDB"])return!0;return!!a.indexedDB},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){B("background-color:rgba(150,255,150,.5)");return E(k.backgroundColor,"rgba")},r.hsla=function(){B("background-color:hsla(120,40%,100%,.5)");return E(k.backgroundColor,"rgba")||E(k.backgroundColor,"hsla")},r.multiplebgs=function(){B("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},r.backgroundsize=function(){return G("backgroundSize")},r.borderimage=function(){return G("borderImage")},r.borderradius=function(){return G("borderRadius")},r.boxshadow=function(){return G("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){C("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return G("animationName")},r.csscolumns=function(){return G("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";B((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return E(k.backgroundImage,"gradient")},r.cssreflections=function(){return G("boxReflect")},r.csstransforms=function(){return!!F(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!F(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},r.csstransitions=function(){return G("transitionProperty")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var J in r)A(r,J)&&(y=J.toLowerCase(),e[y]=r[J](),u.push((e[y]?"":"no-")+y));e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.mq=w,e.hasEvent=x,e.testProp=function(a){return F([a])},e.testAllProps=G,e.testStyles=v,e.prefixed=function(a){return G(a,"pfx")},g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+u.join(" "):"");return e}(this,this.document),function(a,b){function u(){r(!0)}a.respond={},respond.update=function(){},respond.mediaQueriesSupported=b;if(!b){var c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=j.getElementsByTagName("link"),l=[],m=function(){var b=k,c=b.length,d=0,e,f,g,i;for(;d<c;d++)e=b[d],f=e.href,g=e.media,i=e.rel&&e.rel.toLowerCase()==="stylesheet",!!f&&i&&!h[f]&&(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(f)||f.replace(RegExp.$1,"").split("/")[0]===a.location.host?l.push({href:f,media:g}):h[f]=!0);n()},n=function(){if(l.length){var a=l.shift();s(a.href,function(b){o(b,a.href,a.media),h[a.href]=!0,n()})}},o=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),g=d&&d.length||0,b=b.substring(0,b.lastIndexOf("/")),h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c,j=0,k,l,m,n,o;b.length&&(b+="/"),i&&(g=1);for(;j<g;j++){k=0,i?(l=c,f.push(h(a))):(l=d[j].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),n=l.split(","),o=n.length;for(;k<o;k++)m=n[k],e.push({media:m.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:f.length-1,minw:m.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:m.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}r()},p,q,r=function(a){var b="clientWidth",h=d[b],l=c.compatMode==="CSS1Compat"&&h||c.body[b]||h,m={},n=c.createDocumentFragment(),o=k[k.length-1],s=(new Date).getTime();if(a&&p&&s-p<i)clearTimeout(q),q=setTimeout(r,i);else{p=s;for(var t in e){var u=e[t];if(!u.minw&&!u.maxw||(!u.minw||u.minw&&l>=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
6 app/controllers.rb
@@ -0,0 +1,6 @@
+Bootbuckle.controllers do
+ get :index, :map => "/" do
+ render :"pages/home"
+ end
+
+end
7 app/helpers.rb
@@ -0,0 +1,7 @@
+# Helper methods defined here can be accessed in any controller or view in the application
+
+Bootbuckle.helpers do
+ # def simple_helper_method
+ # ...
+ # end
+end
38 app/mailers.rb
@@ -0,0 +1,38 @@
+##
+# Mailer methods can be defined using the simple format:
+#
+# email :registration_email do |name, user|
+# from 'admin@site.com'
+# to user.email
+# subject 'Welcome to the site!'
+# locals :name => name
+# content_type 'text/html' # optional, defaults to plain/text
+# via :sendmail # optional, to smtp if defined, otherwise sendmail
+# render 'registration_email'
+# end
+#
+# You can set the default delivery settings from your app through:
+#
+# set :delivery_method, :smtp => {
+# :address => 'smtp.yourserver.com',
+# :port => '25',
+# :user_name => 'user',
+# :password => 'pass',
+# :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
+# :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
+# }
+#
+# or sendmail (default):
+#
+# set :delivery_method, :sendmail
+#
+# or for tests:
+#
+# set :delivery_method, :test
+#
+# and then all delivered mail will use these settings unless otherwise specified.
+#
+
+Bootbuckle.mailer :notifier do
+ # Message definitions here...
+end
36 app/stylesheets/application.scss
@@ -0,0 +1,36 @@
+@import "compass/reset";
+@import "compass/typography";
+@import "compass/css3";
+@import "compass/typography/vertical_rhythm";
+@import "compass/utilities/links/link-colors";
+
+$total-columns : 12; // a 12-column grid
+$column-width : 4em; // each column is 4em wide
+$gutter-width : 1em; // 1em gutters between columns
+$grid-padding : $gutter-width; // grid-padding equal to gutters
+
+$container-style: magic;
+$background-color: #f8faf4;
+$link-color: #8a4945;
+
+@import "susy";
+
+@include establish-baseline;
+
+body {
+ background-color: $background-color;
+ a {
+ @include link-colors($link-color, lighten($link-color,10), lighten($link-color,15), lighten($link-color,20), lighten($link-color,25));
+ }
+ h1 a {
+ text-decoration: none;
+ }
+ color: desaturate(darken($background-color,75),10);
+}
+
+h1 {
+ @include adjust-font-size-to($base-font-size * 2, $lines:2);
+ @include at-breakpoint(60em 12) {
+ @include adjust-font-size-to($base-font-size * 3, $lines:2);
+ }
+}
61 app/views/application.haml
@@ -0,0 +1,61 @@
+-# coding: utf-8
+!!! 5
+%html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
+ %head
+ %title
+ = @title + " | " if @title
+ = Bootbuckle.title
+ %meta{:charset => "utf-8"}/
+ %link{:rel => "canonical", :href => @canonical || "http://#{Bootbuckle.base_host}#{request.path}"}
+ %link{:rel => "shortcut icon", :href=>"/icons/icon57x57.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"57x57", :href=>"/icons/icon57x57.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"72x72", :href=>"/icons/icon72x72.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"114x114", :href=>"/icons/icon114x114.png"}/
+
+ %meta{:name => "keywords", :value => Bootbuckle.title}
+ %meta{:name => "description", :value => Bootbuckle.description}
+ %meta{:name => "MSSmartTagsPreventParsing", :content => "true"}/
+ %meta{:"http-equiv" => "X-UA-Compatible", :content => "chrome=1"}/
+ %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1;maximum-scale=1;minimum-scale=1;user-scalable=no;"}/
+ %meta{:name=>"apple-mobile-web-app-capable", :content=>"yes"}/
+ %meta{:name=>"apple-mobile-web-app-status-bar-style", :content=>"black"}/
+ %link{:href => "/stylesheets/application.css", :media => "screen, projection", :rel => "stylesheet", :type => "text/css"}/
+
+ = favicon_tag '/favicon.ico'
+ %script{:src=>"/assets/modernizr.js",:type=>"text/javascript"}
+
+ %script{:type=>"text/javascript", :src=>"http://use.typekit.com/#{Bootbuckle.typekit}.js"}
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+ <![endif]-->
+ - if Padrino.env == :production
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '#{Bootbuckle.google_analytics}']);
+ _gaq.push(['_setDomainName', '#{Bootbuckle.base_host}']);
+ _gaq.push(['_setAllowLinker', true]);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ %body{:id=>(request.path.split("/")[1] rescue "")}
+ .page
+ %header#header
+ %h1#logo
+ %a{:title=>Bootbuckle.title, :href=>"/"}= Bootbuckle.title
+ %h2
+ = Bootbuckle.description
+ %section.content
+ = yield
+
+ %footer
+
+ = yield_content :scripts
+
+ = "<!-- Rendered at #{Time.now} -->"
2  app/views/pages/home.haml
@@ -0,0 +1,2 @@
+%p
+ Welcome
16 config.rb
@@ -0,0 +1,16 @@
+# Require any additional compass plugins here.
+# Set this to the root of your project when deployed:
+require "susy"
+require 'sassy-buttons'
+
+http_path = "/"
+cache_dir = "tmp/sass-cache"
+css_dir = "public/stylesheets"
+sass_dir = "app/stylesheets"
+images_dir = "public/images"
+javascripts_dir = "public/javascripts"
+fonts_dir = "stylesheets/fonts"
+# To enable relative paths to assets via compass helper functions. Uncomment:
+relative_assets = true
+output_style = (environment == :production) ? :compressed : :expanded
+line_comments = false
9 config.ru
@@ -0,0 +1,9 @@
+#!/usr/bin/env rackup
+# encoding: utf-8
+
+# This file can be used to start Padrino,
+# just execute it from the command line.
+
+require File.expand_path("../config/boot.rb", __FILE__)
+
+run Padrino.application
34 config/apps.rb
@@ -0,0 +1,34 @@
+##
+# This file mounts each app in the Padrino project to a specified sub-uri.
+# You can mount additional applications using any of these commands below:
+#
+# Padrino.mount("blog").to('/blog')
+# Padrino.mount("blog", :app_class => "BlogApp").to('/blog')
+# Padrino.mount("blog", :app_file => "path/to/blog/app.rb").to('/blog')
+#
+# You can also map apps to a specified host:
+#
+# Padrino.mount("Admin").host("admin.example.org")
+# Padrino.mount("WebSite").host(/.*\.?example.org/)
+# Padrino.mount("Foo").to("/foo").host("bar.example.org")
+#
+# Note 1: Mounted apps (by default) should be placed into the project root at '/app_name'.
+# Note 2: If you use the host matching remember to respect the order of the rules.
+#
+# By default, this file mounts the primary app which was generated with this project.
+# However, the mounted app can be modified as needed:
+#
+# Padrino.mount("AppName", :app_file => "path/to/file", :app_class => "BlogApp").to('/')
+#
+
+##
+# Setup global project settings for your apps. These settings are inherited by every subapp. You can
+# override these settings in the subapps as needed.
+#
+Padrino.configure_apps do
+ # enable :sessions
+ set :session_secret, '5e3fe5d7c0607ed806c539d52c42d70d61efb202394a11d5cdb882cbd8fa345e'
+end
+
+# Mounts the core application for this project
+Padrino.mount("Bootbuckle").to('/')
29 config/boot.rb
@@ -0,0 +1,29 @@
+# Defines our constants
+PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
+PADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT)
+
+# Load our dependencies
+require 'rubygems' unless defined?(Gem)
+require 'bundler/setup'
+Bundler.require(:default, PADRINO_ENV)
+
+##
+# Enable devel logging
+#
+# Padrino::Logger::Config[:development] = { :log_level => :devel, :stream => :stdout }
+# Padrino::Logger.log_static = true
+#
+
+##
+# Add your before load hooks here
+#
+Padrino.before_load do
+end
+
+##
+# Add your after load hooks here
+#
+Padrino.after_load do
+end
+
+Padrino.load!
17 config/database.rb
@@ -0,0 +1,17 @@
+Mongoid.skip_version_check = true
+
+# Connection.new takes host, port
+port = Mongo::Connection::DEFAULT_PORT
+
+case Padrino.env
+ when :development then
+ raise "Please change the database name in app.rb" if Bootbuckle.mongo_database_name == "bootbuckle"
+ connection = Mongo::Connection.new("localhost", port, {:pool_timeout => 60, :pool_size => 5, :timeout => 10})
+ Mongoid.database = connection.db(Bootbuckle.mongo_database_name)
+ when :production then
+ uri = URI.parse(ENV['MONGOLAB_URI'])
+ connection = Mongo::Connection.from_uri(ENV['MONGOLAB_URI'], {:pool_timeout => 60, :pool_size => 5, :timeout => 10})
+ Mongoid.database = connection.db(uri.path.gsub(/^\//, ''))
+end
+
+MONGO_CONNECTION = connection
0  public/favicon.ico
No changes.
98 public/stylesheets/application.css
@@ -0,0 +1,98 @@
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font: inherit;
+ font-size: 100%;
+ vertical-align: baseline;
+}
+
+html {
+ line-height: 1;
+}
+
+ol, ul {
+ list-style: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+caption, th, td {
+ text-align: left;
+ font-weight: normal;
+ vertical-align: middle;
+}
+
+q, blockquote {
+ quotes: none;
+}
+q:before, q:after, blockquote:before, blockquote:after {
+ content: "";
+ content: none;
+}
+
+a img {
+ border: none;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
+ display: block;
+}
+
+* html {
+ font-size: 100%;
+}
+
+html {
+ font-size: 16px;
+ line-height: 1.5em;
+}
+
+body {
+ background-color: #f8faf4;
+ color: #3d4728;
+}
+body a {
+ color: #8a4945;
+}
+body a:visited {
+ color: #bc7d79;
+}
+body a:focus {
+ color: #c48d8a;
+}
+body a:hover {
+ color: #ab5c57;
+}
+body a:active {
+ color: #b36c68;
+}
+body h1 a {
+ text-decoration: none;
+}
+
+h1 {
+ font-size: 2em;
+ line-height: 1.5em;
+}
+@media (min-width: 60em) {
+ h1 {
+ font-size: 3em;
+ line-height: 1em;
+ }
+}
2  unicorn.rb
@@ -0,0 +1,2 @@
+worker_processes 2 # amount of unicorn workers to spin up
+timeout 30 # restarts workers that hang for 30 seconds
Please sign in to comment.
Something went wrong with that request. Please try again.