├── .gitignore ├── assets ├── .travis.yml ├── docs │ ├── assets │ │ ├── img │ │ │ ├── bird.png │ │ │ ├── browsers.png │ │ │ ├── icon-css3.png │ │ │ ├── icon-html5.png │ │ │ ├── less-small.png │ │ │ ├── github-16px.png │ │ │ ├── icon-github.png │ │ │ ├── icon-twitter.png │ │ │ ├── less-logo-large.png │ │ │ ├── grid-18px-masked.png │ │ │ ├── example-sites │ │ │ │ ├── jshint.png │ │ │ │ ├── kippt.png │ │ │ │ ├── fleetio.png │ │ │ │ └── soundready.png │ │ │ ├── glyphicons-halflings.png │ │ │ ├── bootstrap-mdo-sfmoma-01.jpg │ │ │ ├── bootstrap-mdo-sfmoma-02.jpg │ │ │ ├── bootstrap-mdo-sfmoma-03.jpg │ │ │ ├── responsive-illustrations.png │ │ │ ├── glyphicons-halflings-white.png │ │ │ ├── examples │ │ │ │ ├── bootstrap-example-fluid.jpg │ │ │ │ ├── bootstrap-example-hero.jpg │ │ │ │ └── bootstrap-example-starter.jpg │ │ │ └── glyphicons │ │ │ │ ├── glyphicons_009_magic.png │ │ │ │ ├── glyphicons_042_group.png │ │ │ │ ├── glyphicons_079_podium.png │ │ │ │ ├── glyphicons_163_iphone.png │ │ │ │ ├── glyphicons_266_book_open.png │ │ │ │ ├── glyphicons_082_roundabout.png │ │ │ │ ├── glyphicons_214_resize_small.png │ │ │ │ └── glyphicons_155_show_thumbnails.png │ │ ├── ico │ │ │ ├── favicon.ico │ │ │ ├── apple-touch-icon-114-precomposed.png │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ ├── apple-touch-icon-57-precomposed.png │ │ │ └── apple-touch-icon-72-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 │ │ │ ├── bootstrap-tab.js │ │ │ ├── bootstrap-scrollspy.js │ │ │ └── bootstrap-collapse.js │ ├── 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 │ ├── tooltip.less │ ├── tests │ │ ├── css-tests.css │ │ ├── navbar.html │ │ └── forms.html │ ├── 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 │ ├── responsive-navbar.less │ ├── type.less │ ├── tables.less │ └── buttons.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 │ │ │ └── bootstrap-modal.js │ │ ├── index.html │ │ └── phantom.js │ ├── bootstrap-transition.js │ ├── bootstrap-alert.js │ ├── bootstrap-button.js │ ├── bootstrap-dropdown.js │ ├── bootstrap-popover.js │ ├── bootstrap-tab.js │ ├── README.md │ ├── bootstrap-scrollspy.js │ └── bootstrap-collapse.js ├── .gitignore ├── package.json ├── css │ └── pygments.css ├── Makefile └── README.md ├── Rakefile ├── workers ├── email_worker.worker ├── schedule_lead_worker.rb ├── schedule_converted_worker.rb ├── lead_worker.rb ├── email_worker.rb └── converted_worker.rb ├── config.ru ├── models ├── idable.rb ├── contact.rb └── cache_orm.rb ├── Gemfile ├── config_sample.yml ├── views ├── index.erb ├── contacts.erb └── layout.erb ├── test_email.rb ├── config_pusher.rb ├── app.rb ├── controllers └── main.rb ├── README.md ├── Gemfile.lock └── config.rb /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | config.yml 3 | iron.json 4 | -------------------------------------------------------------------------------- /assets/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | task :push_config do 2 | require_relative 'config_pusher' 3 | cp = ConfigPusher.new 4 | cp.push 5 | end 6 | -------------------------------------------------------------------------------- /workers/email_worker.worker: -------------------------------------------------------------------------------- 1 | runtime "ruby" 2 | exec "email_worker.rb" 3 | gem "mail" 4 | gem "rest" 5 | gem "iron_cache" 6 | -------------------------------------------------------------------------------- /assets/docs/assets/img/bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/bird.png -------------------------------------------------------------------------------- /assets/docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /assets/docs/assets/img/browsers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/browsers.png -------------------------------------------------------------------------------- /assets/docs/assets/img/icon-css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/icon-css3.png -------------------------------------------------------------------------------- /assets/docs/assets/img/icon-html5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/icon-html5.png -------------------------------------------------------------------------------- /assets/docs/assets/img/less-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/less-small.png -------------------------------------------------------------------------------- /assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /assets/docs/assets/img/github-16px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/github-16px.png -------------------------------------------------------------------------------- /assets/docs/assets/img/icon-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/icon-github.png -------------------------------------------------------------------------------- /assets/docs/assets/img/icon-twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/icon-twitter.png -------------------------------------------------------------------------------- /assets/docs/assets/img/less-logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/less-logo-large.png -------------------------------------------------------------------------------- /assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /assets/docs/assets/img/grid-18px-masked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/grid-18px-masked.png -------------------------------------------------------------------------------- /assets/docs/assets/img/example-sites/jshint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/example-sites/jshint.png -------------------------------------------------------------------------------- /assets/docs/assets/img/example-sites/kippt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/example-sites/kippt.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /assets/docs/assets/img/example-sites/fleetio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/example-sites/fleetio.png -------------------------------------------------------------------------------- /assets/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/example-sites/soundready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/example-sites/soundready.png -------------------------------------------------------------------------------- /assets/docs/assets/img/responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/responsive-illustrations.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /assets/less/grid.less: -------------------------------------------------------------------------------- 1 | // Fixed (940px) 2 | #grid > .core(@gridColumnWidth, @gridGutterWidth); 3 | 4 | // Fluid (940px) 5 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); -------------------------------------------------------------------------------- /assets/docs/assets/ico/apple-touch-icon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/ico/apple-touch-icon-114-precomposed.png -------------------------------------------------------------------------------- /assets/docs/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /assets/docs/assets/ico/apple-touch-icon-57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/ico/apple-touch-icon-57-precomposed.png -------------------------------------------------------------------------------- /assets/docs/assets/ico/apple-touch-icon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/ico/apple-touch-icon-72-precomposed.png -------------------------------------------------------------------------------- /assets/docs/assets/img/examples/bootstrap-example-fluid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/examples/bootstrap-example-fluid.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/examples/bootstrap-example-hero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/examples/bootstrap-example-hero.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_009_magic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_009_magic.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_042_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_042_group.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_079_podium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_079_podium.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_163_iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_163_iphone.png -------------------------------------------------------------------------------- /assets/docs/assets/img/examples/bootstrap-example-starter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/examples/bootstrap-example-starter.jpg -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_266_book_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_266_book_open.png -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'bundler' 3 | Bundler.require 4 | 5 | $: << File.expand_path(File.dirname(__FILE__)) 6 | 7 | require 'app' 8 | 9 | run Sinatra::Application 10 | -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_082_roundabout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_082_roundabout.png -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_214_resize_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_214_resize_small.png -------------------------------------------------------------------------------- /assets/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-io/heroku_iron_boomi_salesforce/master/assets/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png -------------------------------------------------------------------------------- /models/idable.rb: -------------------------------------------------------------------------------- 1 | require 'uuid' 2 | 3 | module Idable 4 | 5 | def id 6 | @id 7 | end 8 | 9 | def id=(id) 10 | @id = id 11 | end 12 | 13 | def self.generate_id 14 | UUID.new.generate 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /assets/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 | } -------------------------------------------------------------------------------- /models/contact.rb: -------------------------------------------------------------------------------- 1 | class Contact 2 | include Jsonable 3 | include Idable 4 | 5 | attr_accessor :email, 6 | :name, 7 | :company, 8 | :salesforce_id, 9 | :status, 10 | :action, 11 | :result 12 | end 13 | 14 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'http://rubygems.org' 2 | 3 | gem 'sinatra', :require=>'sinatra/base' 4 | 5 | gem 'iron_worker_ng' 6 | gem 'iron_mq' 7 | gem 'iron_cache' 8 | 9 | gem 'rack-flash3' # Fixes issues with new rack 10 | gem 'jsonable' # serializing classes 11 | gem 'uuid' 12 | gem 'rest' 13 | gem 'uber_config' 14 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // COMPONENT ANIMATIONS 2 | // -------------------- 3 | 4 | .fade { 5 | opacity: 0; 6 | .transition(opacity .15s linear); 7 | &.in { 8 | opacity: 1; 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 | } 21 | -------------------------------------------------------------------------------- /assets/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') -------------------------------------------------------------------------------- /config_sample.yml: -------------------------------------------------------------------------------- 1 | # app_name will be used for cache naming and other things 2 | app_name: "irondream.herokuapp.com" 3 | 4 | iron: 5 | token: MY IRON.IO TOKEN 6 | project_id: MY IRON.IO PROJECT ID 7 | 8 | email: 9 | host: smtp.sendgrid.net 10 | domain: YOUR DOMAIN, eg: yourbiz.com 11 | port: 587 12 | username: USERNAME 13 | password: PASS 14 | from: ADDRESS MESSAGES WILL BE SENT FROM 15 | 16 | -------------------------------------------------------------------------------- /assets/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 | } -------------------------------------------------------------------------------- /assets/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 | }) -------------------------------------------------------------------------------- /assets/less/responsive-768px-979px.less: -------------------------------------------------------------------------------- 1 | // PORTRAIT TABLET TO DEFAULT DESKTOP 2 | // ---------------------------------- 3 | 4 | @media (min-width: 768px) and (max-width: 979px) { 5 | 6 | // Fixed grid 7 | #grid > .core(42px, 20px); 8 | 9 | // Fluid grid 10 | #grid > .fluid(5.801104972%, 2.762430939%); 11 | 12 | // Input grid 13 | #grid > .input(42px, 20px); 14 | 15 | // No need to reset .thumbnails here since it's the same @gridGutterWidth 16 | 17 | } 18 | -------------------------------------------------------------------------------- /views/index.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Welcome

