Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco Viramontes committed Feb 8, 2012
0 parents commit 76a6236
Show file tree
Hide file tree
Showing 31 changed files with 15,197 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
.sass-cache/
.DS_Store
1 change: 1 addition & 0 deletions .rvmrc
@@ -0,0 +1 @@
rvm 1.9.3@gronkowski
20 changes: 20 additions & 0 deletions Gemfile
@@ -0,0 +1,20 @@
source "http://rubygems.org"

# base
gem "sinatra", '~>1.3', :require => "sinatra/base"

gem 'slim'
gem 'sinatra-content-for2'
gem 'sprockets'
gem 'coffee-script'
gem 'sass'
gem 'less'

# test
group :test do
gem 'rspec', '~>2.8'
gem 'capybara', '~>1.1'
gem 'ruby-debug19'
# app
gem 'net-ssh'
end
101 changes: 101 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,101 @@
GEM
remote: http://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.0)
ffi (~> 1.0.6)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
columnize (0.3.6)
commonjs (0.2.0)
therubyracer (~> 0.9.9)
diff-lcs (1.1.3)
execjs (1.2.13)
multi_json (~> 1.0)
ffi (1.0.11)
hike (1.2.1)
less (2.0.9)
commonjs (~> 0.2.0)
therubyracer (~> 0.9.9)
libv8 (3.3.10.4)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mime-types (1.16)
multi_json (1.0.4)
net-ssh (2.2.1)
nokogiri (1.5.0)
rack (1.4.0)
rack-protection (1.2.0)
rack
rack-test (0.6.1)
rack (>= 1.0)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.5)
sass (3.1.12)
selenium-webdriver (2.17.0)
childprocess (>= 0.2.5)
ffi (~> 1.0.9)
multi_json (~> 1.0.4)
rubyzip
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sinatra-content-for2 (0.3)
sinatra
slim (1.1.0)
temple (~> 0.3.5)
tilt (~> 1.3.2)
sprockets (2.3.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
temple (0.3.5)
therubyracer (0.9.9)
libv8 (~> 3.3.10)
tilt (1.3.3)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
capybara (~> 1.1)
coffee-script
less
net-ssh
rspec (~> 2.8)
ruby-debug19
sass
sinatra (~> 1.3)
sinatra-content-for2
slim
sprockets
22 changes: 22 additions & 0 deletions app.rb
@@ -0,0 +1,22 @@
require 'sinatra/base'
require 'sinatra/content_for2'
require 'slim'
require 'coffee_script'
require 'sprockets'

# stuff in lib
require './lib/sprockets_sinatra_middleware'

module Namespace
class App < Sinatra::Base
helpers Sinatra::ContentFor2

set :root, File.dirname(__FILE__)

use ::SprocketsSinatraMiddleware, :root => settings.root, :path => 'assets'

get "/" do
slim :index
end
end
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/bootstrap/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/javascripts/application.js
@@ -0,0 +1,3 @@
//= require vendor/jquery
//= require bootstrap
//= require_tree .
12 changes: 12 additions & 0 deletions assets/javascripts/vendor/bootstrap.js
@@ -0,0 +1,12 @@
//= require vendor/bootstrap/bootstrap-transition
//= require vendor/bootstrap/bootstrap-alert
//= require vendor/bootstrap/bootstrap-modal
//= require vendor/bootstrap/bootstrap-dropdown
//= require vendor/bootstrap/bootstrap-scrollspy
//= require vendor/bootstrap/bootstrap-tab
//= require vendor/bootstrap/bootstrap-tooltip
//= require vendor/bootstrap/bootstrap-popover
//= require vendor/bootstrap/bootstrap-button
//= require vendor/bootstrap/bootstrap-collapse
//= require vendor/bootstrap/bootstrap-carousel
//= require vendor/bootstrap/bootstrap-typeahead
91 changes: 91 additions & 0 deletions assets/javascripts/vendor/bootstrap/bootstrap-alert.js
@@ -0,0 +1,91 @@
/* ==========================================================
* bootstrap-alert.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */


!function( $ ){

"use strict"

/* ALERT CLASS DEFINITION
* ====================== */

var dismiss = '[data-dismiss="alert"]'
, Alert = function ( el ) {
$(el).on('click', dismiss, this.close)
}

Alert.prototype = {

constructor: Alert

, close: function ( e ) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent

if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}

$parent = $(selector)
$parent.trigger('close')

e && e.preventDefault()

$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())

$parent.removeClass('in')

function removeElement() {
$parent.remove()
$parent.trigger('closed')
}

$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}

}


/* ALERT PLUGIN DEFINITION
* ======================= */

$.fn.alert = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}

$.fn.alert.Constructor = Alert


/* ALERT DATA-API
* ============== */

$(function () {
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
})

}( window.jQuery )
98 changes: 98 additions & 0 deletions assets/javascripts/vendor/bootstrap/bootstrap-button.js
@@ -0,0 +1,98 @@
/* ============================================================
* bootstrap-button.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */

!function( $ ){

"use strict"

/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */

var Button = function ( element, options ) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
}

Button.prototype = {

constructor: Button

, setState: function ( state ) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'

state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())

$el[val](data[state] || this.options[state])

// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}

, toggle: function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')

$parent && $parent
.find('.active')
.removeClass('active')

this.$element.toggleClass('active')
}

}


/* BUTTON PLUGIN DEFINITION
* ======================== */

$.fn.button = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}

$.fn.button.defaults = {
loadingText: 'loading...'
}

$.fn.button.Constructor = Button


/* BUTTON DATA-API
* =============== */

$(function () {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
$(e.target).button('toggle')
})
})

}( window.jQuery )

0 comments on commit 76a6236

Please sign in to comment.