├── log └── .gitkeep ├── lib ├── tasks │ ├── .gitkeep │ └── test_tasks.rake ├── assets │ └── .gitkeep └── hackn │ └── github.rb ├── public ├── favicon.ico ├── robots.txt ├── 500.html ├── 422.html └── 404.html ├── spec ├── unit │ ├── .gitkeep │ ├── helpers │ │ └── .gitkeep │ ├── user_spec.rb │ ├── authorization_spec.rb │ └── question_spec.rb ├── fixtures │ ├── .gitkeep │ ├── authorizations.yml │ ├── users.yml │ └── questions.yml ├── functional │ ├── .gitkeep │ └── sessions_controller_spec.rb ├── integration │ └── .gitkeep ├── performance │ └── .gitkeep └── spec_helper.rb ├── app ├── helpers │ └── .gitkeep ├── mailers │ └── .gitkeep ├── models │ ├── .gitkeep │ ├── authorization.rb │ ├── user.rb │ └── question.rb ├── twitter-bootstrap-b261f97 │ ├── .travis.yml │ ├── docs │ │ ├── assets │ │ │ ├── img │ │ │ │ ├── bird.png │ │ │ │ ├── browsers.png │ │ │ │ ├── github-16px.png │ │ │ │ ├── icon-css3.png │ │ │ │ ├── icon-github.png │ │ │ │ ├── icon-html5.png │ │ │ │ ├── less-small.png │ │ │ │ ├── icon-twitter.png │ │ │ │ ├── grid-18px-masked.png │ │ │ │ ├── less-logo-large.png │ │ │ │ ├── example-sites │ │ │ │ │ ├── fleetio.png │ │ │ │ │ ├── jshint.png │ │ │ │ │ ├── kippt.png │ │ │ │ │ └── soundready.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── bootstrap-mdo-sfmoma-01.jpg │ │ │ │ ├── bootstrap-mdo-sfmoma-02.jpg │ │ │ │ ├── bootstrap-mdo-sfmoma-03.jpg │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── responsive-illustrations.png │ │ │ │ ├── examples │ │ │ │ │ ├── bootstrap-example-hero.jpg │ │ │ │ │ ├── bootstrap-example-fluid.jpg │ │ │ │ │ └── bootstrap-example-starter.jpg │ │ │ │ └── glyphicons │ │ │ │ │ ├── glyphicons_009_magic.png │ │ │ │ │ ├── glyphicons_042_group.png │ │ │ │ │ ├── glyphicons_079_podium.png │ │ │ │ │ ├── glyphicons_163_iphone.png │ │ │ │ │ ├── glyphicons_082_roundabout.png │ │ │ │ │ ├── glyphicons_266_book_open.png │ │ │ │ │ ├── glyphicons_214_resize_small.png │ │ │ │ │ └── glyphicons_155_show_thumbnails.png │ │ │ ├── ico │ │ │ │ ├── favicon.ico │ │ │ │ ├── apple-touch-icon-57-precomposed.png │ │ │ │ ├── apple-touch-icon-72-precomposed.png │ │ │ │ ├── apple-touch-icon-114-precomposed.png │ │ │ │ └── apple-touch-icon-144-precomposed.png │ │ │ └── js │ │ │ │ ├── google-code-prettify │ │ │ │ └── prettify.css │ │ │ │ ├── bootstrap-transition.js │ │ │ │ ├── bootstrap-alert.js │ │ │ │ ├── bootstrap-button.js │ │ │ │ ├── bootstrap-dropdown.js │ │ │ │ ├── bootstrap-popover.js │ │ │ │ └── README.md │ │ ├── build │ │ │ ├── package.json │ │ │ └── index.js │ │ ├── templates │ │ │ └── pages │ │ │ │ └── examples.mustache │ │ └── examples │ │ │ └── starter-template.html │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ ├── less │ │ ├── grid.less │ │ ├── utilities.less │ │ ├── component-animations.less │ │ ├── layouts.less │ │ ├── responsive-768px-979px.less │ │ ├── hero-unit.less │ │ ├── responsive-1200px-min.less │ │ ├── breadcrumbs.less │ │ ├── wells.less │ │ ├── scaffolding.less │ │ ├── close.less │ │ ├── pager.less │ │ ├── accordion.less │ │ ├── tests │ │ │ └── css-tests.css │ │ ├── tooltip.less │ │ ├── thumbnails.less │ │ ├── responsive.less │ │ ├── pagination.less │ │ ├── alerts.less │ │ ├── popovers.less │ │ ├── responsive-utilities.less │ │ ├── code.less │ │ ├── bootstrap.less │ │ ├── labels-badges.less │ │ ├── modals.less │ │ ├── carousel.less │ │ ├── progress-bars.less │ │ ├── reset.less │ │ ├── responsive-767px-max.less │ │ └── dropdowns.less │ ├── js │ │ ├── .jshintrc │ │ ├── tests │ │ │ ├── server.js │ │ │ ├── unit │ │ │ │ ├── bootstrap-transition.js │ │ │ │ ├── bootstrap-phantom.js │ │ │ │ ├── bootstrap-carousel.js │ │ │ │ ├── bootstrap-scrollspy.js │ │ │ │ ├── bootstrap-collapse.js │ │ │ │ ├── bootstrap-alert.js │ │ │ │ ├── bootstrap-tab.js │ │ │ │ ├── bootstrap-button.js │ │ │ │ ├── bootstrap-popover.js │ │ │ │ └── bootstrap-dropdown.js │ │ │ ├── index.html │ │ │ └── phantom.js │ │ ├── bootstrap-transition.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-dropdown.js │ │ └── bootstrap-popover.js │ ├── .gitignore │ └── package.json ├── assets │ ├── images │ │ ├── logo.png │ │ ├── madeby.png │ │ ├── paper.png │ │ ├── pawned.png │ │ ├── rails.png │ │ ├── wrong.png │ │ ├── rampage.png │ │ ├── screenbg.png │ │ ├── stripes.png │ │ ├── 9pixelments.png │ │ ├── background.png │ │ ├── logo_shine.png │ │ ├── monsterpawned.png │ │ └── paper-bottom.png │ ├── fonts │ │ ├── slkscr-webfont.eot │ │ ├── slkscr-webfont.ttf │ │ ├── slkscr-webfont.woff │ │ ├── slkscrb-webfont.eot │ │ ├── slkscrb-webfont.ttf │ │ ├── slkscre-webfont.eot │ │ ├── slkscre-webfont.ttf │ │ ├── slkscrb-webfont.woff │ │ ├── slkscre-webfont.woff │ │ ├── slkscreb-webfont.eot │ │ ├── slkscreb-webfont.ttf │ │ ├── slkscreb-webfont.woff │ │ ├── MyUnderwood-webfont.eot │ │ ├── MyUnderwood-webfont.ttf │ │ ├── MyUnderwood-webfont.woff │ │ ├── Kottke Silkscreen License.txt │ │ └── Tension Type Font License.txt │ ├── javascripts │ │ ├── bootstrap.js.coffee │ │ ├── application.js │ │ └── shinylogo.js │ └── stylesheets │ │ ├── underwood.css │ │ ├── application.css │ │ ├── bootstrap_and_overrides.css.less │ │ ├── scaffolds.css.scss │ │ └── slkscr.css ├── views │ ├── questions │ │ ├── new.html.erb │ │ ├── index.html.erb │ │ ├── show.html.erb │ │ └── _form.html.erb │ ├── sessions │ │ └── new.html.erb │ └── layouts │ │ └── application.html.erb └── controllers │ ├── application_controller.rb │ ├── sessions_controller.rb │ └── questions_controller.rb ├── vendor ├── plugins │ └── .gitkeep └── assets │ ├── javascripts │ └── .gitkeep │ └── stylesheets │ └── .gitkeep ├── coverage └── assets │ └── 0.5.3 │ ├── loading.gif │ ├── magnify.png │ ├── favicon_red.png │ ├── fancybox │ ├── blank.gif │ ├── fancybox.png │ ├── fancy_close.png │ ├── fancybox-x.png │ ├── fancybox-y.png │ ├── fancy_loading.png │ ├── fancy_nav_left.png │ ├── fancy_nav_right.png │ ├── fancy_shadow_e.png │ ├── fancy_shadow_n.png │ ├── fancy_shadow_ne.png │ ├── fancy_shadow_nw.png │ ├── fancy_shadow_s.png │ ├── fancy_shadow_se.png │ ├── fancy_shadow_sw.png │ ├── fancy_shadow_w.png │ ├── fancy_title_left.png │ ├── fancy_title_main.png │ ├── fancy_title_over.png │ └── fancy_title_right.png │ ├── favicon_green.png │ ├── favicon_yellow.png │ ├── smoothness │ └── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── highlight.css │ └── app.js ├── config ├── initializers │ ├── omniauth.rb │ ├── mime_types.rb │ ├── backtrace_silencers.rb │ ├── session_store.rb │ ├── secret_token.rb │ ├── wrap_parameters.rb │ └── inflections.rb ├── environment.rb ├── boot.rb ├── locales │ └── en.yml ├── database.yml ├── environments │ ├── development.rb.example │ ├── test.rb │ ├── production.rb.example │ └── production.rb ├── routes.rb └── application.rb ├── config.ru ├── db ├── migrate │ ├── 20120428102224_create_users.rb │ ├── 20120428111947_add_admin_attribute_to_user.rb │ ├── 20120428164303_add_token_and_e_mail_and_name_to_the_model.rb │ ├── 20120428102249_create_authorizations.rb │ └── 20120428094900_create_questions.rb ├── seeds.rb └── schema.rb ├── doc └── README_FOR_APP ├── Rakefile ├── script └── rails ├── .gitignore ├── README.rdoc └── Gemfile /log/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/mailers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/functional/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/performance/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/unit/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 -------------------------------------------------------------------------------- /spec/unit/user_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe User do 4 | end -------------------------------------------------------------------------------- /spec/unit/authorization_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Authorization do 4 | end -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/images/madeby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/madeby.png -------------------------------------------------------------------------------- /app/assets/images/paper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/paper.png -------------------------------------------------------------------------------- /app/assets/images/pawned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/pawned.png -------------------------------------------------------------------------------- /app/assets/images/rails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/rails.png -------------------------------------------------------------------------------- /app/assets/images/wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/wrong.png -------------------------------------------------------------------------------- /app/assets/images/rampage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/rampage.png -------------------------------------------------------------------------------- /app/assets/images/screenbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/screenbg.png -------------------------------------------------------------------------------- /app/assets/images/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/stripes.png -------------------------------------------------------------------------------- /app/assets/images/9pixelments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/9pixelments.png -------------------------------------------------------------------------------- /app/assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/background.png -------------------------------------------------------------------------------- /app/assets/images/logo_shine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/logo_shine.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/loading.gif -------------------------------------------------------------------------------- /coverage/assets/0.5.3/magnify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/magnify.png -------------------------------------------------------------------------------- /app/assets/fonts/slkscr-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscr-webfont.eot -------------------------------------------------------------------------------- /app/assets/fonts/slkscr-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscr-webfont.ttf -------------------------------------------------------------------------------- /app/assets/fonts/slkscr-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscr-webfont.woff -------------------------------------------------------------------------------- /app/assets/fonts/slkscrb-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscrb-webfont.eot -------------------------------------------------------------------------------- /app/assets/fonts/slkscrb-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscrb-webfont.ttf -------------------------------------------------------------------------------- /app/assets/fonts/slkscre-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscre-webfont.eot -------------------------------------------------------------------------------- /app/assets/fonts/slkscre-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscre-webfont.ttf -------------------------------------------------------------------------------- /app/assets/images/monsterpawned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/monsterpawned.png -------------------------------------------------------------------------------- /app/assets/images/paper-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/images/paper-bottom.png -------------------------------------------------------------------------------- /app/assets/fonts/slkscrb-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscrb-webfont.woff -------------------------------------------------------------------------------- /app/assets/fonts/slkscre-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscre-webfont.woff -------------------------------------------------------------------------------- /app/assets/fonts/slkscreb-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscreb-webfont.eot -------------------------------------------------------------------------------- /app/assets/fonts/slkscreb-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscreb-webfont.ttf -------------------------------------------------------------------------------- /app/assets/fonts/slkscreb-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/slkscreb-webfont.woff -------------------------------------------------------------------------------- /coverage/assets/0.5.3/favicon_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/favicon_red.png -------------------------------------------------------------------------------- /app/assets/fonts/MyUnderwood-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/MyUnderwood-webfont.eot -------------------------------------------------------------------------------- /app/assets/fonts/MyUnderwood-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/MyUnderwood-webfont.ttf -------------------------------------------------------------------------------- /app/assets/fonts/MyUnderwood-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/assets/fonts/MyUnderwood-webfont.woff -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/blank.gif -------------------------------------------------------------------------------- /coverage/assets/0.5.3/favicon_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/favicon_green.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/favicon_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/favicon_yellow.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancybox.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_close.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancybox-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancybox-x.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancybox-y.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancybox-y.png -------------------------------------------------------------------------------- /app/assets/javascripts/bootstrap.js.coffee: -------------------------------------------------------------------------------- 1 | jQuery -> 2 | $("a[rel=popover]").popover() 3 | $(".tooltip").tooltip() 4 | $("a[rel=tooltip]").tooltip() -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_loading.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_nav_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_nav_left.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_nav_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_nav_right.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_e.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_n.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_s.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_se.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_shadow_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_shadow_w.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_title_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_title_left.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_title_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_title_main.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_title_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_title_over.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/fancybox/fancy_title_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/fancybox/fancy_title_right.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/bird.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/browsers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/browsers.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/github-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/github-16px.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/icon-css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/icon-css3.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/icon-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/icon-github.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/icon-html5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/icon-html5.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/less-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/less-small.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/icon-twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/icon-twitter.png -------------------------------------------------------------------------------- /config/initializers/omniauth.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.middleware.use OmniAuth::Builder do 2 | provider :github, ENV["GITHUB_KEY"], ENV["GITHUB_SECRET"], :scope => "repo" 3 | end -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/grid-18px-masked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/grid-18px-masked.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/less-logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/less-logo-large.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/fleetio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/fleetio.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/jshint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/jshint.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/kippt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/kippt.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run NerdpursuitFrontend::Application 5 | -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg -------------------------------------------------------------------------------- /app/models/authorization.rb: -------------------------------------------------------------------------------- 1 | class Authorization < ActiveRecord::Base 2 | attr_accessible :provider, :uid, :user_id, :token 3 | 4 | belongs_to :user 5 | validates_presence_of :provider, :uid 6 | end 7 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/soundready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/example-sites/soundready.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/responsive-illustrations.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/less/grid.less: -------------------------------------------------------------------------------- 1 | // Fixed (940px) 2 | #grid > .core(@gridColumnWidth, @gridGutterWidth); 3 | 4 | // Fluid (940px) 5 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the rails application 2 | require File.expand_path('../application', __FILE__) 3 | 4 | # Initialize the rails application 5 | NerdpursuitFrontend::Application.initialize! 6 | -------------------------------------------------------------------------------- /app/models/user.rb: -------------------------------------------------------------------------------- 1 | class User < ActiveRecord::Base 2 | attr_accessible :name, :login, :email 3 | 4 | has_many :authorizations 5 | validates_presence_of :name 6 | has_many :questions 7 | 8 | end 9 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-57-precomposed.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-72-precomposed.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-hero.jpg -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_009_magic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_009_magic.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_042_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_042_group.png -------------------------------------------------------------------------------- /coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-114-precomposed.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-fluid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-fluid.jpg -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_079_podium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_079_podium.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_163_iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_163_iphone.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/build/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-doc-builder" 3 | , "version": "0.0.1" 4 | , "description": "build bootstrap docs" 5 | , "dependencies": { "hogan.js": "1.0.5-dev" } 6 | } 7 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-starter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/examples/bootstrap-example-starter.jpg -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_082_roundabout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_082_roundabout.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_266_book_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_266_book_open.png -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_214_resize_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_214_resize_small.png -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | 3 | # Set up gems listed in the Gemfile. 4 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 5 | 6 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) 7 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nerds/questionizer/master/app/twitter-bootstrap-b261f97/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png -------------------------------------------------------------------------------- /db/migrate/20120428102224_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration 2 | def change 3 | create_table :users do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | en: 5 | hello: "Hello world" 6 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "validthis": true, 3 | "laxcomma" : true, 4 | "laxbreak" : true, 5 | "browser" : true, 6 | "debug" : true, 7 | "boss" : true, 8 | "expr" : true, 9 | "asi" : true 10 | } -------------------------------------------------------------------------------- /spec/fixtures/authorizations.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html 2 | 3 | one: 4 | provider: MyString 5 | uid: MyString 6 | user_id: 1 7 | 8 | two: 9 | provider: MyString 10 | uid: MyString 11 | user_id: 1 12 | -------------------------------------------------------------------------------- /db/migrate/20120428111947_add_admin_attribute_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddAdminAttributeToUser < ActiveRecord::Migration 2 | def change 3 | add_column :users, :admin, :boolean 4 | add_column :questions, :accepted_at, :datetime 5 | add_column :questions, :rejected_at, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20120428164303_add_token_and_e_mail_and_name_to_the_model.rb: -------------------------------------------------------------------------------- 1 | class AddTokenAndEMailAndNameToTheModel < ActiveRecord::Migration 2 | def change 3 | add_column :users, :login, :string 4 | add_column :users, :email, :string 5 | add_column :authorizations, :token, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env rake 2 | # Add your own tasks in files placed in lib/tasks ending in .rake, 3 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 4 | 5 | require File.expand_path('../config/application', __FILE__) 6 | 7 | NerdpursuitFrontend::Application.load_tasks 8 | -------------------------------------------------------------------------------- /db/migrate/20120428102249_create_authorizations.rb: -------------------------------------------------------------------------------- 1 | class CreateAuthorizations < ActiveRecord::Migration 2 | def change 3 | create_table :authorizations do |t| 4 | t.string :provider 5 | t.string :uid 6 | t.integer :user_id 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /script/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. 3 | 4 | APP_PATH = File.expand_path('../../config/application', __FILE__) 5 | require File.expand_path('../../config/boot', __FILE__) 6 | require 'rails/commands' 7 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/less/utilities.less: -------------------------------------------------------------------------------- 1 | // UTILITY CLASSES 2 | // --------------- 3 | 4 | // Quick floats 5 | .pull-right { 6 | float: right; 7 | } 8 | .pull-left { 9 | float: left; 10 | } 11 | 12 | // Toggling content 13 | .hide { 14 | display: none; 15 | } 16 | .show { 17 | display: block; 18 | } 19 | 20 | // Visibility 21 | .invisible { 22 | visibility: hidden; 23 | } 24 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // COMPONENT ANIMATIONS 2 | // -------------------- 3 | 4 | .fade { 5 | .opacity(0); 6 | .transition(opacity .15s linear); 7 | &.in { 8 | .opacity(100); 9 | } 10 | } 11 | 12 | .collapse { 13 | position: relative; 14 | height: 0; 15 | overflow: hidden; 16 | .transition(height .35s ease); 17 | &.in { 18 | height: auto; 19 | } 20 | } -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/js/tests/server.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Simple connect server for phantom.js 3 | * Adapted from Modernizr 4 | */ 5 | 6 | var connect = require('connect') 7 | , http = require('http') 8 | , fs = require('fs') 9 | , app = connect() 10 | .use(connect.static(__dirname + '/../../')); 11 | 12 | http.createServer(app).listen(3000); 13 | 14 | fs.writeFileSync(__dirname + '/pid.txt', process.pid, 'utf-8') -------------------------------------------------------------------------------- /spec/unit/question_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe Question do 4 | 5 | describe "update_file_and_commit" do 6 | 7 | it "should do whatever it should do" 8 | 9 | end 10 | 11 | describe "formatted_created_at" do 12 | 13 | it "should return the formatted created at timestamp" 14 | end 15 | 16 | describe "to_json" do 17 | 18 | it "should return the custom json representation" 19 | 20 | end 21 | end -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-transition") 4 | 5 | test("should be defined on jquery support object", function () { 6 | ok($.support.transition !== undefined, 'transition object is defined') 7 | }) 8 | 9 | test("should provide an end object", function () { 10 | ok($.support.transition ? $.support.transition.end : true, 'end string is defined') 11 | }) 12 | 13 | }) -------------------------------------------------------------------------------- /app/twitter-bootstrap-b261f97/less/layouts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // Fixed-width and fluid (with sidebar) layouts 4 | // -------------------------------------------- 5 | 6 | 7 | // Container (centered, fixed-width layouts) 8 | .container { 9 | .container-fixed(); 10 | } 11 | 12 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 13 | .container-fluid { 14 | padding-right: @gridGutterWidth; 15 | padding-left: @gridGutterWidth; 16 | .clearfix(); 17 | } -------------------------------------------------------------------------------- /app/views/questions/new.html.erb: -------------------------------------------------------------------------------- 1 |
Maybe you tried to change something you didn't have access to.
24 |You may have mistyped the address or the page may have moved.
24 |<%= notice %>
14 | <%= yield %> 15 | and elements
3 | // --------------------------------------------------------
4 |
5 | // Inline and block code styles
6 | code,
7 | pre {
8 | padding: 0 3px 2px;
9 | #font > #family > .monospace;
10 | font-size: @baseFontSize - 1;
11 | color: @grayDark;
12 | .border-radius(3px);
13 | }
14 |
15 | // Inline code
16 | code {
17 | padding: 2px 4px;
18 | color: #d14;
19 | background-color: #f7f7f9;
20 | border: 1px solid #e1e1e8;
21 | }
22 |
23 | // Blocks of code
24 | pre {
25 | display: block;
26 | padding: (@baseLineHeight - 1) / 2;
27 | margin: 0 0 @baseLineHeight / 2;
28 | font-size: @baseFontSize * .925; // 13px to 12px
29 | line-height: @baseLineHeight;
30 | word-break: break-all;
31 | word-wrap: break-word;
32 | white-space: pre;
33 | white-space: pre-wrap;
34 | background-color: #f5f5f5;
35 | border: 1px solid #ccc; // fallback for IE7-8
36 | border: 1px solid rgba(0,0,0,.15);
37 | .border-radius(4px);
38 |
39 | // Make prettyprint styles more spaced out for readability
40 | &.prettyprint {
41 | margin-bottom: @baseLineHeight;
42 | }
43 |
44 | // Account for some code outputs that place code tags in pre tags
45 | code {
46 | padding: 0;
47 | color: inherit;
48 | background-color: transparent;
49 | border: 0;
50 | }
51 | }
52 |
53 | // Enable scrollable blocks of code
54 | .pre-scrollable {
55 | max-height: 340px;
56 | overflow-y: scroll;
57 | }
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/templates/pages/examples.mustache:
--------------------------------------------------------------------------------
1 |
3 |
4 | {{_i}}Bootstrap examples{{/i}}
5 | {{_i}}We've included a few basic examples as starting points for your work with Bootstrap. We encourage folks to iterate on these examples and not simply use them as an end result.{{/i}}
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 | {{_i}}Basic marketing site{{/i}}
15 | {{_i}}Featuring a hero unit for a primary message and three supporting elements.{{/i}}
16 |
17 | -
18 |
19 |
20 |
21 | {{_i}}Fluid layout{{/i}}
22 | {{_i}}Uses our new responsive, fluid grid system to create a seamless liquid layout.{{/i}}
23 |
24 | -
25 |
26 |
27 |
28 | {{_i}}Starter template{{/i}}
29 | {{_i}}A barebones HTML document with all the Bootstrap CSS and javascript included.{{/i}}
30 |
31 |
32 |
--------------------------------------------------------------------------------
/config/environments/development.rb.example:
--------------------------------------------------------------------------------
1 | NerdpursuitFrontend::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Log error messages when you accidentally call methods on nil.
10 | config.whiny_nils = true
11 |
12 | # Show full error reports and disable caching
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger
20 | config.active_support.deprecation = :log
21 |
22 | # Only use best-standards-support built into browsers
23 | config.action_dispatch.best_standards_support = :builtin
24 |
25 | # Raise exception on mass assignment protection for Active Record models
26 | config.active_record.mass_assignment_sanitizer = :strict
27 |
28 | # Log the query plan for queries taking more than this (works
29 | # with SQLite, MySQL, and PostgreSQL)
30 | config.active_record.auto_explain_threshold_in_seconds = 0.5
31 |
32 | # Do not compress assets
33 | config.assets.compress = false
34 |
35 | # Expands the lines which load the assets
36 | config.assets.debug = true
37 |
38 | config.github_base_uri = "my nerd pursuit repo"
39 | config.github_key = 'my key'
40 | config.github_secret = 'my secret'
41 | end
42 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | NerdpursuitFrontend::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Configure static asset server for tests with Cache-Control for performance
11 | config.serve_static_assets = true
12 | config.static_cache_control = "public, max-age=3600"
13 |
14 | # Log error messages when you accidentally call methods on nil
15 | config.whiny_nils = true
16 |
17 | # Show full error reports and disable caching
18 | config.consider_all_requests_local = true
19 | config.action_controller.perform_caching = false
20 |
21 | # Raise exceptions instead of rendering exception templates
22 | config.action_dispatch.show_exceptions = false
23 |
24 | # Disable request forgery protection in test environment
25 | config.action_controller.allow_forgery_protection = false
26 |
27 | # Tell Action Mailer not to deliver emails to the real world.
28 | # The :test delivery method accumulates sent emails in the
29 | # ActionMailer::Base.deliveries array.
30 | config.action_mailer.delivery_method = :test
31 |
32 | # Raise exception on mass assignment protection for Active Record models
33 | config.active_record.mass_assignment_sanitizer = :strict
34 |
35 | # Print deprecation notices to the stderr
36 | config.active_support.deprecation = :stderr
37 | end
38 |
--------------------------------------------------------------------------------
/app/views/questions/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Questionizer
7 |
8 | Category
9 | Sub Category
10 | User
11 | Status
12 | Actions
13 | <% @questions.each do |question| %>
14 |
15 | <%= question.category %>,
16 | <%= question.sub_category %> by
17 | <%= question.user.name || question.user.login %>
18 |
19 | <% if question.accepted_at? %>
20 | Accepted at <%= question.accepted_at %>
21 | <% elsif question.rejected_at? %>
22 | Rejected at <%= question.rejected_at %>
23 | <% else %>
24 | <%= button_to "Accept", { :action => "accept", :id => question.id }, :method => :put, :class => "btn btn-primary" %><%= button_to "Reject", { :action => "reject", :id => question.id }, :method => :put, :class => "btn btn-primary" %>
25 | <% end %>
26 |
27 | <%= link_to "Show", question_path(question), :class=> 'btn' %>
28 |
29 | <% end %>
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/bootstrap.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v2.0.3
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */
10 |
11 | // CSS Reset
12 | @import "reset.less";
13 |
14 | // Core variables and mixins
15 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc
16 | @import "mixins.less";
17 |
18 | // Grid system and page structure
19 | @import "scaffolding.less";
20 | @import "grid.less";
21 | @import "layouts.less";
22 |
23 | // Base CSS
24 | @import "type.less";
25 | @import "code.less";
26 | @import "forms.less";
27 | @import "tables.less";
28 |
29 | // Components: common
30 | @import "sprites.less";
31 | @import "dropdowns.less";
32 | @import "wells.less";
33 | @import "component-animations.less";
34 | @import "close.less";
35 |
36 | // Components: Buttons & Alerts
37 | @import "buttons.less";
38 | @import "button-groups.less";
39 | @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
40 |
41 | // Components: Nav
42 | @import "navs.less";
43 | @import "navbar.less";
44 | @import "breadcrumbs.less";
45 | @import "pagination.less";
46 | @import "pager.less";
47 |
48 | // Components: Popovers
49 | @import "modals.less";
50 | @import "tooltip.less";
51 | @import "popovers.less";
52 |
53 | // Components: Misc
54 | @import "thumbnails.less";
55 | @import "labels-badges.less";
56 | @import "progress-bars.less";
57 | @import "accordion.less";
58 | @import "carousel.less";
59 | @import "hero-unit.less";
60 |
61 | // Utility classes
62 | @import "utilities.less"; // Has to be last to override when necessary
63 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/labels-badges.less:
--------------------------------------------------------------------------------
1 | // LABELS & BADGES
2 | // ---------------
3 |
4 | // Base classes
5 | .label,
6 | .badge {
7 | font-size: @baseFontSize * .846;
8 | font-weight: bold;
9 | line-height: 14px; // ensure proper line-height if floated
10 | color: @white;
11 | vertical-align: baseline;
12 | white-space: nowrap;
13 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
14 | background-color: @grayLight;
15 | }
16 | // Set unique padding and border-radii
17 | .label {
18 | padding: 1px 4px 2px;
19 | .border-radius(3px);
20 | }
21 | .badge {
22 | padding: 1px 9px 2px;
23 | .border-radius(9px);
24 | }
25 |
26 | // Hover state, but only for links
27 | a {
28 | &.label:hover,
29 | &.badge:hover {
30 | color: @white;
31 | text-decoration: none;
32 | cursor: pointer;
33 | }
34 | }
35 |
36 | // Colors
37 | // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
38 | .label,
39 | .badge {
40 | // Important (red)
41 | &-important { background-color: @errorText; }
42 | &-important[href] { background-color: darken(@errorText, 10%); }
43 | // Warnings (orange)
44 | &-warning { background-color: @orange; }
45 | &-warning[href] { background-color: darken(@orange, 10%); }
46 | // Success (green)
47 | &-success { background-color: @successText; }
48 | &-success[href] { background-color: darken(@successText, 10%); }
49 | // Info (turquoise)
50 | &-info { background-color: @infoText; }
51 | &-info[href] { background-color: darken(@infoText, 10%); }
52 | // Inverse (black)
53 | &-inverse { background-color: @grayDark; }
54 | &-inverse[href] { background-color: darken(@grayDark, 10%); }
55 | }
56 |
--------------------------------------------------------------------------------
/app/controllers/questions_controller.rb:
--------------------------------------------------------------------------------
1 | class QuestionsController < ApplicationController
2 |
3 | before_filter :user_required
4 | before_filter :admin_required, :only => [:index, :show, :accept, :reject]
5 |
6 | def index
7 | @questions = Question.all
8 | end
9 |
10 | def show
11 | @question = Question.find(params[:id])
12 | end
13 |
14 | def accept
15 | @question = Question.find(params[:id])
16 | if @question && @question.update_attribute(:accepted_at, Time.now)
17 | @question.update_attribute(:rejected_at, nil)
18 | # send message to user
19 | @question.update_file_and_commit("#{@question.text.truncate(40).parameterize}.json", @question.to_json, "Added a #{@question.category.upcase} question about #{@question.sub_category.upcase}. NERD LEVEL #{@question.nerd_level}")
20 | redirect_to questions_url, notice: 'Question was successfully accepted.'
21 | else
22 | redirect_to questions_url, notice: 'Question was NOT successfully accepted.'
23 | end
24 | end
25 |
26 | def reject
27 | @question = Question.find(params[:id])
28 | if @question && @question.update_attribute(:rejected_at, Time.now)
29 | @question.update_attribute(:accepted_at, nil)
30 | # send message to user
31 | redirect_to questions_url, notice: 'Question was successfully rejected.'
32 | else
33 | redirect_to questions_url, notice: 'Question was NOT successfully rejected.'
34 | end
35 | end
36 |
37 | def new
38 | @question = current_user.questions.build
39 | end
40 |
41 | def create
42 | @question = current_user.questions.build(params[:question])
43 | respond_to do |format|
44 | if @question.save
45 | format.html { redirect_to root_url, notice: 'Question was successfully created.' }
46 | else
47 | format.html { render action: "new" }
48 | end
49 | end
50 | end
51 |
52 | end
53 |
--------------------------------------------------------------------------------
/app/assets/javascripts/shinylogo.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | $(window).load(function() {
3 | var canvas, context, cvShine, dataLogo, dataNext, eLogo, eShine, height, redraw, sHeight, sWidth, shine, width;
4 | canvas = $('canvas#shinylogo');
5 | context = canvas.get(0).getContext('2d');
6 | cvShine = $('canvas#canvas-shine');
7 | shine = cvShine.get(0).getContext('2d');
8 | eLogo = $('img#logo').get(0);
9 | eShine = $('img#logo-shine').get(0);
10 | width = eLogo.width;
11 | height = eLogo.height;
12 | sWidth = eShine.width;
13 | sHeight = eShine.height;
14 | context.drawImage(eLogo, 0, 0, width, height);
15 | dataLogo = context.getImageData(0, 0, width, height);
16 | dataNext = context.getImageData(0, 0, width, height);
17 | shine.translate(sWidth / 2, sHeight / 2);
18 | redraw = function() {
19 | var dataShine, h, i, offset, pixelPosition, shinePosition, w;
20 | shine.clearRect(-sWidth / 2, -sHeight / 2, sWidth, sHeight);
21 | shine.rotate(0.02);
22 | shine.drawImage(eShine, -sWidth / 2, -sHeight / 2, sWidth, sHeight);
23 | dataShine = shine.getImageData(0, 0, sWidth, sHeight);
24 | offset = ((sWidth / 2 - width / 2) + (sHeight / 2 - height / 2 - 20) * sWidth) * 4;
25 | for (w = 0; 0 <= width ? w <= width : w >= width; 0 <= width ? w++ : w--) {
26 | for (h = 0; 0 <= height ? h <= height : h >= height; 0 <= height ? h++ : h--) {
27 | pixelPosition = (h * width + w) * 4;
28 | shinePosition = offset + (h * sWidth + w) * 4;
29 | for (i = 0; i <= 2; i++) {
30 | dataNext.data[pixelPosition + i] = dataLogo.data[pixelPosition + i] + dataShine.data[shinePosition + 3] * 0.3;
31 | }
32 | }
33 | }
34 | return context.putImageData(dataNext, 0, 0);
35 | };
36 | return window.setInterval(function() {
37 | return redraw();
38 | }, 66);
39 | });
40 | }).call(this);
41 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/slkscr.css:
--------------------------------------------------------------------------------
1 | /* Generated by Font Squirrel (http://www.fontsquirrel.com) on January 14, 2012 09:43:28 AM America/New_York */
2 |
3 |
4 |
5 | @font-face {
6 | font-family: 'SilkscreenNormal';
7 | src: url('slkscr-webfont.eot');
8 | src: url('slkscr-webfont.eot?#iefix') format('embedded-opentype'),
9 | url('slkscr-webfont.woff') format('woff'),
10 | url('slkscr-webfont.ttf') format('truetype'),
11 | url('slkscr-webfont.svg#SilkscreenNormal') format('svg');
12 | font-weight: normal;
13 | font-style: normal;
14 |
15 | }
16 |
17 | @font-face {
18 | font-family: 'SilkscreenBold';
19 | src: url('slkscrb-webfont.eot');
20 | src: url('slkscrb-webfont.eot?#iefix') format('embedded-opentype'),
21 | url('slkscrb-webfont.woff') format('woff'),
22 | url('slkscrb-webfont.ttf') format('truetype'),
23 | url('slkscrb-webfont.svg#SilkscreenBold') format('svg');
24 | font-weight: normal;
25 | font-style: normal;
26 |
27 | }
28 |
29 | @font-face {
30 | font-family: 'SilkscreenExpandedNormal';
31 | src: url('slkscre-webfont.eot');
32 | src: url('slkscre-webfont.eot?#iefix') format('embedded-opentype'),
33 | url('slkscre-webfont.woff') format('woff'),
34 | url('slkscre-webfont.ttf') format('truetype'),
35 | url('slkscre-webfont.svg#SilkscreenExpandedNormal') format('svg');
36 | font-weight: normal;
37 | font-style: normal;
38 |
39 | }
40 |
41 | @font-face {
42 | font-family: 'SilkscreenExpandedBold';
43 | src: url('slkscreb-webfont.eot');
44 | src: url('slkscreb-webfont.eot?#iefix') format('embedded-opentype'),
45 | url('slkscreb-webfont.woff') format('woff'),
46 | url('slkscreb-webfont.ttf') format('truetype'),
47 | url('slkscreb-webfont.svg#SilkscreenExpandedBold') format('svg');
48 | font-weight: normal;
49 | font-style: normal;
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-collapse.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-collapse")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).collapse, 'collapse method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).collapse()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should show a collapsed element", function () {
14 | var el = $('').collapse('show')
15 | ok(el.hasClass('in'), 'has class in')
16 | ok(/height/.test(el.attr('style')), 'has height set')
17 | })
18 |
19 | test("should hide a collapsed element", function () {
20 | var el = $('').collapse('hide')
21 | ok(!el.hasClass('in'), 'does not have class in')
22 | ok(/height/.test(el.attr('style')), 'has height set')
23 | })
24 |
25 | test("should not fire shown when show is prevented", function () {
26 | $.support.transition = false
27 | stop();
28 | $('')
29 | .bind('show', function (e) {
30 | e.preventDefault();
31 | ok(true);
32 | start();
33 | })
34 | .bind('shown', function () {
35 | ok(false);
36 | })
37 | .collapse('show')
38 | })
39 |
40 | test("should reset style to auto after finishing opening collapse", function () {
41 | $.support.transition = false
42 | stop();
43 | $('')
44 | .bind('show', function () {
45 | ok(this.style.height == '0px')
46 | })
47 | .bind('shown', function () {
48 | ok(this.style.height == 'auto')
49 | start()
50 | })
51 | .collapse('show')
52 | })
53 |
54 | })
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended to check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(:version => 20120428164303) do
15 |
16 | create_table "authorizations", :force => true do |t|
17 | t.string "provider"
18 | t.string "uid"
19 | t.integer "user_id"
20 | t.datetime "created_at", :null => false
21 | t.datetime "updated_at", :null => false
22 | t.string "token"
23 | end
24 |
25 | create_table "questions", :force => true do |t|
26 | t.string "category"
27 | t.string "sub_category"
28 | t.integer "nerd_level"
29 | t.string "text"
30 | t.string "a1"
31 | t.string "a2"
32 | t.string "a3"
33 | t.string "a4"
34 | t.string "right_answer"
35 | t.string "creator"
36 | t.string "creator_twitter"
37 | t.string "creator_github"
38 | t.integer "user_id"
39 | t.datetime "created_at", :null => false
40 | t.datetime "updated_at", :null => false
41 | t.datetime "accepted_at"
42 | t.datetime "rejected_at"
43 | end
44 |
45 | create_table "users", :force => true do |t|
46 | t.string "name"
47 | t.datetime "created_at", :null => false
48 | t.datetime "updated_at", :null => false
49 | t.boolean "admin"
50 | t.string "login"
51 | t.string "email"
52 | end
53 |
54 | end
55 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/bootstrap-transition.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | $(function () {
24 |
25 | "use strict"; // jshint ;_;
26 |
27 |
28 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29 | * ======================================================= */
30 |
31 | $.support.transition = (function () {
32 |
33 | var transitionEnd = (function () {
34 |
35 | var el = document.createElement('bootstrap')
36 | , transEndEventNames = {
37 | 'WebkitTransition' : 'webkitTransitionEnd'
38 | , 'MozTransition' : 'transitionend'
39 | , 'OTransition' : 'oTransitionEnd'
40 | , 'msTransition' : 'MSTransitionEnd'
41 | , 'transition' : 'transitionend'
42 | }
43 | , name
44 |
45 | for (name in transEndEventNames){
46 | if (el.style[name] !== undefined) {
47 | return transEndEventNames[name]
48 | }
49 | }
50 |
51 | }())
52 |
53 | return transitionEnd && {
54 | end: transitionEnd
55 | }
56 |
57 | })()
58 |
59 | })
60 |
61 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/bootstrap-transition.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | $(function () {
24 |
25 | "use strict"; // jshint ;_;
26 |
27 |
28 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29 | * ======================================================= */
30 |
31 | $.support.transition = (function () {
32 |
33 | var transitionEnd = (function () {
34 |
35 | var el = document.createElement('bootstrap')
36 | , transEndEventNames = {
37 | 'WebkitTransition' : 'webkitTransitionEnd'
38 | , 'MozTransition' : 'transitionend'
39 | , 'OTransition' : 'oTransitionEnd'
40 | , 'msTransition' : 'MSTransitionEnd'
41 | , 'transition' : 'transitionend'
42 | }
43 | , name
44 |
45 | for (name in transEndEventNames){
46 | if (el.style[name] !== undefined) {
47 | return transEndEventNames[name]
48 | }
49 | }
50 |
51 | }())
52 |
53 | return transitionEnd && {
54 | end: transitionEnd
55 | }
56 |
57 | })()
58 |
59 | })
60 |
61 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-alerts")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).alert, 'alert method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).alert()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should fade element out on clicking .close", function () {
14 | var alertHTML = ''
18 | , alert = $(alertHTML).alert()
19 |
20 | alert.find('.close').click()
21 |
22 | ok(!alert.hasClass('in'), 'remove .in class on .close click')
23 | })
24 |
25 | test("should remove element when clicking .close", function () {
26 | $.support.transition = false
27 |
28 | var alertHTML = ''
32 | , alert = $(alertHTML).appendTo('#qunit-fixture').alert()
33 |
34 | ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')
35 |
36 | alert.find('.close').click()
37 |
38 | ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
39 | })
40 |
41 | test("should not fire closed when close is prevented", function () {
42 | $.support.transition = false
43 | stop();
44 | $('')
45 | .bind('close', function (e) {
46 | e.preventDefault();
47 | ok(true);
48 | start();
49 | })
50 | .bind('closed', function () {
51 | ok(false);
52 | })
53 | .alert('close')
54 | })
55 |
56 | })
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-tabs")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).tab, 'tabs method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).tab()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should activate element by tab id", function () {
14 | var tabsHTML =
15 | ''
19 |
20 | $('
').appendTo("#qunit-fixture")
21 |
22 | $(tabsHTML).find('li:last a').tab('show')
23 | equals($("#qunit-fixture").find('.active').attr('id'), "profile")
24 |
25 | $(tabsHTML).find('li:first a').tab('show')
26 | equals($("#qunit-fixture").find('.active').attr('id'), "home")
27 | })
28 |
29 | test("should activate element by tab id", function () {
30 | var pillsHTML =
31 | ''
35 |
36 | $('
').appendTo("#qunit-fixture")
37 |
38 | $(pillsHTML).find('li:last a').tab('show')
39 | equals($("#qunit-fixture").find('.active').attr('id'), "profile")
40 |
41 | $(pillsHTML).find('li:first a').tab('show')
42 | equals($("#qunit-fixture").find('.active').attr('id'), "home")
43 | })
44 |
45 |
46 | test("should not fire closed when close is prevented", function () {
47 | $.support.transition = false
48 | stop();
49 | $('')
50 | .bind('show', function (e) {
51 | e.preventDefault();
52 | ok(true);
53 | start();
54 | })
55 | .bind('shown', function () {
56 | ok(false);
57 | })
58 | .tab('show')
59 | })
60 |
61 | })
--------------------------------------------------------------------------------
/lib/hackn/github.rb:
--------------------------------------------------------------------------------
1 | module Hackn
2 | class Github
3 | include HTTParty
4 | base_uri NerdpursuitFrontend::Application.config.github_base_uri
5 | format :json
6 | debug_output
7 | attr_accessor :token
8 |
9 | def initialize(token, author)
10 | @token = token
11 | @author = author
12 | end
13 |
14 | def sha_latest_commit
15 | get("/git/refs/heads/master").parsed_response.fetch("object").fetch("sha")
16 | end
17 |
18 | def sha_base_tree
19 | get("/git/commits/#{sha_latest_commit}").parsed_response.fetch("sha")
20 | end
21 |
22 | def create_tree(path, content)
23 | @sha_new_tree = post("/git/trees",
24 | :body => {
25 | "base_tree" => sha_base_tree,
26 | "tree" => [{
27 | "path" => path,
28 | "mode" => "100644",
29 | "type" => "blob",
30 | "content" => content }] }.to_json,
31 | :headers => {"Authorization" => "token #{self.token}", "Content-Type" => "application/json"}
32 | ).parsed_response.fetch("sha")
33 | end
34 |
35 | def create_commit(tree_sha, message)
36 | post("/git/commits",
37 | :body => {
38 | "message" => message,
39 | "parents" => [sha_latest_commit],
40 | "tree" => tree_sha,
41 | "author" => {
42 | "name" => @author.login,
43 | "email" => @author.email,
44 | "date" => Time.now
45 | }
46 | }.to_json,
47 | :headers => {"Authorization" => "token #{self.token}", "Content-Type" => "application/json"}
48 | ).parsed_response.fetch("sha")
49 | end
50 |
51 | def point_master_to_commit(commit_sha)
52 | put("/git/refs/heads/master",
53 | :body => { :sha => commit_sha }.to_json,
54 | :headers => {"Authorization" => "token #{self.token}", "Content-Type" => "application/json"}
55 | ).code
56 | end
57 |
58 | protected
59 |
60 | def put(url, options = {})
61 | self.class.put(url, options)
62 | end
63 |
64 | def post(url, options = {})
65 | self.class.post(url, options)
66 | end
67 |
68 | def get(url, options = {})
69 | self.class.get(url, options)
70 | end
71 | end
72 | end
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bootstrap Plugin Test Suite
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | Bootstrap Plugin Test Suite
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/coverage/assets/0.5.3/highlight.css:
--------------------------------------------------------------------------------
1 | /*
2 | github.com style (c) Vasily Polovnyov
3 | */
4 |
5 | pre code {
6 | }
7 |
8 | pre .comment,
9 | pre .template_comment,
10 | pre .diff .header,
11 | pre .javadoc {
12 | color: #998;
13 | font-style: italic
14 | }
15 |
16 | pre .keyword,
17 | pre .css .rule .keyword,
18 | pre .winutils,
19 | pre .javascript .title,
20 | pre .lisp .title {
21 | color: #000;
22 | font-weight: bold
23 | }
24 |
25 | pre .number,
26 | pre .hexcolor {
27 | color: #458
28 | }
29 |
30 |
31 | pre .string,
32 | pre .tag .value,
33 | pre .phpdoc,
34 | pre .tex .formula {
35 | color: #d14
36 | }
37 |
38 | pre .subst {
39 | color: #712;
40 | }
41 |
42 | pre .constant,
43 | pre .title,
44 | pre .id {
45 | color: #900;
46 | font-weight: bold
47 | }
48 |
49 | pre .javascript .title,
50 | pre .lisp .title,
51 | pre .subst {
52 | font-weight: normal
53 | }
54 |
55 | pre .class .title,
56 | pre .haskell .label,
57 | pre .tex .command {
58 | color: #458;
59 | font-weight: bold
60 | }
61 |
62 | pre .tag,
63 | pre .tag .title,
64 | pre .rules .property,
65 | pre .django .tag .keyword {
66 | color: #000080;
67 | font-weight: normal
68 | }
69 |
70 | pre .attribute,
71 | pre .variable,
72 | pre .instancevar,
73 | pre .lisp .body {
74 | color: #008080
75 | }
76 |
77 | pre .regexp {
78 | color: #009926
79 | }
80 |
81 | pre .class {
82 | color: #458;
83 | font-weight: bold
84 | }
85 |
86 | pre .symbol,
87 | pre .ruby .symbol .string,
88 | pre .ruby .symbol .keyword,
89 | pre .ruby .symbol .keymethods,
90 | pre .lisp .keyword,
91 | pre .tex .special,
92 | pre .input_number {
93 | color: #990073
94 | }
95 |
96 | pre .builtin,
97 | pre .built_in,
98 | pre .lisp .title {
99 | color: #0086b3
100 | }
101 |
102 | pre .preprocessor,
103 | pre .pi,
104 | pre .doctype,
105 | pre .shebang,
106 | pre .cdata {
107 | color: #999;
108 | font-weight: bold
109 | }
110 |
111 | pre .deletion {
112 | background: #fdd
113 | }
114 |
115 | pre .addition {
116 | background: #dfd
117 | }
118 |
119 | pre .diff .change {
120 | background: #0086b3
121 | }
122 |
123 | pre .chunk {
124 | color: #aaa
125 | }
126 |
127 | pre .tex .formula {
128 | opacity: 0.5;
129 | }
130 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/phantom.js:
--------------------------------------------------------------------------------
1 | // Simple phantom.js integration script
2 | // Adapted from Modernizr
3 |
4 | function waitFor(testFx, onReady, timeOutMillis) {
5 | var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5001 //< Default Max Timout is 5s
6 | , start = new Date().getTime()
7 | , condition = false
8 | , interval = setInterval(function () {
9 | if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) {
10 | // If not time-out yet and condition not yet fulfilled
11 | condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code
12 | } else {
13 | if (!condition) {
14 | // If condition still not fulfilled (timeout but condition is 'false')
15 | console.log("'waitFor()' timeout")
16 | phantom.exit(1)
17 | } else {
18 | // Condition fulfilled (timeout and/or condition is 'true')
19 | typeof(onReady) === "string" ? eval(onReady) : onReady() //< Do what it's supposed to do once the condition is fulfilled
20 | clearInterval(interval) //< Stop this interval
21 | }
22 | }
23 | }, 100) //< repeat check every 100ms
24 | }
25 |
26 |
27 | if (phantom.args.length === 0 || phantom.args.length > 2) {
28 | console.log('Usage: phantom.js URL')
29 | phantom.exit()
30 | }
31 |
32 | var page = new WebPage()
33 |
34 | // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this")
35 | page.onConsoleMessage = function(msg) {
36 | console.log(msg)
37 | };
38 |
39 | page.open(phantom.args[0], function(status){
40 | if (status !== "success") {
41 | console.log("Unable to access network")
42 | phantom.exit()
43 | } else {
44 | waitFor(function(){
45 | return page.evaluate(function(){
46 | var el = document.getElementById('qunit-testresult')
47 | if (el && el.innerText.match('completed')) {
48 | return true
49 | }
50 | return false
51 | })
52 | }, function(){
53 | var failedNum = page.evaluate(function(){
54 | var el = document.getElementById('qunit-testresult')
55 | try {
56 | return el.getElementsByClassName('failed')[0].innerHTML
57 | } catch (e) { }
58 | return 10000
59 | });
60 | phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0)
61 | })
62 | }
63 | })
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/modals.less:
--------------------------------------------------------------------------------
1 | // MODALS
2 | // ------
3 |
4 | // Recalculate z-index where appropriate
5 | .modal-open {
6 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
7 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
8 | .popover { z-index: @zindexPopover + @zindexModal; }
9 | .tooltip { z-index: @zindexTooltip + @zindexModal; }
10 | }
11 |
12 | // Background
13 | .modal-backdrop {
14 | position: fixed;
15 | top: 0;
16 | right: 0;
17 | bottom: 0;
18 | left: 0;
19 | z-index: @zindexModalBackdrop;
20 | background-color: @black;
21 | // Fade for backdrop
22 | &.fade { opacity: 0; }
23 | }
24 |
25 | .modal-backdrop,
26 | .modal-backdrop.fade.in {
27 | .opacity(80);
28 | }
29 |
30 | // Base modal
31 | .modal {
32 | position: fixed;
33 | top: 50%;
34 | left: 50%;
35 | z-index: @zindexModal;
36 | overflow: auto;
37 | width: 560px;
38 | margin: -250px 0 0 -280px;
39 | background-color: @white;
40 | border: 1px solid #999;
41 | border: 1px solid rgba(0,0,0,.3);
42 | *border: 1px solid #999; /* IE6-7 */
43 | .border-radius(6px);
44 | .box-shadow(0 3px 7px rgba(0,0,0,0.3));
45 | .background-clip(padding-box);
46 | &.fade {
47 | .transition(e('opacity .3s linear, top .3s ease-out'));
48 | top: -25%;
49 | }
50 | &.fade.in { top: 50%; }
51 | }
52 | .modal-header {
53 | padding: 9px 15px;
54 | border-bottom: 1px solid #eee;
55 | // Close icon
56 | .close { margin-top: 2px; }
57 | }
58 |
59 | // Body (where all modal content resides)
60 | .modal-body {
61 | overflow-y: auto;
62 | max-height: 400px;
63 | padding: 15px;
64 | }
65 | // Remove bottom margin if need be
66 | .modal-form {
67 | margin-bottom: 0;
68 | }
69 |
70 | // Footer (for actions)
71 | .modal-footer {
72 | padding: 14px 15px 15px;
73 | margin-bottom: 0;
74 | text-align: right; // right align buttons
75 | background-color: #f5f5f5;
76 | border-top: 1px solid #ddd;
77 | .border-radius(0 0 6px 6px);
78 | .box-shadow(inset 0 1px 0 @white);
79 | .clearfix(); // clear it in case folks use .pull-* classes on buttons
80 |
81 | // Properly space out buttons
82 | .btn + .btn {
83 | margin-left: 5px;
84 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
85 | }
86 | // but override that for button groups
87 | .btn-group .btn + .btn {
88 | margin-left: -1px;
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/carousel.less:
--------------------------------------------------------------------------------
1 | // CAROUSEL
2 | // --------
3 |
4 | .carousel {
5 | position: relative;
6 | margin-bottom: @baseLineHeight;
7 | line-height: 1;
8 | }
9 |
10 | .carousel-inner {
11 | overflow: hidden;
12 | width: 100%;
13 | position: relative;
14 | }
15 |
16 | .carousel {
17 |
18 | .item {
19 | display: none;
20 | position: relative;
21 | .transition(.6s ease-in-out left);
22 | }
23 |
24 | // Account for jankitude on images
25 | .item > img {
26 | display: block;
27 | line-height: 1;
28 | }
29 |
30 | .active,
31 | .next,
32 | .prev { display: block; }
33 |
34 | .active {
35 | left: 0;
36 | }
37 |
38 | .next,
39 | .prev {
40 | position: absolute;
41 | top: 0;
42 | width: 100%;
43 | }
44 |
45 | .next {
46 | left: 100%;
47 | }
48 | .prev {
49 | left: -100%;
50 | }
51 | .next.left,
52 | .prev.right {
53 | left: 0;
54 | }
55 |
56 | .active.left {
57 | left: -100%;
58 | }
59 | .active.right {
60 | left: 100%;
61 | }
62 |
63 | }
64 |
65 | // Left/right controls for nav
66 | // ---------------------------
67 |
68 | .carousel-control {
69 | position: absolute;
70 | top: 40%;
71 | left: 15px;
72 | width: 40px;
73 | height: 40px;
74 | margin-top: -20px;
75 | font-size: 60px;
76 | font-weight: 100;
77 | line-height: 30px;
78 | color: @white;
79 | text-align: center;
80 | background: @grayDarker;
81 | border: 3px solid @white;
82 | .border-radius(23px);
83 | .opacity(50);
84 |
85 | // we can't have this transition here
86 | // because webkit cancels the carousel
87 | // animation if you trip this while
88 | // in the middle of another animation
89 | // ;_;
90 | // .transition(opacity .2s linear);
91 |
92 | // Reposition the right one
93 | &.right {
94 | left: auto;
95 | right: 15px;
96 | }
97 |
98 | // Hover state
99 | &:hover {
100 | color: @white;
101 | text-decoration: none;
102 | .opacity(90);
103 | }
104 | }
105 |
106 | // Caption for text below images
107 | // -----------------------------
108 |
109 | .carousel-caption {
110 | position: absolute;
111 | left: 0;
112 | right: 0;
113 | bottom: 0;
114 | padding: 10px 15px 5px;
115 | background: @grayDark;
116 | background: rgba(0,0,0,.75);
117 | }
118 | .carousel-caption h4,
119 | .carousel-caption p {
120 | color: @white;
121 | }
122 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | NerdpursuitFrontend::Application.routes.draw do
2 |
3 | get "sessions/new"
4 | get "sessions/create"
5 | get "sessions/failure"
6 | get '/logout', :to => 'sessions#destroy'
7 |
8 | get '/login', :to => 'sessions#new', :as => :login
9 | match '/auth/:provider/callback', :to => 'sessions#create'
10 | match '/auth/failure', :to => 'sessions#failure'
11 |
12 | resources :questions do
13 | member do
14 | put :accept
15 | put :reject
16 | end
17 | end
18 |
19 | root :to => "sessions#new"
20 |
21 | # The priority is based upon order of creation:
22 | # first created -> highest priority.
23 |
24 | # Sample of regular route:
25 | # match 'products/:id' => 'catalog#view'
26 | # Keep in mind you can assign values other than :controller and :action
27 |
28 | # Sample of named route:
29 | # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
30 | # This route can be invoked with purchase_url(:id => product.id)
31 |
32 | # Sample resource route (maps HTTP verbs to controller actions automatically):
33 | # resources :products
34 |
35 | # Sample resource route with options:
36 | # resources :products do
37 | # member do
38 | # get 'short'
39 | # post 'toggle'
40 | # end
41 | #
42 | # collection do
43 | # get 'sold'
44 | # end
45 | # end
46 |
47 | # Sample resource route with sub-resources:
48 | # resources :products do
49 | # resources :comments, :sales
50 | # resource :seller
51 | # end
52 |
53 | # Sample resource route with more complex sub-resources
54 | # resources :products do
55 | # resources :comments
56 | # resources :sales do
57 | # get 'recent', :on => :collection
58 | # end
59 | # end
60 |
61 | # Sample resource route within a namespace:
62 | # namespace :admin do
63 | # # Directs /admin/products/* to Admin::ProductsController
64 | # # (app/controllers/admin/products_controller.rb)
65 | # resources :products
66 | # end
67 |
68 | # You can have the root of your site routed with "root"
69 | # just remember to delete public/index.html.
70 | # root :to => 'welcome#index'
71 |
72 | # See how all your routes lay out with "rake routes"
73 |
74 | # This is a legacy wild controller route that's not recommended for RESTful applications.
75 | # Note: This route will make all actions in every controller accessible via GET requests.
76 | # match ':controller(/:action(/:id))(.:format)'
77 | end
78 |
--------------------------------------------------------------------------------
/app/views/questions/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Question
7 |
8 | Category
9 | <%= @question.category %>
10 |
11 |
12 |
13 | Sub category
14 | <%= @question.sub_category %>
15 |
16 |
17 |
18 | Nerd level
19 | <%= @question.nerd_level %>
20 |
21 |
22 |
23 | Text
24 | <%= @question.text %>
25 |
26 |
27 |
28 | A1
29 | <%= @question.a1 %>
30 |
31 |
32 |
33 | A2
34 | <%= @question.a2 %>
35 |
36 |
37 |
38 | A3
39 | <%= @question.a3 %>
40 |
41 |
42 |
43 | A4
44 | <%= @question.a4 %>
45 |
46 |
47 |
48 | Right answer
49 | <%= @question.right_answer %>
50 |
51 |
52 |
53 | Creator
54 | <%= @question.creator %>
55 |
56 |
57 |
58 | Creator twitter
59 | <%= @question.creator_twitter %>
60 |
61 |
62 |
63 | Creator github
64 | <%= @question.creator_github %>
65 |
66 |
67 |
68 | User
69 | <%= @question.user_id %>
70 |
71 |
72 |
73 | <% if @question.accepted_at? %>
74 | Accepted at <%= @question.accepted_at %>
75 | <% elsif @question.rejected_at? %>
76 | Rejected at <%= @question.rejected_at %>
77 | <% else %>
78 | <%= button_to "Accept", { :action => "accept", :id => @question.id }, :method => :put, :class => "btn btn-primary" %><%= button_to "Reject", { :action => "reject", :id => @question.id }, :method => :put, :class => "btn btn-primary" %>
79 | <% end %>
80 | <%= link_to 'Back', questions_path, :class => 'btn' %>
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-alert.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#alerts
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* ALERT CLASS DEFINITION
27 | * ====================== */
28 |
29 | var dismiss = '[data-dismiss="alert"]'
30 | , Alert = function (el) {
31 | $(el).on('click', dismiss, this.close)
32 | }
33 |
34 | Alert.prototype.close = function (e) {
35 | var $this = $(this)
36 | , selector = $this.attr('data-target')
37 | , $parent
38 |
39 | if (!selector) {
40 | selector = $this.attr('href')
41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42 | }
43 |
44 | $parent = $(selector)
45 |
46 | e && e.preventDefault()
47 |
48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49 |
50 | $parent.trigger(e = $.Event('close'))
51 |
52 | if (e.isDefaultPrevented()) return
53 |
54 | $parent.removeClass('in')
55 |
56 | function removeElement() {
57 | $parent
58 | .trigger('closed')
59 | .remove()
60 | }
61 |
62 | $.support.transition && $parent.hasClass('fade') ?
63 | $parent.on($.support.transition.end, removeElement) :
64 | removeElement()
65 | }
66 |
67 |
68 | /* ALERT PLUGIN DEFINITION
69 | * ======================= */
70 |
71 | $.fn.alert = function (option) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('alert')
75 | if (!data) $this.data('alert', (data = new Alert(this)))
76 | if (typeof option == 'string') data[option].call($this)
77 | })
78 | }
79 |
80 | $.fn.alert.Constructor = Alert
81 |
82 |
83 | /* ALERT DATA-API
84 | * ============== */
85 |
86 | $(function () {
87 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88 | })
89 |
90 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-alert.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#alerts
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* ALERT CLASS DEFINITION
27 | * ====================== */
28 |
29 | var dismiss = '[data-dismiss="alert"]'
30 | , Alert = function (el) {
31 | $(el).on('click', dismiss, this.close)
32 | }
33 |
34 | Alert.prototype.close = function (e) {
35 | var $this = $(this)
36 | , selector = $this.attr('data-target')
37 | , $parent
38 |
39 | if (!selector) {
40 | selector = $this.attr('href')
41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42 | }
43 |
44 | $parent = $(selector)
45 |
46 | e && e.preventDefault()
47 |
48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49 |
50 | $parent.trigger(e = $.Event('close'))
51 |
52 | if (e.isDefaultPrevented()) return
53 |
54 | $parent.removeClass('in')
55 |
56 | function removeElement() {
57 | $parent
58 | .trigger('closed')
59 | .remove()
60 | }
61 |
62 | $.support.transition && $parent.hasClass('fade') ?
63 | $parent.on($.support.transition.end, removeElement) :
64 | removeElement()
65 | }
66 |
67 |
68 | /* ALERT PLUGIN DEFINITION
69 | * ======================= */
70 |
71 | $.fn.alert = function (option) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('alert')
75 | if (!data) $this.data('alert', (data = new Alert(this)))
76 | if (typeof option == 'string') data[option].call($this)
77 | })
78 | }
79 |
80 | $.fn.alert.Constructor = Alert
81 |
82 |
83 | /* ALERT DATA-API
84 | * ============== */
85 |
86 | $(function () {
87 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88 | })
89 |
90 | }(window.jQuery);
--------------------------------------------------------------------------------
/config/environments/production.rb.example:
--------------------------------------------------------------------------------
1 | NerdpursuitFrontend::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # Code is not reloaded between requests
5 | config.cache_classes = true
6 |
7 | # Full error reports are disabled and caching is turned on
8 | config.consider_all_requests_local = false
9 | config.action_controller.perform_caching = true
10 |
11 | # Disable Rails's static asset server (Apache or nginx will already do this)
12 | config.serve_static_assets = false
13 |
14 | # Compress JavaScripts and CSS
15 | config.assets.compress = true
16 |
17 | # Don't fallback to assets pipeline if a precompiled asset is missed
18 | config.assets.compile = false
19 |
20 | # Generate digests for assets URLs
21 | config.assets.digest = true
22 |
23 | # Defaults to Rails.root.join("public/assets")
24 | # config.assets.manifest = YOUR_PATH
25 |
26 | # Specifies the header that your server uses for sending files
27 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29 |
30 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31 | # config.force_ssl = true
32 |
33 | # See everything in the log (default is :info)
34 | # config.log_level = :debug
35 |
36 | # Prepend all log lines with the following tags
37 | # config.log_tags = [ :subdomain, :uuid ]
38 |
39 | # Use a different logger for distributed setups
40 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41 |
42 | # Use a different cache store in production
43 | # config.cache_store = :mem_cache_store
44 |
45 | # Enable serving of images, stylesheets, and JavaScripts from an asset server
46 | # config.action_controller.asset_host = "http://assets.example.com"
47 |
48 | # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49 | # config.assets.precompile += %w( search.js )
50 |
51 | # Disable delivery errors, bad email addresses will be ignored
52 | # config.action_mailer.raise_delivery_errors = false
53 |
54 | # Enable threaded mode
55 | # config.threadsafe!
56 |
57 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58 | # the I18n.default_locale when a translation can not be found)
59 | config.i18n.fallbacks = true
60 |
61 | # Send deprecation notices to registered listeners
62 | config.active_support.deprecation = :notify
63 |
64 | # Log the query plan for queries taking more than this (works
65 | # with SQLite, MySQL, and PostgreSQL)
66 | # config.active_record.auto_explain_threshold_in_seconds = 0.5
67 |
68 | config.github_base_uri = "my production repo"
69 | config.github_key = 'my production key'
70 | config.github_secret = 'my production secret'
71 |
72 | end
73 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | NerdpursuitFrontend::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # Code is not reloaded between requests
5 | config.cache_classes = true
6 |
7 | # Full error reports are disabled and caching is turned on
8 | config.consider_all_requests_local = false
9 | config.action_controller.perform_caching = true
10 |
11 | # Disable Rails's static asset server (Apache or nginx will already do this)
12 | config.serve_static_assets = false
13 |
14 | # Compress JavaScripts and CSS
15 | config.assets.compress = true
16 |
17 | # Don't fallback to assets pipeline if a precompiled asset is missed
18 | config.assets.compile = false
19 |
20 | # Generate digests for assets URLs
21 | config.assets.digest = true
22 |
23 | # Defaults to Rails.root.join("public/assets")
24 | # config.assets.manifest = YOUR_PATH
25 |
26 | # Specifies the header that your server uses for sending files
27 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29 |
30 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31 | # config.force_ssl = true
32 |
33 | # See everything in the log (default is :info)
34 | # config.log_level = :debug
35 |
36 | # Prepend all log lines with the following tags
37 | # config.log_tags = [ :subdomain, :uuid ]
38 |
39 | # Use a different logger for distributed setups
40 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41 |
42 | # Use a different cache store in production
43 | # config.cache_store = :mem_cache_store
44 |
45 | # Enable serving of images, stylesheets, and JavaScripts from an asset server
46 | # config.action_controller.asset_host = "http://assets.example.com"
47 |
48 | # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49 | # config.assets.precompile += %w( search.js )
50 |
51 | # Disable delivery errors, bad email addresses will be ignored
52 | # config.action_mailer.raise_delivery_errors = false
53 |
54 | # Enable threaded mode
55 | # config.threadsafe!
56 |
57 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58 | # the I18n.default_locale when a translation can not be found)
59 | config.i18n.fallbacks = true
60 |
61 | # Send deprecation notices to registered listeners
62 | config.active_support.deprecation = :notify
63 |
64 | # Log the query plan for queries taking more than this (works
65 | # with SQLite, MySQL, and PostgreSQL)
66 | # config.active_record.auto_explain_threshold_in_seconds = 0.5
67 |
68 | config.github_base_uri = "https://api.github.com/repos/Nerds/NerdPursuit"
69 | config.github_key = ENV['GITHUB_KEY'],
70 | config.github_secret = ENV['GITHUB_SECRET']
71 |
72 | end
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | // PROGRESS BARS
2 | // -------------
3 |
4 |
5 | // ANIMATIONS
6 | // ----------
7 |
8 | // Webkit
9 | @-webkit-keyframes progress-bar-stripes {
10 | from { background-position: 40px 0; }
11 | to { background-position: 0 0; }
12 | }
13 |
14 | // Firefox
15 | @-moz-keyframes progress-bar-stripes {
16 | from { background-position: 40px 0; }
17 | to { background-position: 0 0; }
18 | }
19 |
20 | // IE9
21 | @-ms-keyframes progress-bar-stripes {
22 | from { background-position: 40px 0; }
23 | to { background-position: 0 0; }
24 | }
25 |
26 | // Opera
27 | @-o-keyframes progress-bar-stripes {
28 | from { background-position: 0 0; }
29 | to { background-position: 40px 0; }
30 | }
31 |
32 | // Spec
33 | @keyframes progress-bar-stripes {
34 | from { background-position: 40px 0; }
35 | to { background-position: 0 0; }
36 | }
37 |
38 |
39 |
40 | // THE BARS
41 | // --------
42 |
43 | // Outer container
44 | .progress {
45 | overflow: hidden;
46 | height: 18px;
47 | margin-bottom: 18px;
48 | #gradient > .vertical(#f5f5f5, #f9f9f9);
49 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
50 | .border-radius(4px);
51 | }
52 |
53 | // Bar of progress
54 | .progress .bar {
55 | width: 0%;
56 | height: 18px;
57 | color: @white;
58 | font-size: 12px;
59 | text-align: center;
60 | text-shadow: 0 -1px 0 rgba(0,0,0,.25);
61 | #gradient > .vertical(#149bdf, #0480be);
62 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
63 | .box-sizing(border-box);
64 | .transition(width .6s ease);
65 | }
66 |
67 | // Striped bars
68 | .progress-striped .bar {
69 | #gradient > .striped(#149bdf);
70 | .background-size(40px 40px);
71 | }
72 |
73 | // Call animation for the active one
74 | .progress.active .bar {
75 | -webkit-animation: progress-bar-stripes 2s linear infinite;
76 | -moz-animation: progress-bar-stripes 2s linear infinite;
77 | -ms-animation: progress-bar-stripes 2s linear infinite;
78 | -o-animation: progress-bar-stripes 2s linear infinite;
79 | animation: progress-bar-stripes 2s linear infinite;
80 | }
81 |
82 |
83 |
84 | // COLORS
85 | // ------
86 |
87 | // Danger (red)
88 | .progress-danger .bar {
89 | #gradient > .vertical(#ee5f5b, #c43c35);
90 | }
91 | .progress-danger.progress-striped .bar {
92 | #gradient > .striped(#ee5f5b);
93 | }
94 |
95 | // Success (green)
96 | .progress-success .bar {
97 | #gradient > .vertical(#62c462, #57a957);
98 | }
99 | .progress-success.progress-striped .bar {
100 | #gradient > .striped(#62c462);
101 | }
102 |
103 | // Info (teal)
104 | .progress-info .bar {
105 | #gradient > .vertical(#5bc0de, #339bb9);
106 | }
107 | .progress-info.progress-striped .bar {
108 | #gradient > .striped(#5bc0de);
109 | }
110 |
111 | // Warning (orange)
112 | .progress-warning .bar {
113 | #gradient > .vertical(lighten(@orange, 15%), @orange);
114 | }
115 | .progress-warning.progress-striped .bar {
116 | #gradient > .striped(lighten(@orange, 15%));
117 | }
118 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | if defined?(Bundler)
6 | # If you precompile assets before deploying to production, use this line
7 | Bundler.require(*Rails.groups(:assets => %w(development test)))
8 | # If you want your assets lazily compiled in production, use this line
9 | # Bundler.require(:default, :assets, Rails.env)
10 | end
11 |
12 | module NerdpursuitFrontend
13 | class Application < Rails::Application
14 | # Settings in config/environments/* take precedence over those specified here.
15 | # Application configuration should go into files in config/initializers
16 | # -- all .rb files in that directory are automatically loaded.
17 |
18 | # Custom directories with classes and modules you want to be autoloadable.
19 | config.autoload_paths += %W(#{config.root}/lib)
20 |
21 | # Only load the plugins named here, in the order given (default is alphabetical).
22 | # :all can be used as a placeholder for all plugins not explicitly named.
23 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
24 |
25 | # Activate observers that should always be running.
26 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
27 |
28 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
29 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
30 | # config.time_zone = 'Central Time (US & Canada)'
31 |
32 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
33 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
34 | # config.i18n.default_locale = :de
35 |
36 | # Configure the default encoding used in templates for Ruby 1.9.
37 | config.encoding = "utf-8"
38 |
39 | # Configure sensitive parameters which will be filtered from the log file.
40 | config.filter_parameters += [:password]
41 |
42 | # Use SQL instead of Active Record's schema dumper when creating the database.
43 | # This is necessary if your schema can't be completely dumped by the schema dumper,
44 | # like if you have constraints or database-specific column types
45 | # config.active_record.schema_format = :sql
46 |
47 | # Enforce whitelist mode for mass assignment.
48 | # This will create an empty whitelist of attributes available for mass-assignment for all models
49 | # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
50 | # parameters by using an attr_accessible or attr_protected declaration.
51 | config.active_record.whitelist_attributes = true
52 |
53 | # Enable the asset pipeline
54 | config.assets.enabled = true
55 |
56 | # Version of your assets, change this if you want to expire all your assets
57 | config.assets.version = '1.0'
58 |
59 | config.generators do |g|
60 | g.test_framework :mini_test, :spec => true, :fixture => true
61 | g.integration_tool :mini_test
62 | end
63 |
64 | end
65 | end
66 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-button.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#buttons
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* BUTTON PUBLIC CLASS DEFINITION
27 | * ============================== */
28 |
29 | var Button = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.button.defaults, options)
32 | }
33 |
34 | Button.prototype.setState = function (state) {
35 | var d = 'disabled'
36 | , $el = this.$element
37 | , data = $el.data()
38 | , val = $el.is('input') ? 'val' : 'html'
39 |
40 | state = state + 'Text'
41 | data.resetText || $el.data('resetText', $el[val]())
42 |
43 | $el[val](data[state] || this.options[state])
44 |
45 | // push to event loop to allow forms to submit
46 | setTimeout(function () {
47 | state == 'loadingText' ?
48 | $el.addClass(d).attr(d, d) :
49 | $el.removeClass(d).removeAttr(d)
50 | }, 0)
51 | }
52 |
53 | Button.prototype.toggle = function () {
54 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
55 |
56 | $parent && $parent
57 | .find('.active')
58 | .removeClass('active')
59 |
60 | this.$element.toggleClass('active')
61 | }
62 |
63 |
64 | /* BUTTON PLUGIN DEFINITION
65 | * ======================== */
66 |
67 | $.fn.button = function (option) {
68 | return this.each(function () {
69 | var $this = $(this)
70 | , data = $this.data('button')
71 | , options = typeof option == 'object' && option
72 | if (!data) $this.data('button', (data = new Button(this, options)))
73 | if (option == 'toggle') data.toggle()
74 | else if (option) data.setState(option)
75 | })
76 | }
77 |
78 | $.fn.button.defaults = {
79 | loadingText: 'loading...'
80 | }
81 |
82 | $.fn.button.Constructor = Button
83 |
84 |
85 | /* BUTTON DATA-API
86 | * =============== */
87 |
88 | $(function () {
89 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
90 | var $btn = $(e.target)
91 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92 | $btn.button('toggle')
93 | })
94 | })
95 |
96 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-button.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#buttons
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* BUTTON PUBLIC CLASS DEFINITION
27 | * ============================== */
28 |
29 | var Button = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.button.defaults, options)
32 | }
33 |
34 | Button.prototype.setState = function (state) {
35 | var d = 'disabled'
36 | , $el = this.$element
37 | , data = $el.data()
38 | , val = $el.is('input') ? 'val' : 'html'
39 |
40 | state = state + 'Text'
41 | data.resetText || $el.data('resetText', $el[val]())
42 |
43 | $el[val](data[state] || this.options[state])
44 |
45 | // push to event loop to allow forms to submit
46 | setTimeout(function () {
47 | state == 'loadingText' ?
48 | $el.addClass(d).attr(d, d) :
49 | $el.removeClass(d).removeAttr(d)
50 | }, 0)
51 | }
52 |
53 | Button.prototype.toggle = function () {
54 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
55 |
56 | $parent && $parent
57 | .find('.active')
58 | .removeClass('active')
59 |
60 | this.$element.toggleClass('active')
61 | }
62 |
63 |
64 | /* BUTTON PLUGIN DEFINITION
65 | * ======================== */
66 |
67 | $.fn.button = function (option) {
68 | return this.each(function () {
69 | var $this = $(this)
70 | , data = $this.data('button')
71 | , options = typeof option == 'object' && option
72 | if (!data) $this.data('button', (data = new Button(this, options)))
73 | if (option == 'toggle') data.toggle()
74 | else if (option) data.setState(option)
75 | })
76 | }
77 |
78 | $.fn.button.defaults = {
79 | loadingText: 'loading...'
80 | }
81 |
82 | $.fn.button.Constructor = Button
83 |
84 |
85 | /* BUTTON DATA-API
86 | * =============== */
87 |
88 | $(function () {
89 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
90 | var $btn = $(e.target)
91 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92 | $btn.button('toggle')
93 | })
94 | })
95 |
96 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-buttons")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).button, 'button method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).button()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should return set state to loading", function () {
14 | var btn = $('')
15 | equals(btn.html(), 'mdo', 'btn text equals mdo')
16 | btn.button('loading')
17 | equals(btn.html(), 'fat', 'btn text equals fat')
18 | stop()
19 | setTimeout(function () {
20 | ok(btn.attr('disabled'), 'btn is disabled')
21 | ok(btn.hasClass('disabled'), 'btn has disabled class')
22 | start()
23 | }, 0)
24 | })
25 |
26 | test("should return reset state", function () {
27 | var btn = $('')
28 | equals(btn.html(), 'mdo', 'btn text equals mdo')
29 | btn.button('loading')
30 | equals(btn.html(), 'fat', 'btn text equals fat')
31 | stop()
32 | setTimeout(function () {
33 | ok(btn.attr('disabled'), 'btn is disabled')
34 | ok(btn.hasClass('disabled'), 'btn has disabled class')
35 | start()
36 | stop()
37 | }, 0)
38 | btn.button('reset')
39 | equals(btn.html(), 'mdo', 'btn text equals mdo')
40 | setTimeout(function () {
41 | ok(!btn.attr('disabled'), 'btn is not disabled')
42 | ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
43 | start()
44 | }, 0)
45 | })
46 |
47 | test("should toggle active", function () {
48 | var btn = $('')
49 | ok(!btn.hasClass('active'), 'btn does not have active class')
50 | btn.button('toggle')
51 | ok(btn.hasClass('active'), 'btn has class active')
52 | })
53 |
54 | test("should toggle active when btn children are clicked", function () {
55 | var btn = $('')
56 | , inner = $('')
57 | btn
58 | .append(inner)
59 | .appendTo($('#qunit-fixture'))
60 | ok(!btn.hasClass('active'), 'btn does not have active class')
61 | inner.click()
62 | ok(btn.hasClass('active'), 'btn has class active')
63 | })
64 |
65 | test("should toggle active when btn children are clicked within btn-group", function () {
66 | var btngroup = $('')
67 | , btn = $('')
68 | , inner = $('')
69 | btngroup
70 | .append(btn.append(inner))
71 | .appendTo($('#qunit-fixture'))
72 | ok(!btn.hasClass('active'), 'btn does not have active class')
73 | inner.click()
74 | ok(btn.hasClass('active'), 'btn has class active')
75 | })
76 |
77 | })
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/reset.less:
--------------------------------------------------------------------------------
1 | // Reset.less
2 | // Adapted from Normalize.css http://github.com/necolas/normalize.css
3 | // ------------------------------------------------------------------------
4 |
5 | // Display in IE6-9 and FF3
6 | // -------------------------
7 |
8 | article,
9 | aside,
10 | details,
11 | figcaption,
12 | figure,
13 | footer,
14 | header,
15 | hgroup,
16 | nav,
17 | section {
18 | display: block;
19 | }
20 |
21 | // Display block in IE6-9 and FF3
22 | // -------------------------
23 |
24 | audio,
25 | canvas,
26 | video {
27 | display: inline-block;
28 | *display: inline;
29 | *zoom: 1;
30 | }
31 |
32 | // Prevents modern browsers from displaying 'audio' without controls
33 | // -------------------------
34 |
35 | audio:not([controls]) {
36 | display: none;
37 | }
38 |
39 | // Base settings
40 | // -------------------------
41 |
42 | html {
43 | font-size: 100%;
44 | -webkit-text-size-adjust: 100%;
45 | -ms-text-size-adjust: 100%;
46 | }
47 | // Focus states
48 | a:focus {
49 | .tab-focus();
50 | }
51 | // Hover & Active
52 | a:hover,
53 | a:active {
54 | outline: 0;
55 | }
56 |
57 | // Prevents sub and sup affecting line-height in all browsers
58 | // -------------------------
59 |
60 | sub,
61 | sup {
62 | position: relative;
63 | font-size: 75%;
64 | line-height: 0;
65 | vertical-align: baseline;
66 | }
67 | sup {
68 | top: -0.5em;
69 | }
70 | sub {
71 | bottom: -0.25em;
72 | }
73 |
74 | // Img border in a's and image quality
75 | // -------------------------
76 |
77 | img {
78 | max-width: 100%; // Make images inherently responsive
79 | vertical-align: middle;
80 | border: 0;
81 | -ms-interpolation-mode: bicubic;
82 | }
83 |
84 | // Forms
85 | // -------------------------
86 |
87 | // Font size in all browsers, margin changes, misc consistency
88 | button,
89 | input,
90 | select,
91 | textarea {
92 | margin: 0;
93 | font-size: 100%;
94 | vertical-align: middle;
95 | }
96 | button,
97 | input {
98 | *overflow: visible; // Inner spacing ie IE6/7
99 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
100 | }
101 | button::-moz-focus-inner,
102 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
103 | padding: 0;
104 | border: 0;
105 | }
106 | button,
107 | input[type="button"],
108 | input[type="reset"],
109 | input[type="submit"] {
110 | cursor: pointer; // Cursors on all buttons applied consistently
111 | -webkit-appearance: button; // Style clickable inputs in iOS
112 | }
113 | input[type="search"] { // Appearance in Safari/Chrome
114 | -webkit-box-sizing: content-box;
115 | -moz-box-sizing: content-box;
116 | box-sizing: content-box;
117 | -webkit-appearance: textfield;
118 | }
119 | input[type="search"]::-webkit-search-decoration,
120 | input[type="search"]::-webkit-search-cancel-button {
121 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
122 | }
123 | textarea {
124 | overflow: auto; // Remove vertical scrollbar in IE6-9
125 | vertical-align: top; // Readability and alignment cross-browser
126 | }
127 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle="dropdown"]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , selector
45 | , isActive
46 |
47 | if ($this.is('.disabled, :disabled')) return
48 |
49 | selector = $this.attr('data-target')
50 |
51 | if (!selector) {
52 | selector = $this.attr('href')
53 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
54 | }
55 |
56 | $parent = $(selector)
57 | $parent.length || ($parent = $this.parent())
58 |
59 | isActive = $parent.hasClass('open')
60 |
61 | clearMenus()
62 |
63 | if (!isActive) $parent.toggleClass('open')
64 |
65 | return false
66 | }
67 |
68 | }
69 |
70 | function clearMenus() {
71 | $(toggle).parent().removeClass('open')
72 | }
73 |
74 |
75 | /* DROPDOWN PLUGIN DEFINITION
76 | * ========================== */
77 |
78 | $.fn.dropdown = function (option) {
79 | return this.each(function () {
80 | var $this = $(this)
81 | , data = $this.data('dropdown')
82 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
83 | if (typeof option == 'string') data[option].call($this)
84 | })
85 | }
86 |
87 | $.fn.dropdown.Constructor = Dropdown
88 |
89 |
90 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
91 | * =================================== */
92 |
93 | $(function () {
94 | $('html').on('click.dropdown.data-api', clearMenus)
95 | $('body')
96 | .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97 | .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
98 | })
99 |
100 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-dropdown.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* DROPDOWN CLASS DEFINITION
27 | * ========================= */
28 |
29 | var toggle = '[data-toggle="dropdown"]'
30 | , Dropdown = function (element) {
31 | var $el = $(element).on('click.dropdown.data-api', this.toggle)
32 | $('html').on('click.dropdown.data-api', function () {
33 | $el.parent().removeClass('open')
34 | })
35 | }
36 |
37 | Dropdown.prototype = {
38 |
39 | constructor: Dropdown
40 |
41 | , toggle: function (e) {
42 | var $this = $(this)
43 | , $parent
44 | , selector
45 | , isActive
46 |
47 | if ($this.is('.disabled, :disabled')) return
48 |
49 | selector = $this.attr('data-target')
50 |
51 | if (!selector) {
52 | selector = $this.attr('href')
53 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
54 | }
55 |
56 | $parent = $(selector)
57 | $parent.length || ($parent = $this.parent())
58 |
59 | isActive = $parent.hasClass('open')
60 |
61 | clearMenus()
62 |
63 | if (!isActive) $parent.toggleClass('open')
64 |
65 | return false
66 | }
67 |
68 | }
69 |
70 | function clearMenus() {
71 | $(toggle).parent().removeClass('open')
72 | }
73 |
74 |
75 | /* DROPDOWN PLUGIN DEFINITION
76 | * ========================== */
77 |
78 | $.fn.dropdown = function (option) {
79 | return this.each(function () {
80 | var $this = $(this)
81 | , data = $this.data('dropdown')
82 | if (!data) $this.data('dropdown', (data = new Dropdown(this)))
83 | if (typeof option == 'string') data[option].call($this)
84 | })
85 | }
86 |
87 | $.fn.dropdown.Constructor = Dropdown
88 |
89 |
90 | /* APPLY TO STANDARD DROPDOWN ELEMENTS
91 | * =================================== */
92 |
93 | $(function () {
94 | $('html').on('click.dropdown.data-api', clearMenus)
95 | $('body')
96 | .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
97 | .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
98 | })
99 |
100 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-popover.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#popovers
4 | * ===========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * =========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* POPOVER PUBLIC CLASS DEFINITION
27 | * =============================== */
28 |
29 | var Popover = function ( element, options ) {
30 | this.init('popover', element, options)
31 | }
32 |
33 |
34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35 | ========================================== */
36 |
37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38 |
39 | constructor: Popover
40 |
41 | , setContent: function () {
42 | var $tip = this.tip()
43 | , title = this.getTitle()
44 | , content = this.getContent()
45 |
46 | $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
47 | $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
48 |
49 | $tip.removeClass('fade top bottom left right in')
50 | }
51 |
52 | , hasContent: function () {
53 | return this.getTitle() || this.getContent()
54 | }
55 |
56 | , getContent: function () {
57 | var content
58 | , $e = this.$element
59 | , o = this.options
60 |
61 | content = $e.attr('data-content')
62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
63 |
64 | return content
65 | }
66 |
67 | , tip: function () {
68 | if (!this.$tip) {
69 | this.$tip = $(this.options.template)
70 | }
71 | return this.$tip
72 | }
73 |
74 | })
75 |
76 |
77 | /* POPOVER PLUGIN DEFINITION
78 | * ======================= */
79 |
80 | $.fn.popover = function (option) {
81 | return this.each(function () {
82 | var $this = $(this)
83 | , data = $this.data('popover')
84 | , options = typeof option == 'object' && option
85 | if (!data) $this.data('popover', (data = new Popover(this, options)))
86 | if (typeof option == 'string') data[option]()
87 | })
88 | }
89 |
90 | $.fn.popover.Constructor = Popover
91 |
92 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
93 | placement: 'right'
94 | , content: ''
95 | , template: ''
96 | })
97 |
98 | }(window.jQuery);
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-popover.js v2.0.3
3 | * http://twitter.github.com/bootstrap/javascript.html#popovers
4 | * ===========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * =========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* POPOVER PUBLIC CLASS DEFINITION
27 | * =============================== */
28 |
29 | var Popover = function ( element, options ) {
30 | this.init('popover', element, options)
31 | }
32 |
33 |
34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35 | ========================================== */
36 |
37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38 |
39 | constructor: Popover
40 |
41 | , setContent: function () {
42 | var $tip = this.tip()
43 | , title = this.getTitle()
44 | , content = this.getContent()
45 |
46 | $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
47 | $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
48 |
49 | $tip.removeClass('fade top bottom left right in')
50 | }
51 |
52 | , hasContent: function () {
53 | return this.getTitle() || this.getContent()
54 | }
55 |
56 | , getContent: function () {
57 | var content
58 | , $e = this.$element
59 | , o = this.options
60 |
61 | content = $e.attr('data-content')
62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
63 |
64 | return content
65 | }
66 |
67 | , tip: function () {
68 | if (!this.$tip) {
69 | this.$tip = $(this.options.template)
70 | }
71 | return this.$tip
72 | }
73 |
74 | })
75 |
76 |
77 | /* POPOVER PLUGIN DEFINITION
78 | * ======================= */
79 |
80 | $.fn.popover = function (option) {
81 | return this.each(function () {
82 | var $this = $(this)
83 | , data = $this.data('popover')
84 | , options = typeof option == 'object' && option
85 | if (!data) $this.data('popover', (data = new Popover(this, options)))
86 | if (typeof option == 'string') data[option]()
87 | })
88 | }
89 |
90 | $.fn.popover.Constructor = Popover
91 |
92 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
93 | placement: 'right'
94 | , content: ''
95 | , template: ''
96 | })
97 |
98 | }(window.jQuery);
--------------------------------------------------------------------------------
/coverage/assets/0.5.3/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 | // Configuration for fancy sortable tables for source file groups
3 | $('.file_list').dataTable({
4 | "aaSorting": [[ 1, "asc" ]],
5 | "bPaginate": false,
6 | "bJQueryUI": true,
7 | "aoColumns": [
8 | null,
9 | { "sType": "percent" },
10 | null,
11 | null,
12 | null,
13 | null,
14 | null
15 | ]
16 | });
17 |
18 | // Syntax highlight all files up front - deactivated
19 | // $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
20 |
21 | // Syntax highlight source files on first toggle of the file view popup
22 | $("a.src_link").click(function() {
23 | // Get the source file element that corresponds to the clicked element
24 | var source_table = $($(this).attr('href'));
25 |
26 | // If not highlighted yet, do it!
27 | if (!source_table.hasClass('highlighted')) {
28 | source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
29 | source_table.addClass('highlighted');
30 | };
31 | });
32 |
33 | // Set-up of popup for source file views
34 | $("a.src_link").fancybox({
35 | 'hideOnContentClick': true,
36 | 'centerOnScroll': true,
37 | 'width': '90%',
38 | 'padding': 0,
39 | 'transitionIn': 'elastic'
40 | });
41 |
42 | // Hide src files and file list container after load
43 | $('.source_files').hide();
44 | $('.file_list_container').hide();
45 |
46 | // Add tabs based upon existing file_list_containers
47 | $('.file_list_container h2').each(function(){
48 | var container_id = $(this).parent().attr('id');
49 | var group_name = $(this).find('.group_name').first().html();
50 | var covered_percent = $(this).find('.covered_percent').first().html();
51 |
52 | $('.group_tabs').append('' + group_name + ' ('+ covered_percent +') ');
53 | });
54 |
55 | $('.group_tabs a').each( function() {
56 | $(this).addClass($(this).attr('href').replace('#', ''));
57 | });
58 |
59 | // Make sure tabs don't get ugly focus borders when active
60 | $('.group_tabs a').live('focus', function() { $(this).blur(); });
61 |
62 | var favicon_path = $('link[rel="shortcut icon"]').attr('href');
63 | $('.group_tabs a').live('click', function(){
64 | if (!$(this).parent().hasClass('active')) {
65 | $('.group_tabs a').parent().removeClass('active');
66 | $(this).parent().addClass('active');
67 | $('.file_list_container').hide();
68 | $(".file_list_container" + $(this).attr('href')).show();
69 | window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
70 |
71 | // Force favicon reload - otherwise the location change containing anchor would drop the favicon...
72 | // Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
73 | $('link[rel="shortcut icon"]').remove();
74 | $('head').append('');
75 | };
76 | return false;
77 | });
78 |
79 | if (jQuery.url.attr('anchor')) {
80 | $('.group_tabs a.'+jQuery.url.attr('anchor').replace('_', '')).click();
81 | } else {
82 | $('.group_tabs a:first').click();
83 | };
84 |
85 | $("abbr.timeago").timeago();
86 | $('#loading').fadeOut();
87 | $('#wrapper').show();
88 | });
89 |
--------------------------------------------------------------------------------
/app/views/questions/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for @question, :html => { :class => 'form-horizontal' } do |f| %>
2 |
94 | <% end %>
95 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/examples/starter-template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Bootstrap, from Twitter
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
53 |
54 |
55 |
56 | Bootstrap starter template
57 | Use this document as a way to quick start any new project.
All you get is this message and a barebones HTML document.
58 |
59 |
60 |
61 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-popover")
4 |
5 | test("should be defined on jquery object", function () {
6 | var div = $('')
7 | ok(div.popover, 'popover method is defined')
8 | })
9 |
10 | test("should return element", function () {
11 | var div = $('')
12 | ok(div.popover() == div, 'document.body returned')
13 | })
14 |
15 | test("should render popover element", function () {
16 | $.support.transition = false
17 | var popover = $('@mdo')
18 | .appendTo('#qunit-fixture')
19 | .popover('show')
20 |
21 | ok($('.popover').length, 'popover was inserted')
22 | popover.popover('hide')
23 | ok(!$(".popover").length, 'popover removed')
24 | })
25 |
26 | test("should store popover instance in popover data object", function () {
27 | $.support.transition = false
28 | var popover = $('@mdo')
29 | .popover()
30 |
31 | ok(!!popover.data('popover'), 'popover instance exists')
32 | })
33 |
34 | test("should get title and content from options", function () {
35 | $.support.transition = false
36 | var popover = $('@fat')
37 | .appendTo('#qunit-fixture')
38 | .popover({
39 | title: function () {
40 | return '@fat'
41 | }
42 | , content: function () {
43 | return 'loves writing tests (╯°□°)╯︵ ┻━┻'
44 | }
45 | })
46 |
47 | popover.popover('show')
48 |
49 | ok($('.popover').length, 'popover was inserted')
50 | equals($('.popover .popover-title').text(), '@fat', 'title correctly inserted')
51 | equals($('.popover .popover-content').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
52 |
53 | popover.popover('hide')
54 | ok(!$('.popover').length, 'popover was removed')
55 | $('#qunit-fixture').empty()
56 | })
57 |
58 | test("should get title and content from attributes", function () {
59 | $.support.transition = false
60 | var popover = $('@mdo')
61 | .appendTo('#qunit-fixture')
62 | .popover()
63 | .popover('show')
64 |
65 | ok($('.popover').length, 'popover was inserted')
66 | equals($('.popover .popover-title').text(), '@mdo', 'title correctly inserted')
67 | equals($('.popover .popover-content').text(), "loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻", 'content correctly inserted')
68 |
69 | popover.popover('hide')
70 | ok(!$('.popover').length, 'popover was removed')
71 | $('#qunit-fixture').empty()
72 | })
73 |
74 | test("should respect custom classes", function() {
75 | $.support.transition = false
76 | var popover = $('@fat')
77 | .appendTo('#qunit-fixture')
78 | .popover({
79 | title: 'Test'
80 | , content: 'Test'
81 | , template: ''
82 | })
83 |
84 | popover.popover('show')
85 |
86 | ok($('.popover').length, 'popover was inserted')
87 | ok($('.popover').hasClass('foobar'), 'custom class is present')
88 |
89 | popover.popover('hide')
90 | ok(!$('.popover').length, 'popover was removed')
91 | $('#qunit-fixture').empty()
92 | })
93 | })
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/docs/assets/js/README.md:
--------------------------------------------------------------------------------
1 | ## 2.0 BOOTSTRAP JS PHILOSOPHY
2 | These are the high-level design rules which guide the development of Bootstrap's plugin apis.
3 |
4 | ---
5 |
6 | ### DATA-ATTRIBUTE API
7 |
8 | We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
9 |
10 | We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
11 |
12 | $('body').off('.data-api')
13 |
14 | To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
15 |
16 | $('body').off('.alert.data-api')
17 |
18 | ---
19 |
20 | ### PROGRAMATIC API
21 |
22 | We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
23 |
24 | All public APIs should be single, chainable methods, and return the collection acted upon.
25 |
26 | $(".btn.danger").button("toggle").addClass("fat")
27 |
28 | All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
29 |
30 | $("#myModal").modal() // initialized with defaults
31 | $("#myModal").modal({ keyboard: false }) // initialized with now keyboard
32 | $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
33 |
34 | ---
35 |
36 | ### OPTIONS
37 |
38 | Options should be sparse and add universal value. We should pick the right defaults.
39 |
40 | All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
41 |
42 | $.fn.modal.defaults = { … }
43 |
44 | An options definition should take the following form:
45 |
46 | *noun*: *adjective* - describes or modifies a quality of an instance
47 |
48 | examples:
49 |
50 | backdrop: true
51 | keyboard: false
52 | placement: 'top'
53 |
54 | ---
55 |
56 | ### EVENTS
57 |
58 | All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
59 |
60 | show | shown
61 | hide | hidden
62 |
63 | ---
64 |
65 | ### CONSTRUCTORS
66 |
67 | Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
68 |
69 |
70 | $.fn.popover.Constructor
71 |
72 | ---
73 |
74 | ### DATA ACCESSOR
75 |
76 | Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
77 |
78 | $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
79 |
80 | ---
81 |
82 | ### DATA ATTRIBUTES
83 |
84 | Data attributes should take the following form:
85 |
86 | - data-{{verb}}={{plugin}} - defines main interaction
87 | - data-target || href^=# - defined on "control" element (if element controls an element other than self)
88 | - data-{{noun}} - defines class instance options
89 |
90 | examples:
91 |
92 | // control other targets
93 | data-toggle="modal" data-target="#foo"
94 | data-toggle="collapse" data-target="#foo" data-parent="#bar"
95 |
96 | // defined on element they control
97 | data-spy="scroll"
98 |
99 | data-dismiss="modal"
100 | data-dismiss="alert"
101 |
102 | data-toggle="dropdown"
103 |
104 | data-toggle="button"
105 | data-toggle="buttons-checkbox"
106 | data-toggle="buttons-radio"
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/responsive-767px-max.less:
--------------------------------------------------------------------------------
1 | // UP TO LANDSCAPE PHONE
2 | // ---------------------
3 |
4 | @media (max-width: 480px) {
5 |
6 | // Smooth out the collapsing/expanding nav
7 | .nav-collapse {
8 | -webkit-transform: translate3d(0, 0, 0); // activate the GPU
9 | }
10 |
11 | // Block level the page header small tag for readability
12 | .page-header h1 small {
13 | display: block;
14 | line-height: @baseLineHeight;
15 | }
16 |
17 | // Update checkboxes for iOS
18 | input[type="checkbox"],
19 | input[type="radio"] {
20 | border: 1px solid #ccc;
21 | }
22 |
23 | // Remove the horizontal form styles
24 | .form-horizontal .control-group > label {
25 | float: none;
26 | width: auto;
27 | padding-top: 0;
28 | text-align: left;
29 | }
30 | // Move over all input controls and content
31 | .form-horizontal .controls {
32 | margin-left: 0;
33 | }
34 | // Move the options list down to align with labels
35 | .form-horizontal .control-list {
36 | padding-top: 0; // has to be padding because margin collaspes
37 | }
38 | // Move over buttons in .form-actions to align with .controls
39 | .form-horizontal .form-actions {
40 | padding-left: 10px;
41 | padding-right: 10px;
42 | }
43 |
44 | // Modals
45 | .modal {
46 | position: absolute;
47 | top: 10px;
48 | left: 10px;
49 | right: 10px;
50 | width: auto;
51 | margin: 0;
52 | &.fade.in { top: auto; }
53 | }
54 | .modal-header .close {
55 | padding: 10px;
56 | margin: -10px;
57 | }
58 |
59 | // Carousel
60 | .carousel-caption {
61 | position: static;
62 | }
63 |
64 | }
65 |
66 |
67 |
68 | // LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
69 | // --------------------------------------------------
70 |
71 | @media (max-width: 767px) {
72 |
73 | // Padding to set content in a bit
74 | body {
75 | padding-left: 20px;
76 | padding-right: 20px;
77 | }
78 | // Negative indent the now static "fixed" navbar
79 | .navbar-fixed-top,
80 | .navbar-fixed-bottom {
81 | margin-left: -20px;
82 | margin-right: -20px;
83 | }
84 | // Remove padding on container given explicit padding set on body
85 | .container-fluid {
86 | padding: 0;
87 | }
88 |
89 | // TYPOGRAPHY
90 | // ----------
91 | // Reset horizontal dl
92 | .dl-horizontal {
93 | dt {
94 | float: none;
95 | clear: none;
96 | width: auto;
97 | text-align: left;
98 | }
99 | dd {
100 | margin-left: 0;
101 | }
102 | }
103 |
104 | // GRID & CONTAINERS
105 | // -----------------
106 | // Remove width from containers
107 | .container {
108 | width: auto;
109 | }
110 | // Fluid rows
111 | .row-fluid {
112 | width: 100%;
113 | }
114 | // Undo negative margin on rows and thumbnails
115 | .row,
116 | .thumbnails {
117 | margin-left: 0;
118 | }
119 | // Make all grid-sized elements block level again
120 | [class*="span"],
121 | .row-fluid [class*="span"] {
122 | float: none;
123 | display: block;
124 | width: auto;
125 | margin-left: 0;
126 | }
127 |
128 | // FORM FIELDS
129 | // -----------
130 | // Make span* classes full width
131 | .input-large,
132 | .input-xlarge,
133 | .input-xxlarge,
134 | input[class*="span"],
135 | select[class*="span"],
136 | textarea[class*="span"],
137 | .uneditable-input {
138 | .input-block-level();
139 | }
140 | // But don't let it screw up prepend/append inputs
141 | .input-prepend input,
142 | .input-append input,
143 | .input-prepend input[class*="span"],
144 | .input-append input[class*="span"] {
145 | display: inline-block; // redeclare so they don't wrap to new lines
146 | width: auto;
147 | }
148 |
149 | }
150 |
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/js/tests/unit/bootstrap-dropdown.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-dropdowns")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).dropdown, 'dropdown method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).dropdown()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should not open dropdown if target is disabled", function () {
14 | var dropdownHTML = ''
15 | + '- '
16 | + ''
17 | + ''
23 | + '
'
24 | + '
'
25 | , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
26 |
27 | ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
28 | })
29 |
30 | test("should not open dropdown if target is disabled", function () {
31 | var dropdownHTML = ''
32 | + '- '
33 | + ''
34 | + ''
40 | + '
'
41 | + '
'
42 | , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
43 |
44 | ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
45 | })
46 |
47 | test("should add class open to menu if clicked", function () {
48 | var dropdownHTML = ''
49 | + '- '
50 | + 'Dropdown'
51 | + ''
57 | + '
'
58 | + '
'
59 | , dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
60 |
61 | ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
62 | })
63 |
64 | test("should remove open class if body clicked", function () {
65 | var dropdownHTML = ''
66 | + '- '
67 | + 'Dropdown'
68 | + ''
74 | + '
'
75 | + '
'
76 | , dropdown = $(dropdownHTML)
77 | .appendTo('#qunit-fixture')
78 | .find('[data-toggle="dropdown"]')
79 | .dropdown()
80 | .click()
81 | ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
82 | $('body').click()
83 | ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
84 | dropdown.remove()
85 | })
86 |
87 | })
--------------------------------------------------------------------------------
/app/twitter-bootstrap-b261f97/less/dropdowns.less:
--------------------------------------------------------------------------------
1 | // DROPDOWN MENUS
2 | // --------------
3 |
4 | // Use the .menu class on any element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5 | .dropup,
6 | .dropdown {
7 | position: relative;
8 | }
9 | .dropdown-toggle {
10 | // The caret makes the toggle a bit too tall in IE7
11 | *margin-bottom: -3px;
12 | }
13 | .dropdown-toggle:active,
14 | .open .dropdown-toggle {
15 | outline: 0;
16 | }
17 |
18 | // Dropdown arrow/caret
19 | // --------------------
20 | .caret {
21 | display: inline-block;
22 | width: 0;
23 | height: 0;
24 | vertical-align: top;
25 | border-top: 4px solid @black;
26 | border-right: 4px solid transparent;
27 | border-left: 4px solid transparent;
28 | content: "";
29 | .opacity(30);
30 | }
31 |
32 | // Place the caret
33 | .dropdown .caret {
34 | margin-top: 8px;
35 | margin-left: 2px;
36 | }
37 | .dropdown:hover .caret,
38 | .open .caret {
39 | .opacity(100);
40 | }
41 |
42 | // The dropdown menu (ul)
43 | // ----------------------
44 | .dropdown-menu {
45 | position: absolute;
46 | top: 100%;
47 | left: 0;
48 | z-index: @zindexDropdown;
49 | display: none; // none by default, but block on "open" of the menu
50 | float: left;
51 | min-width: 160px;
52 | padding: 4px 0;
53 | margin: 1px 0 0; // override default ul
54 | list-style: none;
55 | background-color: @dropdownBackground;
56 | border: 1px solid #ccc;
57 | border: 1px solid rgba(0,0,0,.2);
58 | *border-right-width: 2px;
59 | *border-bottom-width: 2px;
60 | .border-radius(5px);
61 | .box-shadow(0 5px 10px rgba(0,0,0,.2));
62 | -webkit-background-clip: padding-box;
63 | -moz-background-clip: padding;
64 | background-clip: padding-box;
65 |
66 | // Aligns the dropdown menu to right
67 | &.pull-right {
68 | right: 0;
69 | left: auto;
70 | }
71 |
72 | // Dividers (basically an hr) within the dropdown
73 | .divider {
74 | .nav-divider();
75 | }
76 |
77 | // Links within the dropdown menu
78 | a {
79 | display: block;
80 | padding: 3px 15px;
81 | clear: both;
82 | font-weight: normal;
83 | line-height: @baseLineHeight;
84 | color: @dropdownLinkColor;
85 | white-space: nowrap;
86 | }
87 | }
88 |
89 | // Hover state
90 | // -----------
91 | .dropdown-menu li > a:hover,
92 | .dropdown-menu .active > a,
93 | .dropdown-menu .active > a:hover {
94 | color: @dropdownLinkColorHover;
95 | text-decoration: none;
96 | background-color: @dropdownLinkBackgroundHover;
97 | }
98 |
99 | // Open state for the dropdown
100 | // ---------------------------
101 | .open {
102 | // IE7's z-index only goes to the nearest positioned ancestor, which would
103 | // make the menu appear below buttons that appeared later on the page
104 | *z-index: @zindexDropdown;
105 |
106 | .dropdown-menu {
107 | display: block;
108 | }
109 | }
110 |
111 | // Right aligned dropdowns
112 | // ---------------------------
113 | .pull-right .dropdown-menu {
114 | right: 0;
115 | left: auto;
116 | }
117 |
118 | // Allow for dropdowns to go bottom up (aka, dropup-menu)
119 | // ------------------------------------------------------
120 | // Just add .dropup after the standard .dropdown class and you're set, bro.
121 | // TODO: abstract this so that the navbar fixed styles are not placed here?
122 | .dropup,
123 | .navbar-fixed-bottom .dropdown {
124 | // Reverse the caret
125 | .caret {
126 | border-top: 0;
127 | border-bottom: 4px solid @black;
128 | content: "\2191";
129 | }
130 | // Different positioning for bottom up menu
131 | .dropdown-menu {
132 | top: auto;
133 | bottom: 100%;
134 | margin-bottom: 1px;
135 | }
136 | }
137 |
138 | // Typeahead
139 | // ---------
140 | .typeahead {
141 | margin-top: 2px; // give it some space to breathe
142 | .border-radius(4px);
143 | }
144 |
--------------------------------------------------------------------------------