diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-10 08:57:50 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-03-10 08:57:50 +0100 |
commit | fc9b8e69e74a76d6727d5ddceebb018782027b16 (patch) | |
tree | 6cecb4e7de5b50fc9f5f1801161f7c832a3206cc | |
parent | 4ce55596e3637b212de54aaeb24f8af114deb350 (diff) |
Added Private Pub stuff. https://github.com/ryanb/private_pub
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 24 | ||||
-rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
-rw-r--r-- | config/private_pub.yml | 2 | ||||
-rw-r--r-- | private_pub.ru | 10 |
5 files changed, 37 insertions, 2 deletions
@@ -79,9 +79,9 @@ gem 'uuid' # Application server gem 'unicorn' -# Thin is needed for the Private Pub stuff. # http://railscasts.com/episodes/316-private-pub gem 'thin' +gem 'private_pub' # Backup https://github.com/meskyanichi/backup gem 'backup' diff --git a/Gemfile.lock b/Gemfile.lock index 2ca007c..1ceaef2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,6 +30,7 @@ GEM multi_json (~> 1.0) acts_as_list (0.2.0) activerecord (>= 3.0) + addressable (2.3.3) arel (3.0.2) backup (3.1.2) open4 (~> 1.3.0) @@ -64,6 +65,7 @@ GEM sass (~> 3.1) compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) + cookiejar (0.3.0) daemons (1.1.9) dalli (2.6.2) debug_inspector (0.0.2) @@ -72,6 +74,14 @@ GEM delayed_job_active_record (0.4.3) activerecord (>= 2.1.0, < 4) delayed_job (~> 3.0) + em-http-request (1.0.3) + addressable (>= 2.2.3) + cookiejar + em-socksify + eventmachine (>= 1.0.0.beta.4) + http_parser.rb (>= 0.5.3) + em-socksify (0.2.1) + eventmachine (>= 1.0.0.beta.4) erubis (2.7.0) eventmachine (1.0.3) execjs (1.4.0) @@ -81,12 +91,22 @@ GEM factory_girl_rails (4.2.1) factory_girl (~> 4.2.0) railties (>= 3.0.0) + faye (0.8.9) + cookiejar (>= 0.3.0) + em-http-request (>= 0.3.0) + eventmachine (>= 0.12.0) + faye-websocket (>= 0.4.0) + rack (>= 1.0.0) + yajl-ruby (>= 1.0.0) + faye-websocket (0.4.7) + eventmachine (>= 0.12.0) fssm (0.2.10) haml (4.0.0) tilt hike (1.2.1) hirb (0.7.1) http_accept_language (1.0.2) + http_parser.rb (0.5.3) i18n (0.6.4) inifile (2.0.2) journey (1.0.4) @@ -109,6 +129,8 @@ GEM nokogiri (1.5.6) open4 (1.3.0) polyglot (0.3.3) + private_pub (1.0.3) + faye quiet_assets (1.0.2) railties (>= 3.1, < 5.0) rack (1.4.5) @@ -184,6 +206,7 @@ GEM activesupport (>= 2.3.4) chronic (>= 0.6.3) will_paginate (3.0.4) + yajl-ruby (1.1.0) PLATFORMS ruby @@ -214,6 +237,7 @@ DEPENDENCIES mini_magick mysql2 nokogiri + private_pub quiet_assets rails (= 3.2.12) sass-rails diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c6f4107..68a6e22 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,4 +13,5 @@ //= require jquery //= require jquery-ui //= require jquery_ujs +//= require private_pub //= require_tree . diff --git a/config/private_pub.yml b/config/private_pub.yml index 19a7e9e..840b2c1 100644 --- a/config/private_pub.yml +++ b/config/private_pub.yml @@ -6,5 +6,5 @@ test: secret_token: "secret" production: server: "http://example.com/faye" - secret_token: "ade2c51226bf26e7fbbce1e0d8848082b750d23516b46dc5bc12e910e0e64558" + secret_token: "4a6049c5f60cd74690c094757dd7afc431a64ac83f1c54f7cf4b3f28215b3bec" signature_expiration: 3600 # one hour diff --git a/private_pub.ru b/private_pub.ru new file mode 100644 index 0000000..4892af4 --- /dev/null +++ b/private_pub.ru @@ -0,0 +1,10 @@ +# Run with: rackup private_pub.ru -s thin -E production +require "bundler/setup" +require "yaml" +require "faye" +require "private_pub" + +Faye::WebSocket.load_adapter('thin') + +PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development") +run PrivatePub.faye_app |