4 | 5 |

6 | Please fill out the form below. 7 |

8 | 9 |
10 | Name
11 |
12 |
13 | Company
14 |
15 |
16 | Email
17 |
18 |
19 | 20 |
21 |
22 | 23 | -------------------------------------------------------------------------------- /test_email.rb: -------------------------------------------------------------------------------- 1 | require_relative 'config.rb' 2 | 3 | iw = IronWorkerNG::Client.new 4 | task = iw.tasks.create("email_worker", 5 | SingletonConfig.config.merge( 6 | to: "treeder@gmail.com", 7 | subject: "Thanks for the Lead!", 8 | body: "Thanks again for the lead" 9 | 10 | )) 11 | status = iw.tasks.wait_for(task.id) 12 | p status 13 | puts status.msg 14 | puts iw.tasks.log(task.id) 15 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- 1 | # Numerous always-ignore extensions 2 | *.diff 3 | *.err 4 | *.orig 5 | *.log 6 | *.rej 7 | *.swo 8 | *.swp 9 | *.zip 10 | *.vi 11 | *~ 12 | *.sass-cache 13 | 14 | # OS or Editor folders 15 | .DS_Store 16 | ._* 17 | Thumbs.db 18 | .cache 19 | .project 20 | .settings 21 | .tmproj 22 | *.esproj 23 | nbproject 24 | *.sublime-project 25 | *.sublime-workspace 26 | 27 | # Komodo 28 | *.komodoproject 29 | .komodotools 30 | 31 | # Folders to ignore 32 | .hg 33 | .svn 34 | .CVS 35 | .idea 36 | node_modules 37 | -------------------------------------------------------------------------------- /assets/less/hero-unit.less: -------------------------------------------------------------------------------- 1 | // HERO UNIT 2 | // --------- 3 | 4 | .hero-unit { 5 | padding: 60px; 6 | margin-bottom: 30px; 7 | background-color: @heroUnitBackground; 8 | .border-radius(6px); 9 | h1 { 10 | margin-bottom: 0; 11 | font-size: 60px; 12 | line-height: 1; 13 | color: @heroUnitHeadingColor; 14 | letter-spacing: -1px; 15 | } 16 | p { 17 | font-size: 18px; 18 | font-weight: 200; 19 | line-height: @baseLineHeight * 1.5; 20 | color: @heroUnitLeadColor; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /assets/less/responsive-1200px-min.less: -------------------------------------------------------------------------------- 1 | // LARGE DESKTOP & UP 2 | // ------------------ 3 | 4 | @media (min-width: 1200px) { 5 | 6 | // Fixed grid 7 | #grid > .core(70px, 30px); 8 | 9 | // Fluid grid 10 | #grid > .fluid(5.982905983%, 2.564102564%); 11 | 12 | // Input grid 13 | #grid > .input(70px, 30px); 14 | 15 | // Thumbnails 16 | .thumbnails { 17 | margin-left: -30px; 18 | } 19 | .thumbnails > li { 20 | margin-left: 30px; 21 | } 22 | .row-fluid .thumbnails { 23 | margin-left: 0; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /config_pusher.rb: -------------------------------------------------------------------------------- 1 | require 'iron_cache' 2 | require 'uber_config' 3 | require 'yaml' 4 | require 'open-uri' 5 | 6 | class ConfigPusher 7 | def push 8 | 9 | @config = UberConfig.load 10 | puts @config.to_yaml 11 | 12 | c = IronCache::Client.new 13 | cache = c.cache("configs") 14 | item = cache.put(@config['app_name'], @config.to_yaml) 15 | p item 16 | 17 | url = cache.url(@config['app_name']) 18 | puts "url: #{url}" 19 | url_with_token = url + "?oauth=#{c.token}" 20 | puts url_with_token 21 | 22 | 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /assets/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // BREADCRUMBS 2 | // ----------- 3 | 4 | .breadcrumb { 5 | padding: 7px 14px; 6 | margin: 0 0 @baseLineHeight; 7 | list-style: none; 8 | #gradient > .vertical(@white, #f5f5f5); 9 | border: 1px solid #ddd; 10 | .border-radius(3px); 11 | .box-shadow(inset 0 1px 0 @white); 12 | li { 13 | display: inline-block; 14 | .ie7-inline-block(); 15 | text-shadow: 0 1px 0 @white; 16 | } 17 | .divider { 18 | padding: 0 5px; 19 | color: @grayLight; 20 | } 21 | .active a { 22 | color: @grayDark; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /assets/less/wells.less: -------------------------------------------------------------------------------- 1 | // WELLS 2 | // ----- 3 | 4 | .well { 5 | min-height: 20px; 6 | padding: 19px; 7 | margin-bottom: 20px; 8 | background-color: #f5f5f5; 9 | border: 1px solid #eee; 10 | border: 1px solid rgba(0,0,0,.05); 11 | .border-radius(4px); 12 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 13 | blockquote { 14 | border-color: #ddd; 15 | border-color: rgba(0,0,0,.15); 16 | } 17 | } 18 | 19 | // Sizes 20 | .well-large { 21 | padding: 24px; 22 | .border-radius(6px); 23 | } 24 | .well-small { 25 | padding: 9px; 26 | .border-radius(3px); 27 | } 28 | -------------------------------------------------------------------------------- /assets/less/scaffolding.less: -------------------------------------------------------------------------------- 1 | // Scaffolding 2 | // Basic and global styles for generating a grid system, structural layout, and page templates 3 | // ------------------------------------------------------------------------------------------- 4 | 5 | 6 | // Body reset 7 | // ---------- 8 | 9 | body { 10 | margin: 0; 11 | font-family: @baseFontFamily; 12 | font-size: @baseFontSize; 13 | line-height: @baseLineHeight; 14 | color: @textColor; 15 | background-color: @bodyBackground; 16 | } 17 | 18 | 19 | // Links 20 | // ----- 21 | 22 | a { 23 | color: @linkColor; 24 | text-decoration: none; 25 | } 26 | a:hover { 27 | color: @linkColorHover; 28 | text-decoration: underline; 29 | } 30 | -------------------------------------------------------------------------------- /workers/schedule_lead_worker.rb: -------------------------------------------------------------------------------- 1 | require 'iron_worker' 2 | require 'time' 3 | require_relative '../config' 4 | require_relative 'lead_worker' 5 | 6 | IronWorker.logger.level = Logger::DEBUG 7 | 8 | IronWorker.configure do |iwc| 9 | iwc.token = @config["iron"]["token"] 10 | iwc.project_id = @config["iron"]["project_id"] 11 | end 12 | 13 | worker = LeadWorker.new 14 | worker.iron_project_id = @config['iron']['project_id'] 15 | worker.iron_token = @config['iron']['token'] 16 | worker.mongodb_uri = @config['mongo']['uri'] 17 | worker.mongodb_database = @config['mongo']['database'] 18 | 19 | worker.run_local 20 | #worker.queue 21 | #worker.upload 22 | #worker.schedule(:start_at=>Time.now.iso8601, :run_every=>600) 23 | -------------------------------------------------------------------------------- /assets/less/close.less: -------------------------------------------------------------------------------- 1 | // CLOSE ICONS 2 | // ----------- 3 | 4 | .close { 5 | float: right; 6 | font-size: 20px; 7 | font-weight: bold; 8 | line-height: @baseLineHeight; 9 | color: @black; 10 | text-shadow: 0 1px 0 rgba(255,255,255,1); 11 | .opacity(20); 12 | &:hover { 13 | color: @black; 14 | text-decoration: none; 15 | cursor: pointer; 16 | .opacity(40); 17 | } 18 | } 19 | 20 | // Additional properties for button version 21 | // iOS requires the button element instead of an anchor tag. 22 | // If you want the anchor version, it requires `href="#"`. 23 | button.close { 24 | padding: 0; 25 | cursor: pointer; 26 | background: transparent; 27 | border: 0; 28 | -webkit-appearance: none; 29 | } -------------------------------------------------------------------------------- /workers/schedule_converted_worker.rb: -------------------------------------------------------------------------------- 1 | require 'iron_worker' 2 | require 'time' 3 | require_relative '../config' 4 | require_relative 'converted_worker' 5 | 6 | IronWorker.logger.level = Logger::DEBUG 7 | 8 | IronWorker.configure do |iwc| 9 | iwc.token = @config["iron"]["token"] 10 | iwc.project_id = @config["iron"]["project_id"] 11 | end 12 | 13 | worker = ConvertedWorker.new 14 | worker.iron_project_id = @config['iron']['project_id'] 15 | worker.iron_token = @config['iron']['token'] 16 | worker.mongodb_uri = @config['mongo']['uri'] 17 | worker.mongodb_database = @config['mongo']['database'] 18 | 19 | worker.run_local 20 | #worker.queue 21 | #worker.upload 22 | #worker.schedule(:start_at=>Time.now.iso8601, :run_every=>600) 23 | -------------------------------------------------------------------------------- /assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap" 3 | , "description": "HTML, CSS, and JS toolkit from Twitter." 4 | , "version": "2.0.4" 5 | , "keywords": ["bootstrap", "css"] 6 | , "homepage": "http://twitter.github.com/bootstrap/" 7 | , "author": "Twitter Inc." 8 | , "scripts": { "test": "make test" } 9 | , "repository": { 10 | "type": "git" 11 | , "url": "https://github.com/twitter/bootstrap.git" 12 | } 13 | , "licenses": [ 14 | { 15 | "type": "Apache-2.0" 16 | , "url": "http://www.apache.org/licenses/LICENSE-2.0" 17 | } 18 | ] 19 | , "devDependencies": { 20 | "uglify-js": "1.2.6" 21 | , "jshint": "0.6.1" 22 | , "recess": "1.0.3" 23 | , "connect": "2.1.3" 24 | } 25 | } -------------------------------------------------------------------------------- /assets/less/pager.less: -------------------------------------------------------------------------------- 1 | // PAGER 2 | // ----- 3 | 4 | .pager { 5 | margin-left: 0; 6 | margin-bottom: @baseLineHeight; 7 | list-style: none; 8 | text-align: center; 9 | .clearfix(); 10 | } 11 | .pager li { 12 | display: inline; 13 | } 14 | .pager a { 15 | display: inline-block; 16 | padding: 5px 14px; 17 | background-color: #fff; 18 | border: 1px solid #ddd; 19 | .border-radius(15px); 20 | } 21 | .pager a:hover { 22 | text-decoration: none; 23 | background-color: #f5f5f5; 24 | } 25 | .pager .next a { 26 | float: right; 27 | } 28 | .pager .previous a { 29 | float: left; 30 | } 31 | .pager .disabled a, 32 | .pager .disabled a:hover { 33 | color: @grayLight; 34 | background-color: #fff; 35 | cursor: default; 36 | } -------------------------------------------------------------------------------- /assets/less/accordion.less: -------------------------------------------------------------------------------- 1 | // ACCORDION 2 | // --------- 3 | 4 | 5 | // Parent container 6 | .accordion { 7 | margin-bottom: @baseLineHeight; 8 | } 9 | 10 | // Group == heading + body 11 | .accordion-group { 12 | margin-bottom: 2px; 13 | border: 1px solid #e5e5e5; 14 | .border-radius(4px); 15 | } 16 | .accordion-heading { 17 | border-bottom: 0; 18 | } 19 | .accordion-heading .accordion-toggle { 20 | display: block; 21 | padding: 8px 15px; 22 | } 23 | 24 | // General toggle styles 25 | .accordion-toggle { 26 | cursor: pointer; 27 | } 28 | 29 | // Inner needs the styles because you can't animate properly with any styles on the element 30 | .accordion-inner { 31 | padding: 9px 15px; 32 | border-top: 1px solid #e5e5e5; 33 | } 34 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | require 'iron_worker_ng' 3 | require 'iron_mq' 4 | require 'iron_cache' 5 | require 'yaml' 6 | require 'uuid' 7 | require 'rack-flash' 8 | require 'sinatra/base' 9 | 10 | # bump. 11 | 12 | enable :sessions 13 | use Rack::Flash 14 | 15 | set :public_folder, File.expand_path(File.dirname(__FILE__) + '/assets') 16 | 17 | $: << '.' 18 | require 'config' 19 | 20 | ironmq = IronMQ::Client.new 21 | #ironmq.logger.level = Logger::DEBUG 22 | ironcache = IronCache::Client.new 23 | set :ironmq, ironmq 24 | set :ironcache, ironcache 25 | 26 | require_relative 'models/cache_orm' 27 | orm = CacheOrm.new(ironcache.cache("leads")) 28 | set :orm, orm 29 | 30 | require_relative 'models/idable' 31 | require_relative 'models/contact' 32 | 33 | require_relative 'controllers/main' 34 | 35 | -------------------------------------------------------------------------------- /assets/js/tests/unit/bootstrap-phantom.js: -------------------------------------------------------------------------------- 1 | // Logging setup for phantom integration 2 | // adapted from Modernizr 3 | 4 | QUnit.begin = function () { 5 | console.log("Starting test suite") 6 | console.log("================================================\n") 7 | } 8 | 9 | QUnit.moduleDone = function (opts) { 10 | if (opts.failed === 0) { 11 | console.log("\u2714 All tests passed in '" + opts.name + "' module") 12 | } else { 13 | console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module") 14 | } 15 | } 16 | 17 | QUnit.done = function (opts) { 18 | console.log("\n================================================") 19 | console.log("Tests completed in " + opts.runtime + " milliseconds") 20 | console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.") 21 | } -------------------------------------------------------------------------------- /controllers/main.rb: -------------------------------------------------------------------------------- 1 | 2 | post '/lead' do 3 | puts 'in lead' 4 | lead = Contact.new 5 | lead.name = params[:name] 6 | lead.email = params[:email] 7 | lead.company = params[:company] 8 | #lead.save! 9 | settings.orm.save(lead) 10 | puts "Saved lead: " + lead.inspect 11 | 12 | settings.orm.add_to_list("lead_list", lead) 13 | 14 | msg = { 15 | 'id'=>lead.id.to_s, 16 | 'name'=>lead.name, 17 | 'email'=>lead.email, 18 | 'company'=>lead.company 19 | } 20 | puts "Putting message on queue: " + msg.inspect 21 | 22 | settings.ironmq.messages.post(msg.to_json, :queue_name=>'lead') 23 | 24 | flash[:notice] = "Submitted, thank you!" 25 | 26 | redirect "/" 27 | end 28 | 29 | get '/leads' do 30 | @contacts = settings.orm.get_list("lead_list") 31 | erb :contacts 32 | end 33 | 34 | get '*' do 35 | erb :index 36 | end 37 | -------------------------------------------------------------------------------- /views/contacts.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Contacts 5 | 6 | 7 | 8 | 9 |
10 | 11 |

Contacts

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | <% @contacts.each do |c| %> 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | <% end %> 36 | 37 |
IDNameEmailCompanyActionToStatusSalesforce ID
<%= c.id %><%= c.name %><%= c.email %><%= c.company %><%= c.action %><%= c.result %><%= c.status %><%= c.salesforce_id %>
38 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /assets/js/tests/unit/bootstrap-carousel.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module("bootstrap-carousel") 4 | 5 | test("should be defined on jquery object", function () { 6 | ok($(document.body).carousel, 'carousel method is defined') 7 | }) 8 | 9 | test("should return element", function () { 10 | ok($(document.body).carousel()[0] == document.body, 'document.body returned') 11 | }) 12 | 13 | test("should not fire sliden when slide is prevented", function () { 14 | $.support.transition = false 15 | stop(); 16 | $('