Permalink
Browse files

Initial Commit

  • Loading branch information...
1 parent 275e4d8 commit 4b169b02fb1c2b699548345a1db38634119e937c @Jarred-Sumner Jarred-Sumner committed Oct 11, 2012
Showing with 2,274 additions and 18 deletions.
  1. +17 −14 .gitignore
  2. +30 −0 Gemfile
  3. +138 −0 Gemfile.lock
  4. +1 −0 Procfile
  5. +0 −4 README.md
  6. +66 −0 README.rdoc
  7. +7 −0 Rakefile
  8. BIN app/assets/images/1-background.png
  9. BIN app/assets/images/2-background.png
  10. BIN app/assets/images/3-background.png
  11. BIN app/assets/images/4-background.png
  12. BIN app/assets/images/background.png
  13. BIN app/assets/images/bullet.png
  14. BIN app/assets/images/rails.png
  15. +19 −0 app/assets/javascripts/application.js
  16. +6 −0 app/assets/javascripts/jquery.details.js
  17. +10 −0 app/assets/javascripts/jquery.textchange.js
  18. +28 −0 app/assets/javascripts/preorder.js.coffee
  19. +14 −0 app/assets/stylesheets/application.css
  20. +48 −0 app/assets/stylesheets/checkout.css.scss
  21. +23 −0 app/assets/stylesheets/footer.css.scss
  22. +19 −0 app/assets/stylesheets/header.css.scss
  23. +33 −0 app/assets/stylesheets/homepage.css.scss
  24. +56 −0 app/assets/stylesheets/homepage/call_to_action.css.scss
  25. +21 −0 app/assets/stylesheets/homepage/faq.css.scss
  26. +50 −0 app/assets/stylesheets/homepage/key_points.css.scss
  27. +28 −0 app/assets/stylesheets/homepage/other_points.css.scss
  28. +47 −0 app/assets/stylesheets/homepage/press.css.scss
  29. +96 −0 app/assets/stylesheets/homepage/stats.css.scss
  30. +8 −0 app/assets/stylesheets/main.css.scss
  31. 0 app/assets/stylesheets/preorder.css.scss
  32. +232 −0 app/assets/stylesheets/primitives.css.scss
  33. +48 −0 app/assets/stylesheets/reset.css
  34. +50 −0 app/assets/stylesheets/share.css.scss
  35. +63 −0 app/assets/stylesheets/variables.css.scss
  36. +3 −0 app/controllers/application_controller.rb
  37. +42 −0 app/controllers/preorder_controller.rb
  38. +2 −0 app/helpers/application_helper.rb
  39. +17 −0 app/helpers/preorder_helper.rb
  40. 0 app/mailers/.gitkeep
  41. 0 app/models/.gitkeep
  42. +68 −0 app/models/order.rb
  43. +4 −0 app/models/user.rb
  44. +22 −0 app/views/layouts/_footer.html.erb
  45. +14 −0 app/views/layouts/application.html.erb
  46. +1 −0 app/views/preorder/_copyright.html.erb
  47. +6 −0 app/views/preorder/_footer.html.erb
  48. +13 −0 app/views/preorder/_google_analytics.html.erb
  49. +5 −0 app/views/preorder/_header.html.erb
  50. +20 −0 app/views/preorder/checkout.html.erb
  51. +6 −0 app/views/preorder/checkout/_sidebar.html.erb
  52. +71 −0 app/views/preorder/homepage/_faqs.html.erb
  53. +51 −0 app/views/preorder/homepage/_key_points.html.erb
  54. +6 −0 app/views/preorder/homepage/_middle_reserve.html.erb
  55. +20 −0 app/views/preorder/homepage/_other_points.html.erb
  56. +8 −0 app/views/preorder/homepage/_press.html.erb
  57. +4 −0 app/views/preorder/homepage/_show_dont_tell.html.erb
  58. +53 −0 app/views/preorder/homepage/_stats.html.erb
  59. +3 −0 app/views/preorder/homepage/_value_proposition.html.erb
  60. +6 −0 app/views/preorder/index.html.erb
  61. +26 −0 app/views/preorder/share.html.erb
  62. +8 −0 app/views/preorder/share/_facebook_js.html.erb
  63. +1 −0 app/views/preorder/share/_twitter_js.html.erb
  64. +4 −0 config.ru
  65. +24 −0 config/application.rb
  66. +6 −0 config/boot.rb
  67. +25 −0 config/database.yml
  68. +5 −0 config/environment.rb
  69. +37 −0 config/environments/development.rb
  70. +67 −0 config/environments/production.rb
  71. +37 −0 config/environments/test.rb
  72. +3 −0 config/initializers/amazon_flexible_payments.rb
  73. +7 −0 config/initializers/backtrace_silencers.rb
  74. +15 −0 config/initializers/inflections.rb
  75. +5 −0 config/initializers/mime_types.rb
  76. +3 −0 config/initializers/rails_config.rb
  77. +7 −0 config/initializers/secret_token.rb
  78. +8 −0 config/initializers/session_store.rb
  79. +14 −0 config/initializers/wrap_parameters.rb
  80. +5 −0 config/locales/en.yml
  81. +11 −0 config/routes.rb
  82. +80 −0 config/settings.yml
  83. 0 config/settings/development.yml
  84. 0 config/settings/production.yml
  85. 0 config/settings/test.yml
  86. +9 −0 db/migrate/20121004072615_create_users.rb
  87. +26 −0 db/migrate/20121004072706_create_orders.rb
  88. +45 −0 db/schema.rb
  89. +7 −0 db/seeds.rb
  90. +2 −0 doc/README_FOR_APP
  91. 0 lib/assets/.gitkeep
  92. 0 lib/tasks/.gitkeep
  93. 0 log/.gitkeep
  94. +26 −0 public/404.html
  95. +26 −0 public/422.html
  96. +25 −0 public/500.html
  97. 0 public/favicon.ico
  98. +5 −0 public/robots.txt
  99. +6 −0 script/rails
  100. 0 test/fixtures/.gitkeep
  101. +27 −0 test/fixtures/orders.yml
  102. +7 −0 test/fixtures/users.yml
  103. 0 test/functional/.gitkeep
  104. +19 −0 test/functional/preorder_controller_test.rb
  105. 0 test/integration/.gitkeep
  106. +12 −0 test/performance/browsing_test.rb
  107. +13 −0 test/test_helper.rb
  108. 0 test/unit/.gitkeep
  109. +4 −0 test/unit/helpers/preorder_helper_test.rb
  110. +7 −0 test/unit/order_test.rb
  111. +7 −0 test/unit/user_test.rb
  112. 0 vendor/assets/javascripts/.gitkeep
  113. 0 vendor/assets/stylesheets/.gitkeep
  114. 0 vendor/plugins/.gitkeep
