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 "haml"
|
||||||
gem "devise", :git => "git://github.com/plataformatec/devise.git"
|
gem "devise", :git => "git://github.com/plataformatec/devise.git"
|
||||||
gem 'roxml', :git => "git://github.com/Empact/roxml.git"
|
gem 'roxml', :git => "git://github.com/Empact/roxml.git"
|
||||||
|
gem 'em-websocket'
|
||||||
gem 'dm-core'
|
gem 'dm-core'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,9 @@ class DashboardController < ApplicationController
|
||||||
store_posts_from_xml (params[:xml])
|
store_posts_from_xml (params[:xml])
|
||||||
render :nothing => true
|
render :nothing => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def socket
|
||||||
|
#this is just for me to test teh sockets!
|
||||||
|
render "socket"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,4 @@ rescue Bundler::GemNotFound => e
|
||||||
STDERR.puts "Try running `bundle install`."
|
STDERR.puts "Try running `bundle install`."
|
||||||
exit!
|
exit!
|
||||||
end if File.exist?(gemfile)
|
end if File.exist?(gemfile)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
Diaspora::Application.routes.draw do |map|
|
Diaspora::Application.routes.draw do |map|
|
||||||
resources :blogs
|
resources :blogs
|
||||||
|
|
||||||
resources :bookmarks
|
resources :bookmarks
|
||||||
|
|
||||||
resources :friends
|
resources :friends
|
||||||
|
resources :status_messages
|
||||||
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,
|
#routes for devise, not really sure you will need to mess with this in the future, lets put default,
|
||||||
|
|
@ -14,68 +12,10 @@ Diaspora::Application.routes.draw do |map|
|
||||||
match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session"
|
match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session"
|
||||||
#match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration"
|
#match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration"
|
||||||
|
|
||||||
match 'receive', :to => 'dashboard#receive'
|
|
||||||
|
|
||||||
resources :users
|
resources :users
|
||||||
resources :status_messages
|
match 'receive', :to => 'dashboard#receive'
|
||||||
|
match "socket", :to => 'dashboard#socket'
|
||||||
|
|
||||||
# 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)))'
|
|
||||||
|
|
||||||
root :to => 'dashboard#index'
|
root :to => 'dashboard#index'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,5 +37,19 @@ describe ApplicationHelper do
|
||||||
Post.count.should == 2
|
Post.count.should == 2
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue