Recommended Heroku setup: Ruby 2, Unicorn, New Relic, exception tracking, Sendgrid etc...
Merge remote-tracking branch 'upstream/master'

* upstream/master: (112 commits)
  Update SECURITY.md
  initial draft of security document
  remove email footer font override
  SECURITY: correct our CSRF implementation to be much more aggressive
  distributed memoizer added to ensure absolute duplicate posts don't get through
  mock redis for mock redis goodness
  don't ever delete unprocessable emails
  FIX: Loading was broken on activity streams
  FIX: Allow clicks on @names
  Fix auto-group refresh response so that ajax callback runs
  hide groups nav link from non-admins
  correct email styles
  FIX: Can click on your own links again
  Some tests for the user stream
  Minor fixes. Link directoy to user activity to avoid a redirect.
  Moved highestSeenByTopic to the Discourse.Session
  Moved Discourse.ajax into a mixin.
  Moved Resolver to new File
  Remove Discourse.transient. Use a singleton for session data, it's a lot cleaner.
  Upgrade Ember to Fix CVE-2013-4170
  ...
Merge w/ upstream
Merge upstream
Merge upstream
Update Heroku instructions, not using clockwork anymore (?)
define NEW_RELIC_APP_NAME

NEW_RELIC_APP_NAME must be defined in order for newrelic.yml to work.

Since this seems to be a start-to-finish guide to getting discourse up, I think it makes sense to include this, even though it's in the existing [heroku new relic documentation]

(https://devcenter.heroku.com/articles/newrelic).

I was surprised to find that the heroku's environment doesn't already include it's app name.
Merge remote-tracking branch 'upstream/master'

* upstream/master: (121 commits)
  update with some facts
  update rails 4 ensure you clear the tmp/cache folder on each bench (so results are correct, there is an incompat upgrade) add facter gem which will be used to collect hardware data from the bencher
  saving dialog somehow vanished during refactoring better error handling for posts that fail to save
  mucking with my measure script
  fix secret_token init to always allow an override even if its too short
  add a soft puma dependency so people can run Discourse on puma
  "moved" makes more sense in the notify
  FIX: Error loading up V8 due to Discourse not being present
  properly escape backslashes
  A nicer API for dealing with text replacements in Discourse's parser pipeline
  FIX: convert error in test
  remove console.log
  Use moment.js in auto close js
  FIX: 404 on old thumbnails
  Allow basic emoticons to work too.
  Better documentation for new Dialect helpers. Migrated emoticon support to new helper format.
  FIX: Markdown references within a list were not working properly.
  A couple of important markdown fixes.
  If min entropy setting is greater than min post/body length setting, then use a sensible min entropy value instead
  Allow CAS authentication
  ...
Asset updates
don't initialize on precompile
include newrelic:standard addon
Merge pull request #2 from michaelkirk/configure_new_relic_app_name

Make sure to set New Relic app name
Merge remote-tracking branch 'upstream/master'

* upstream/master: (109 commits)
  fixed ruby 2.0 p0 bug in fast_stack so re-pushing
  freedom patches for fixes submitted to rack
  Perf: don't allocate hashes OVER and OVER in a loop, its bad
  fix minor copy error on ImageMagick warning
  fix unsubscribe link in digest emails
  disable flamegraph while I figure out why fast stack is not working for some people on x32
  Revert "Merge pull request #1215 from Elegios/composer_use_category_id"
  Show post number in the share dialog
  Update importer_spec for system user
  FIX: Don't onebox links with labels unless the labels are the same as the URL
  improve approval copy
  Remove brackets from `username_filters[]` URL
  Fix IE9 bug in browser-update. Unable to get value of the property 'insertBefore': object is null or undefined
  proper content-disposition header when downloading attachments
  FIX: recover post by a non-staff user fails because the post is not unique. Uniqueness check shouldn't happen when recovering a deleted post.
  missed a few renames
  playing with my script, feel free to ignore
  better rename the old values otherwise, trouble
  shorter user deletion text
  fix broken build hack to allow for PMs with no users for flagging needs
  ...
Merge remote-tracking branch 'upstream/master'

* upstream/master: (88 commits)
  New user education notification was off by one. Also, remove the "basic" restriction on the "posting too often" message.
  Add enable_mobile_theme site setting. Uncheck it to disable the mobile theme.
  Strip trailing slashes from ScreeningUrl records
  flamegraph upgrade
  Make the composer and TopicCreator use category id instead of category name
  Mini Profiler and fast stack update, resolves infinite loop in flame graphs
  tidy up method
  after_initialize callback for plugins
  Better padding for spoiler text
  Use absolute urls in notifications for automatic spammer handling.
  Allow switching between mobile and desktop view on any device.
  Fix an error with mobile custom header
  Add ability to customize css and header for mobile
  Allow TextSentinel#seems_unpretentious? to accept words joined with dashes or forward slashes. (Issue 1133)
  Add a link to the email setup doc
  disable XML params, they are just used by malicious bots to determine if we have XML vuls.
  fixed history modal, topic progress now sticky to last post, edits heatmap is back, date/edit links now grey
  HandlebarsOneboxes: avoid constants multiple declarations
  New site settings to enable/disable the possibility of editing user's nickname or email address
  Russian translation (actual version)
  ...
Merge remote-tracking branch 'upstream/master'

* upstream/master: (30 commits)
  Show mobile view as default for nexus 7 tablet
  Fix missing provider param message when using Persona
  Revert "remove unnecessary (empty) view class"
  Fixed russsian localization
  if we have not automatic assets, don't try deleting them
  make category's RSS feed actually order by topic.created_at
  mobile: fixed quote control jump
  remove unnecessary (empty) view class
  optimise regular job to avoid touching posts that have not changed
  update mini profiler on rails 4
  FIX: Broken spec
  Changes to support Spoiler Alert plugin
  Remove duplicate list.js.handlebars
  Add wrench icon to Edit Category button
  Add email icon to password reset email button
  Remove posts icon and make post count bold in mobile topic lists
  Use two lines per topic list item on mobile
  flamegraph update to support embedded graphs
  update mini profiler
  Added screencast.com to whitelist.rb
  ...
增加移动版Header和样式表
Minor fixes

* add discourse to sudo
* add `bundle exec` on some calls
* inform user of NUM_WEB/sockets count for nginx config
Merge remote-tracking branch 'upstream/master'

* upstream/master: (29 commits)
  FIX: Allow Spoiler plugin (and others that use prototype.on) to work even if ListView was not initialized.
  Update nginx.config.sample to allow custom CSS
  Ember Upgrade: 1.0
  FIX database growth when running the ﻿PeriodicalUpdates job
  rename all css.scss to scss
  move job files so they live underneath app/ and not in lib/ introduce new setting email_always, that will force emails to send to users regardless of presence on site
  Add process checks to kill/restart too large thins
  Changed rake to bundle exec rake. Seems to be the only thing working now.
  FIX: Prevent unauthorized list of private message titles. Also remove some unused code.
  do not break oneboxes' favicon after updating favicons
  adds unit tests for Discourse.Controller
  Adjust css for user page to work at mobile sizes
  Oopps. Regis doesn't know how to count
  fix profile db generator to run even with the system account
  Russian translation (actual version)
  improve performance of periodical update job, decrease frequency and shift it by a few minutes
  notify_user is not a flag
  add db time instrumentation to job execution
  FIX: Too many new lines in long quotes
  removes unused builders param from Discourse.Model.mergeAttributes
  ...
No sudo perm for user

Also changed order on informing user that he'll be encountering errors that needs admin access before calling `rvm`.
suggested BBS copy change for inappropriate flag