Merge pull request #54 from rickcarlino/master

June 10th
pull/56/head^2
Rick Carlino 2014-06-10 07:02:42 -07:00
commit ff5c555c07
6 changed files with 16 additions and 20 deletions

7
.gitignore vendored
View File

@ -29,9 +29,6 @@ capybara-*.html
rerun.txt
pickle-email-*.html
/assets/*
# TODO Comment out this rules if you are OK with secrets been uploaded to the repo
config/initializers/secret_token.rb
config/secrets.yml
## Environment normalisation:
/.bundle
@ -41,4 +38,6 @@ config/secrets.yml
# Gemfile.lock, .ruby-version, .ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
.rvmrc
# Ignore application configuration
/config/application.yml

View File

@ -37,6 +37,8 @@ end
gem 'haml'
gem 'figaro' # Store secrets the 12 factor way.
group :test do
gem 'rspec'
gem 'rspec-rails'

View File

@ -97,6 +97,9 @@ GEM
faker (1.3.0)
i18n (~> 0.5)
fattr (2.2.2)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
flay (2.4.0)
ruby_parser (~> 3.0)
sexp_processor (~> 4.0)
@ -281,6 +284,7 @@ DEPENDENCIES
devise!
factory_girl_rails
faker
figaro
haml
high_voltage (~> 2.1.0)
jbuilder (~> 1.2)

View File

@ -1,6 +1,7 @@
# The overview controller provides an indepth view of a device as well as fine-
# grained controll options. Needs a better name.
# TODO: Network status indicator
# TODO: Device selection
# Run this in the command line for diagnostics.
# ======
# curl -X GET http://skynet.im/subscribe/713c69b1-e36a-11e3-93f8-f3e7e8d1cce9?token=0waw1l97lbwc23xrh0oem7d8rbai3sor --header "skynet_auth_uuid: 4bb4a961-e8e6-11e3-93f8-f3e7e8d1cce9" --header "skynet_auth_token: jce90gf7szxxyldihii1m3xv5d9jatt9"
@ -17,7 +18,7 @@ angular.module('FarmBot').controller "OverviewController", [
$scope.goHome = ->
$scope.socket.emit "message",
devices: $scope.device.uuid
message:
payload:
message_type: 'single_command'
time_stamp: new Date()
command:

View File

@ -4,12 +4,9 @@ Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
if Rails.env == 'production'
config.secret_key = `echo $secret_key_base` # hmmm
else
config.secret_key = '8724ed1027eb2d2686a425033671014691e16d86de126d5a39a21'\
'06b900392c309d5facd9c8c89740d5e0a50862941e0c2aa3794c4588bebfd2d7e10da1be670'
end
config.secret_key = ENV['secret_key_base']
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class

View File

@ -9,12 +9,5 @@
# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
if Rails.env == 'production'
Dss::Application.config.secret_key_base = ENV['secret_key_base']
else
# Going to keep a hard coded one here to make life easy for folks who want to
# run it in development / submit PRs. Less config. RC.
Dss::Application.config.secret_key_base = '452b4491c1cdd7315a0d787be2f7668ea'\
'8307a64733488151a43b62bdd76a6eb819cf973a9261b1500ef5745faf54171c7015f5ab7fd'\
'43449a5e06e6c1215e4e'
end