mirror of
https://github.com/apigy/selfstarter.git
synced 2026-01-09 14:27:55 -05:00
Initial Commit
This commit is contained in:
24
config/application.rb
Normal file
24
config/application.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails/all'
|
||||
|
||||
if defined?(Bundler)
|
||||
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
||||
end
|
||||
|
||||
module Selfstarter
|
||||
|
||||
class Application < Rails::Application
|
||||
|
||||
# --- Standard Rails Config ---
|
||||
config.time_zone = 'Pacific Time (US & Canada)'
|
||||
config.encoding = "utf-8"
|
||||
config.filter_parameters += [:password]
|
||||
config.active_record.whitelist_attributes = true
|
||||
# Enable the asset pipeline
|
||||
config.assets.enabled = true
|
||||
# Version of your assets, change this if you want to expire all your assets
|
||||
config.assets.version = '1.0'
|
||||
# --- Standard Rails Config ---
|
||||
end
|
||||
end
|
||||
6
config/boot.rb
Normal file
6
config/boot.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
require 'rubygems'
|
||||
|
||||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
||||
25
config/database.yml
Normal file
25
config/database.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
# SQLite version 3.x
|
||||
# gem install sqlite3
|
||||
#
|
||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# gem 'sqlite3'
|
||||
development:
|
||||
adapter: sqlite3
|
||||
database: db/development.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
adapter: sqlite3
|
||||
database: db/test.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
production:
|
||||
adapter: sqlite3
|
||||
database: db/production.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
5
config/environment.rb
Normal file
5
config/environment.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# Load the rails application
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the rails application
|
||||
Selfstarter::Application.initialize!
|
||||
37
config/environments/development.rb
Normal file
37
config/environments/development.rb
Normal file
@@ -0,0 +1,37 @@
|
||||
Selfstarter::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# In the development environment your application's code is reloaded on
|
||||
# every request. This slows down response time but is perfect for development
|
||||
# since you don't have to restart the web server when you make code changes.
|
||||
config.cache_classes = false
|
||||
|
||||
# Log error messages when you accidentally call methods on nil.
|
||||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Print deprecation notices to the Rails logger
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Only use best-standards-support built into browsers
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
# Raise exception on mass assignment protection for Active Record models
|
||||
config.active_record.mass_assignment_sanitizer = :strict
|
||||
|
||||
# Log the query plan for queries taking more than this (works
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
|
||||
# Do not compress assets
|
||||
config.assets.compress = false
|
||||
|
||||
# Expands the lines which load the assets
|
||||
config.assets.debug = true
|
||||
end
|
||||
67
config/environments/production.rb
Normal file
67
config/environments/production.rb
Normal file
@@ -0,0 +1,67 @@
|
||||
Selfstarter::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests
|
||||
config.cache_classes = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on
|
||||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||
config.serve_static_assets = false
|
||||
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
|
||||
# Don't fallback to assets pipeline if a precompiled asset is missed
|
||||
config.assets.compile = false
|
||||
|
||||
# Generate digests for assets URLs
|
||||
config.assets.digest = true
|
||||
|
||||
# Defaults to nil and saved in location specified by config.assets.prefix
|
||||
# config.assets.manifest = YOUR_PATH
|
||||
|
||||
# Specifies the header that your server uses for sending files
|
||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
# config.force_ssl = true
|
||||
|
||||
# See everything in the log (default is :info)
|
||||
# config.log_level = :debug
|
||||
|
||||
# Prepend all log lines with the following tags
|
||||
# config.log_tags = [ :subdomain, :uuid ]
|
||||
|
||||
# Use a different logger for distributed setups
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||
|
||||
# Use a different cache store in production
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||
config.assets.precompile += %w( application.js application.css )
|
||||
|
||||
# Disable delivery errors, bad email addresses will be ignored
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable threaded mode
|
||||
# config.threadsafe!
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation can not be found)
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# Log the query plan for queries taking more than this (works
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
end
|
||||
37
config/environments/test.rb
Normal file
37
config/environments/test.rb
Normal file
@@ -0,0 +1,37 @@
|
||||
Selfstarter::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# The test environment is used exclusively to run your application's
|
||||
# test suite. You never need to work with it otherwise. Remember that
|
||||
# your test database is "scratch space" for the test suite and is wiped
|
||||
# and recreated between test runs. Don't rely on the data there!
|
||||
config.cache_classes = true
|
||||
|
||||
# Configure static asset server for tests with Cache-Control for performance
|
||||
config.serve_static_assets = true
|
||||
config.static_cache_control = "public, max-age=3600"
|
||||
|
||||
# Log error messages when you accidentally call methods on nil
|
||||
config.whiny_nils = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Raise exceptions instead of rendering exception templates
|
||||
config.action_dispatch.show_exceptions = false
|
||||
|
||||
# Disable request forgery protection in test environment
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
# Tell Action Mailer not to deliver emails to the real world.
|
||||
# The :test delivery method accumulates sent emails in the
|
||||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
# Raise exception on mass assignment protection for Active Record models
|
||||
config.active_record.mass_assignment_sanitizer = :strict
|
||||
|
||||
# Print deprecation notices to the stderr
|
||||
config.active_support.deprecation = :stderr
|
||||
end
|
||||
3
config/initializers/amazon_flexible_payments.rb
Normal file
3
config/initializers/amazon_flexible_payments.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
AmazonFlexPay.access_key = Settings.amazon_access_key
|
||||
AmazonFlexPay.secret_key = Settings.amazon_secret_key
|
||||
AmazonFlexPay.go_live! if Rails.env.production?
|
||||
7
config/initializers/backtrace_silencers.rb
Normal file
7
config/initializers/backtrace_silencers.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||
|
||||
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
||||
# Rails.backtrace_cleaner.remove_silencers!
|
||||
15
config/initializers/inflections.rb
Normal file
15
config/initializers/inflections.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
# (all these examples are active by default):
|
||||
# ActiveSupport::Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
||||
#
|
||||
# These inflection rules are supported but not enabled by default:
|
||||
# ActiveSupport::Inflector.inflections do |inflect|
|
||||
# inflect.acronym 'RESTful'
|
||||
# end
|
||||
5
config/initializers/mime_types.rb
Normal file
5
config/initializers/mime_types.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
# Mime::Type.register_alias "text/html", :iphone
|
||||
3
config/initializers/rails_config.rb
Normal file
3
config/initializers/rails_config.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
RailsConfig.setup do |config|
|
||||
config.const_name = "Settings"
|
||||
end
|
||||
7
config/initializers/secret_token.rb
Normal file
7
config/initializers/secret_token.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Your secret key for verifying the integrity of signed cookies.
|
||||
# If you change this key, all old signed cookies will become invalid!
|
||||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
Selfstarter::Application.config.secret_token = '686a073cf783e29dee02cb7544762d17a7c769acf7baa148a0d9726a39e45123532418f9ce7cd3def2ca0e3d5bff9d0b9ffd41f19b0c6b6dd9d0cc10b77fc5ae'
|
||||
8
config/initializers/session_store.rb
Normal file
8
config/initializers/session_store.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Selfstarter::Application.config.session_store :cookie_store, key: '_Selfstarter_session'
|
||||
|
||||
# Use the database for sessions instead of the cookie-based default,
|
||||
# which shouldn't be used to store highly confidential information
|
||||
# (create the session table with "rails generate session_migration")
|
||||
# Selfstarter::Application.config.session_store :active_record_store
|
||||
14
config/initializers/wrap_parameters.rb
Normal file
14
config/initializers/wrap_parameters.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains settings for ActionController::ParamsWrapper which
|
||||
# is enabled by default.
|
||||
|
||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
wrap_parameters format: [:json]
|
||||
end
|
||||
|
||||
# Disable root element in JSON by default.
|
||||
ActiveSupport.on_load(:active_record) do
|
||||
self.include_root_in_json = false
|
||||
end
|
||||
5
config/locales/en.yml
Normal file
5
config/locales/en.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# Sample localization file for English. Add more files in this directory for other locales.
|
||||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
||||
11
config/routes.rb
Normal file
11
config/routes.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
Selfstarter::Application.routes.draw do
|
||||
root :to => "preorder#index"
|
||||
|
||||
match '/preorder' => 'preorder#index'
|
||||
get "preorder/checkout"
|
||||
match '/preorder/share/:uuid' => 'preorder#share', :via => :get
|
||||
match '/preorder/ipn' => 'preorder#ipn', :via => :post
|
||||
match '/preorder/prefill' => 'preorder#prefill'
|
||||
match '/preorder/postfill' => 'preorder#postfill'
|
||||
|
||||
end
|
||||
80
config/settings.yml
Normal file
80
config/settings.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
# Hi there!
|
||||
# These are the settings for Selfstarter.
|
||||
# This is more tidy than changing the HTML if all you want to do is rename things and swap out images
|
||||
|
||||
# You should totally change the HTML and CSS though
|
||||
# Checkout app/assets/stylesheets/variables.css.scss to change around the CSS quickly
|
||||
|
||||
# Set your project goal here - if you manually want to adjust your progress to test the site, head over to the Order model (app/models/order.rb)
|
||||
project_goal: 100
|
||||
# If you want to edit the FAQ, head over to app/views/preorder/homepage/_faqs.html.erb
|
||||
|
||||
# This'll be both the page title (<title></title>) and the name in the header
|
||||
product_name: "Selfstarter"
|
||||
|
||||
# An image showcasing your product -- it'll show up when you pin your product
|
||||
# It should be in app/assets/images
|
||||
product_image_path: "my-product-image.png"
|
||||
|
||||
# The message on the preorder page, Lockitron's
|
||||
value_proposition: "Roll your own crowdfunding"
|
||||
|
||||
# YouTube Video URL (The embed URL, without the query string options)
|
||||
# There's no Vimeo support at the moment, but feel free to implement it and send a pull request!
|
||||
youtube_embed_url: "https://www.youtube.com/v/D1L3o88GKew"
|
||||
|
||||
# Amazon settings -- you'll need an Amazon Payments account, sign up here --> http://bit.ly/SGksTv
|
||||
|
||||
# To find your access key and secret key, head over to here --> http://bit.ly/R4I4ky (Follow that guide in the Seller Central page)
|
||||
amazon_access_key: "YOUR_AMAZON_ACCESS_KEY"
|
||||
amazon_secret_key: "YOUR_AMAZON_SECRET_KEY"
|
||||
price: 19.95
|
||||
|
||||
payment_description: "You really should change this text because people will see it on Amazon's order page!!!!!"
|
||||
|
||||
# Amazon limits how much we can charge people with their Multi-Use tokens.
|
||||
# You probably should add some leeway to account for international shipping
|
||||
charge_limit: 25.00
|
||||
|
||||
# Stats settings
|
||||
|
||||
# On Lockitron, it's "backers"
|
||||
primary_stat: "backers"
|
||||
# This'll show up in the tweet as, "I'm forker number ..."
|
||||
primary_stat_verb: 'backer'
|
||||
|
||||
# The 2nd call to action button, towards the middle-ish of the page
|
||||
middle_reserve_text: "Reserve Now"
|
||||
|
||||
# When the project should end
|
||||
expiration_date: <%= DateTime.now + 29 %>
|
||||
|
||||
# Text to show inside the progress bar, when the goal reaches/exceeds 100%
|
||||
progress_text: "Implemented"
|
||||
|
||||
# Call to action section
|
||||
|
||||
# On Lockitron, it's "First Batch Ships in March 2013"
|
||||
ships: "Ships...sometime"
|
||||
|
||||
# On Lockitron, it's "Reserve Now"
|
||||
call_to_action: "Reserve Now"
|
||||
# On Lockitron, this is "Only $149 for a limited time"
|
||||
price_human: "It costs money!"
|
||||
|
||||
# The paragraph below the price. You'd probably say something about how you're not going to charge them before it ships (so it's less risky).
|
||||
dont_give_them_a_reason_to_say_no: "You'll get this exact site. All you'll need to get started is a great product."
|
||||
|
||||
# Social Stuff
|
||||
facebook_app_id: "1234567890"
|
||||
# Tweets are prefixed with "I'm #{Settings.primary_stat} number X for #{Settings.product_name}"
|
||||
# Maybe mention something about your product vision -- e.g. "to replace keys with my phone"
|
||||
tweet_text: "to crowdfund"
|
||||
|
||||
# Google Analytics
|
||||
google_id: "1234567890"
|
||||
|
||||
# If you want to change the images for the key points (e.g. "Kickstarter is not a store")
|
||||
# They're in app/assets/images/#{pointer_number}-background.png
|
||||
# So, the first key point, it's at app/assets/images/1-background.png
|
||||
# Alternatively, change it up in app/assets/stylesheets/homepage/key_points.css.scss
|
||||
0
config/settings/development.yml
Normal file
0
config/settings/development.yml
Normal file
0
config/settings/production.yml
Normal file
0
config/settings/production.yml
Normal file
0
config/settings/test.yml
Normal file
0
config/settings/test.yml
Normal file
Reference in New Issue
Block a user