View
@@ -1,16 +1,19 @@
-*.rbc
-*.sassc
-.sass-cache
-capybara-*.html
-.rspec
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
/.bundle
-/vendor/bundle
-/log/*
-/tmp/*
+
+# Ignore the default SQLite database.
/db/*.sqlite3
-/public/system/*
-/coverage/
-/spec/tmp/*
-**.orig
-rerun.txt
-pickle-email-*.html
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
+
+config/settings.local.yml
+config/settings/*.local.yml
+config/environments/*.local.yml
View
30 Gemfile
@@ -0,0 +1,30 @@
+source 'https://rubygems.org'
+
+gem 'rails', '3.2.8'
+
+group :development do
+ gem 'sqlite3'
+end
+
+group :production do
+ gem 'thin'
+ gem 'pg'
+end
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
+ gem 'therubyracer', :platforms => :ruby
+ gem 'uglifier', '>= 1.0.3'
+end
+
+# jQuery
+gem 'jquery-rails'
+
+# Kickstarter's awesome Amazon Flexible Payments gem
+gem 'amazon_flex_pay'
+
+# Configuration File
+gem 'rails_config'
View
@@ -0,0 +1,138 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ amazon_flex_pay (0.9.13)
+ activesupport (>= 3.0.14)
+ multi_xml (~> 0.2.0)
+ rest-client (~> 1.6.1)
+ arel (3.0.2)
+ builder (3.0.3)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.3)
+ daemons (1.1.9)
+ erubis (2.7.0)
+ eventmachine (1.0.0)
+ execjs (1.4.0)
+ multi_json (~> 1.0)
+ foreman (0.60.2)
+ thor (>= 0.13.6)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
+ thor (~> 0.14)
+ json (1.7.5)
+ libv8 (3.3.10.4)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ multi_xml (0.2.2)
+ pg (0.14.1)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
+ bundler (~> 1.0)
+ railties (= 3.2.8)
+ rails_config (0.3.1)
+ activesupport (>= 3.0)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ sass (3.2.1)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.6)
+ therubyracer (0.10.2)
+ libv8 (~> 3.3.10)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ uglifier (1.3.0)
+ execjs (>= 0.3.0)
+ multi_json (~> 1.0, >= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ amazon_flex_pay
+ coffee-rails (~> 3.2.1)
+ foreman
+ jquery-rails
+ pg
+ rails (= 3.2.8)
+ rails_config
+ sass-rails (~> 3.2.3)
+ sqlite3
+ therubyracer
+ thin
+ uglifier (>= 1.0.3)
View
@@ -0,0 +1 @@
+web: bundle exec rails server thin -p $PORT -e $RACK_ENV
View
@@ -1,4 +0,0 @@
-selfstarter
-===========
-
-Roll your own crowdfunding
View
@@ -0,0 +1,66 @@
+# Selfstarter
+Selfstarter makes it easy to roll your own crowdfunding site. To get started, fork this repository and change around ```config/settings.yml``` to suit your needs.
+
+## Background
+
+[Kickstarter rejected us](http://techcrunch.com/2012/10/07/the-story-of-lockitron-crowdfunding-without-kickstarter/), so we made our own crowdfunding for [Lockitron](https://lockitron.com). Feel free to [give us feedback](mailto:hello@lockitron.com)!
+
+Over the past week, a lot of people asked us for help with building their own crowdfunding app. This is it.
+
+Selfstarter is starting point. We made some specific choices with Selfstarter for Lockitron and we recommend you tailor it for your project:
+
+* We use Amazon Payments for payments. You can use Stripe or WePay. We used Kickstarter's awesome ```amazon_flex_pay``` gem.
+* We collect multi-use tokens from customers with Amazon Payments - this let's us collect payment information without charging the customer until we are ready to ship
+* Selfstarter doesn't come with any authentication, administration, mailers or analytics tools. We recommend adding a basic set of these so that you can message backers and manage orders.
+
+## Getting Started
+
+First you'll need to fork and clone this repo
+
+Let's get all our dependencies setup:
+```bash
+bundle install --without production
+```
+
+Now let's create the database:
+```bash
+rake db:migrate
+```
+
+Let's get it running:
+```bash
+rails s
+```
+
+### Customizing
+
+While it is *just* a skeleton, we did make it a little quicker to change around things like your product name, the colors, pricing, etc.
+
+To change around the product name, tweet text, and more, open this file:
+
+```
+config/settings.yml
+```
+
+To change around the colors and fonts, open this file:
+
+```
+app/assets/stylesheets/variables.css.scss
+```
+
+To dive into the code, open this file:
+
+```
+app/controllers/preorder_controller.rb
+```
+
+### Deploying to Production
+
+We recommend using Heroku, and we even include a ```Procfile``` for you. All you need to do is run:
+
+```bash
+gem install heroku
+heroku create
+git push heroku master
+heroku run rake db:migrate
+```
View
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Selfstarter::Application.load_tasks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,19 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
+// GO AFTER THE REQUIRES BELOW.
+//
+//= require jquery
+//= require jquery_ujs
+//= require jquery-ui
+//= require jquery.details
+//= require jquery.textchange
+//= require preorder
+//= require_tree .

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,28 @@
+Selfstarter =
+ firstTime: true
+ validateEmail: ->
+ # The regex we use for validating email
+ # It probably should be a parser, but there isn't enough time for that (Maybe in the future though!)
+ if /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/.test($("#email").val())
+ $("#email").removeClass("highlight")
+ $("#amazon_button").removeClass("disabled")
+ else
+ $("#email").addClass("highlight") unless Selfstarter.firstTime
+ $("#amazon_button").addClass("disabled") unless $("#amazon_button").hasClass("disabled")
+ init: ->
+ $("#email").bind "textchange", ->
+ Selfstarter.validateEmail()
+ $("#email").bind "hastext", ->
+ Selfstarter.validateEmail()
+ # The first time they type in their email, we don't want it to throw a validation error
+ $("#email").change ->
+ Selfstarter.firstTime = false
+$ ->
+ Selfstarter.init()
+ $("#email").focus()
+
+
+
+
+
+
@@ -0,0 +1,14 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require reset
+ *= require main
+ */
Oops, something went wrong.

0 comments on commit 4b169b0

Please sign in to comment.