playing
This commit is contained in:
parent
5286b6be69
commit
63866a8128
6 changed files with 26 additions and 66 deletions
2
Gemfile
2
Gemfile
|
|
@ -10,7 +10,7 @@ gem "bson_ext", "1.0.1"
|
|||
gem "haml"
|
||||
gem "devise", :git => "git://github.com/plataformatec/devise.git"
|
||||
gem 'roxml', :git => "git://github.com/Empact/roxml.git"
|
||||
|
||||
gem 'em-websocket'
|
||||
gem 'dm-core'
|
||||
|
||||
group :test do
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery :except => :receive
|
||||
layout 'application'
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,4 +12,9 @@ class DashboardController < ApplicationController
|
|||
store_posts_from_xml (params[:xml])
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
def socket
|
||||
#this is just for me to test teh sockets!
|
||||
render "socket"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,3 +11,4 @@ rescue Bundler::GemNotFound => e
|
|||
STDERR.puts "Try running `bundle install`."
|
||||
exit!
|
||||
end if File.exist?(gemfile)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
Diaspora::Application.routes.draw do |map|
|
||||
resources :blogs
|
||||
|
||||
resources :bookmarks
|
||||
|
||||
resources :friends
|
||||
|
||||
resources :status_messages
|
||||
|
||||
resources :status_messages
|
||||
|
||||
#routes for devise, not really sure you will need to mess with this in the future, lets put default,
|
||||
#non mutable stuff in anohter file
|
||||
devise_for :users, :path_names => {:sign_up => "signup", :sign_in => "login", :sign_out => "logout"}
|
||||
|
|
@ -14,68 +12,10 @@ Diaspora::Application.routes.draw do |map|
|
|||
match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session"
|
||||
#match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration"
|
||||
|
||||
match 'receive', :to => 'dashboard#receive'
|
||||
|
||||
resources :users
|
||||
resources :status_messages
|
||||
|
||||
|
||||
# The priority is based upon order of creation:
|
||||
# first created -> highest priority.
|
||||
|
||||
# Sample of regular route:
|
||||
# match 'products/:id' => 'catalog#view'
|
||||
# Keep in mind you can assign values other than :controller and :action
|
||||
|
||||
# Sample of named route:
|
||||
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
||||
# This route can be invoked with purchase_url(:id => product.id)
|
||||
|
||||
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
||||
# resources :products
|
||||
|
||||
# Sample resource route with options:
|
||||
# resources :products do
|
||||
# member do
|
||||
# get :short
|
||||
# post :toggle
|
||||
# end
|
||||
#
|
||||
# collection do
|
||||
# get :sold
|
||||
# end
|
||||
# end
|
||||
|
||||
# Sample resource route with sub-resources:
|
||||
# resources :products do
|
||||
# resources :comments, :sales
|
||||
# resource :seller
|
||||
# end
|
||||
|
||||
# Sample resource route with more complex sub-resources
|
||||
# resources :products do
|
||||
# resources :comments
|
||||
# resources :sales do
|
||||
# get :recent, :on => :collection
|
||||
# end
|
||||
# end
|
||||
|
||||
# Sample resource route within a namespace:
|
||||
# namespace :admin do
|
||||
# # Directs /admin/products/* to Admin::ProductsController
|
||||
# # (app/controllers/admin/products_controller.rb)
|
||||
# resources :products
|
||||
# end
|
||||
|
||||
# You can have the root of your site routed with "root"
|
||||
# just remember to delete public/index.html.
|
||||
# root :to => "welcome#index"
|
||||
|
||||
# See how all your routes lay out with "rake routes"
|
||||
|
||||
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
||||
# Note: This route will make all actions in every controller accessible via GET requests.
|
||||
# match ':controller(/:action(/:id(.:format)))'
|
||||
match 'receive', :to => 'dashboard#receive'
|
||||
match "socket", :to => 'dashboard#socket'
|
||||
|
||||
root :to => 'dashboard#index'
|
||||
|
||||
|
|
|
|||
|
|
@ -37,5 +37,19 @@ describe ApplicationHelper do
|
|||
Post.count.should == 2
|
||||
end
|
||||
|
||||
|
||||
describe "parsing a sender" do
|
||||
it 'should be able to parse the sender of a collection' do
|
||||
status_messages = []
|
||||
10.times { status_messages << Factory.build(:status_message)}
|
||||
xml = Post.build_xml_for(status_messages)
|
||||
end
|
||||
|
||||
it 'should be able to verify the sender as a friend' do
|
||||
pending
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue