summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-11 14:40:38 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-11 14:40:38 +0100
commit29db90c2c8a9a6a3087e77eae8615ddf0049087b (patch)
tree56994b81e3e360964a26f73164eee3fb25d67951
parent62ac01a8ea536718734bd911fc3642c0bd8b6bc7 (diff)
Deleted PrivatePub stuff.
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock24
-rw-r--r--app/controllers/system_messages_controller.rb30
-rw-r--r--app/helpers/system_messages_helper.rb2
-rw-r--r--app/models/ability.rb4
-rw-r--r--app/views/system_messages/_form.html.haml7
-rw-r--r--app/views/system_messages/_form_core.html.haml2
-rw-r--r--app/views/system_messages/_index_core.html.haml12
-rw-r--r--app/views/system_messages/index.html.haml3
-rw-r--r--app/views/system_messages/new.html.haml3
-rw-r--r--app/views/system_messages/show.html.haml8
-rw-r--r--config/locales/views/system_messages/de.yml38
-rw-r--r--config/locales/views/system_messages/en.yml38
-rw-r--r--private_pub.ru8
-rw-r--r--test/functional/system_messages_controller_test.rb49
15 files changed, 0 insertions, 231 deletions
diff --git a/Gemfile b/Gemfile
index f273864..b390a28 100644
--- a/Gemfile
+++ b/Gemfile
@@ -62,9 +62,6 @@ gem 'will_paginate'
gem 'daemons'
gem 'delayed_job_active_record'
-# Private Pub http://railscasts.com/episodes/316-private-pub
-gem 'private_pub'
-
# https://github.com/iain/http_accept_language
gem 'http_accept_language'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6d348e0..ad47697 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -29,7 +29,6 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
acts_as_list (0.1.9)
- addressable (2.3.2)
arel (3.0.2)
backup (3.0.27)
open4 (~> 1.3.0)
@@ -63,7 +62,6 @@ 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)
delayed_job (3.0.4)
@@ -71,14 +69,6 @@ GEM
delayed_job_active_record (0.3.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.0)
execjs (1.4.0)
@@ -88,21 +78,11 @@ GEM
factory_girl_rails (4.2.0)
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
- faye (0.8.8)
- 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.6)
- eventmachine (>= 0.12.0)
fssm (0.2.10)
haml (3.1.7)
hike (1.2.1)
hirb (0.7.1)
http_accept_language (1.0.2)
- http_parser.rb (0.5.3)
i18n (0.6.1)
inifile (2.0.2)
journey (1.0.4)
@@ -125,8 +105,6 @@ GEM
nokogiri (1.5.6)
open4 (1.3.0)
polyglot (0.3.3)
- private_pub (1.0.3)
- faye
quiet_assets (1.0.1)
railties (~> 3.1)
rack (1.4.4)
@@ -202,7 +180,6 @@ GEM
activesupport (>= 2.3.4)
chronic (>= 0.6.3)
will_paginate (3.0.4)
- yajl-ruby (1.1.0)
PLATFORMS
ruby
@@ -233,7 +210,6 @@ DEPENDENCIES
mini_magick
mysql2
nokogiri
- private_pub
quiet_assets
rails (= 3.2.11)
sass-rails
diff --git a/app/controllers/system_messages_controller.rb b/app/controllers/system_messages_controller.rb
deleted file mode 100644
index d7fe515..0000000
--- a/app/controllers/system_messages_controller.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-class SystemMessagesController < ApplicationController
- load_and_authorize_resource :user
- load_and_authorize_resource :system_message, :through => [:user]
-
- def index
- @system_messages = @system_messages.where(:created_at => Time.now - 6.hours .. Time.now)
- end
-
- def show
- end
-
- def new
- @system_message = @user.system_messages.build
- end
-
- def create
- @system_message = @user.system_messages.build(params[:system_message])
- if @system_message.save
- # Push the new message via AJAX to the browser.
- #
- # PrivatePub.publish_to("/users/#{@system_message.user.id}/system_messages",
- # "$('#system_message').empty();$('#system_message').append('<span class=\"created_at\">#{(I18n.l @system_message.created_at, :format => :short )}</span> #{@system_message.content}');$('#system_message_display').fadeIn();"
- # )
-
- redirect_to user_system_message_path(@user, @system_message), :notice => t('system_messages.controller.successfuly_created')
- else
- render :new
- end
- end
-end
diff --git a/app/helpers/system_messages_helper.rb b/app/helpers/system_messages_helper.rb
deleted file mode 100644
index fef2386..0000000
--- a/app/helpers/system_messages_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module SystemMessagesHelper
-end
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 01f26aa..4ec64b1 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -56,10 +56,6 @@ class Ability
can :read, PhoneBookEntry, :phone_book => { :id => user_group.phone_book_ids }
end
- # SystemMessages
- #
- cannot [:destroy, :edit, :update], SystemMessage
-
# A FacDocument can't be changed
#
cannot [:edit, :update], FaxDocument
diff --git a/app/views/system_messages/_form.html.haml b/app/views/system_messages/_form.html.haml
deleted file mode 100644
index 036ee00..0000000
--- a/app/views/system_messages/_form.html.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-= simple_form_for([@user, @system_message]) do |f|
- = f.error_notification
-
- = render "form_core", :f => f
-
- .actions
- = f.button :submit, conditional_t('system_messages.form.submit') \ No newline at end of file
diff --git a/app/views/system_messages/_form_core.html.haml b/app/views/system_messages/_form_core.html.haml
deleted file mode 100644
index a85db28..0000000
--- a/app/views/system_messages/_form_core.html.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-.inputs
- = f.input :content, :label => t('system_messages.form.content.label'), :hint => conditional_hint('system_messages.form.content.hint')
diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml
deleted file mode 100644
index 7c9dab5..0000000
--- a/app/views/system_messages/_index_core.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-%table.table.table-striped
- %thead
- %tr
- %th= t('system_messages.index.created_at')
- %th= t('system_messages.index.content')
-
- %tbody
- - for system_message in system_messages
- %tr
- %td= system_message.created_at
- %td= system_message.content
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message} \ No newline at end of file
diff --git a/app/views/system_messages/index.html.haml b/app/views/system_messages/index.html.haml
deleted file mode 100644
index ffd3fc3..0000000
--- a/app/views/system_messages/index.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-- content_for :title, t("system_messages.index.page_title")
-
-= render "index_core", :system_messages => @system_messages \ No newline at end of file
diff --git a/app/views/system_messages/new.html.haml b/app/views/system_messages/new.html.haml
deleted file mode 100644
index 565f5c5..0000000
--- a/app/views/system_messages/new.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-- content_for :title, t("system_messages.new.page_title")
-
-= render "form"
diff --git a/app/views/system_messages/show.html.haml b/app/views/system_messages/show.html.haml
deleted file mode 100644
index 70be6f2..0000000
--- a/app/views/system_messages/show.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-- content_for :title, t("system_messages.show.page_title")
-
-%p
- %strong= t('system_messages.show.created_at') + ":"
- = @system_message.created_at
-%p
- %strong= t('system_messages.show.content') + ":"
- = @system_message.content
diff --git a/config/locales/views/system_messages/de.yml b/config/locales/views/system_messages/de.yml
deleted file mode 100644
index d841d0b..0000000
--- a/config/locales/views/system_messages/de.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-de:
- system_messages:
- name: 'Systemnachricht'
- controller:
- successfuly_created: 'Eine Systemnachricht wurde erstellt.'
- successfuly_updated: 'Eine Systemnachricht wurde aktualisiert.'
- successfuly_destroyed: 'Eine Systemnachricht wurde gelöscht.'
- index:
- page_title: 'Systemnachrichten'
- user_id: 'Benutzer'
- content: 'Nachricht'
- actions:
- confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?'
- destroy: 'Löschen'
- edit: 'Bearbeiten'
- show: 'Anzeigen'
- create: 'Neu anlegen'
- show:
- page_title: 'Systemnachricht anzeigen'
- user_id: 'Benutzer'
- content: 'Nachricht'
- actions:
- confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?'
- destroy: 'Löschen'
- edit: 'Bearbeiten'
- view_all: 'Alle anzeigen'
- new:
- page_title: 'Neue Systemnachricht'
- edit:
- page_title: 'Systemnachricht bezüglich %{resource} bearbeiten'
- form:
- user_id:
- label: 'Benutzer'
- hint: ''
- content:
- label: 'Nachricht'
- hint: ''
- submit: 'Absenden' \ No newline at end of file
diff --git a/config/locales/views/system_messages/en.yml b/config/locales/views/system_messages/en.yml
deleted file mode 100644
index a039b10..0000000
--- a/config/locales/views/system_messages/en.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-en:
- system_messages:
- name: 'System message'
- controller:
- successfuly_created: 'Successfully created System message.'
- successfuly_updated: 'Successfully updated System message.'
- successfuly_destroyed: 'Successfully destroyed System message.'
- index:
- page_title: 'System messages'
- user_id: 'User'
- content: 'Content'
- actions:
- confirm_destroy: 'Are you sure you want to delete this element?'
- destroy: 'Delete'
- edit: 'Edit'
- show: 'View'
- create: 'New'
- show:
- page_title: 'Editing System message'
- user_id: 'User'
- content: 'Content'
- actions:
- confirm_destroy: 'Are you sure you want to delete this element?'
- destroy: 'Delete'
- edit: 'Edit'
- view_all: 'View All'
- new:
- page_title: 'New System message'
- edit:
- page_title: 'Editing System message %{resource}'
- form:
- user_id:
- label: 'User'
- hint: ''
- content:
- label: 'Content'
- hint: ''
- submit: 'Submit' \ No newline at end of file
diff --git a/private_pub.ru b/private_pub.ru
deleted file mode 100644
index 2db4acf..0000000
--- a/private_pub.ru
+++ /dev/null
@@ -1,8 +0,0 @@
-# Run with: rackup private_pub.ru -s thin -E production
-require "bundler/setup"
-require "yaml"
-require "faye"
-require "private_pub"
-
-PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development")
-run PrivatePub.faye_app
diff --git a/test/functional/system_messages_controller_test.rb b/test/functional/system_messages_controller_test.rb
deleted file mode 100644
index 2894cd3..0000000
--- a/test/functional/system_messages_controller_test.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'test_helper'
-
-class SystemMessagesControllerTest < ActionController::TestCase
- setup do
- @system_message = system_messages(:one)
- end
-
- test "should get index" do
- get :index
- assert_response :success
- assert_not_nil assigns(:system_messages)
- end
-
- test "should get new" do
- get :new
- assert_response :success
- end
-
- test "should create system_message" do
- assert_difference('SystemMessage.count') do
- post :create, system_message: @system_message.attributes
- end
-
- assert_redirected_to system_message_path(assigns(:system_message))
- end
-
- test "should show system_message" do
- get :show, id: @system_message.to_param
- assert_response :success
- end
-
- test "should get edit" do
- get :edit, id: @system_message.to_param
- assert_response :success
- end
-
- test "should update system_message" do
- put :update, id: @system_message.to_param, system_message: @system_message.attributes
- assert_redirected_to system_message_path(assigns(:system_message))
- end
-
- test "should destroy system_message" do
- assert_difference('SystemMessage.count', -1) do
- delete :destroy, id: @system_message.to_param
- end
-
- assert_redirected_to system_messages_path
- end
-end