fixed the stupid addressable bug, also started playing with 1.9.2...sorry for the spaced out commit
This commit is contained in:
parent
f06b645b9c
commit
2f6a11f018
6 changed files with 11 additions and 25 deletions
9
Gemfile
9
Gemfile
|
|
@ -1,19 +1,16 @@
|
|||
source 'http://rubygems.org'
|
||||
source 'http://gemcutter.org'
|
||||
|
||||
gem 'rails', '3.0.0.beta4'
|
||||
gem 'mongrel'
|
||||
gem 'thin'
|
||||
gem 'em-http-request'
|
||||
gem 'addressable'
|
||||
gem 'em-http-request', :require => "em-http"
|
||||
gem 'addressable', :require => "addressable/uri"
|
||||
gem "mongoid", :git => "git://github.com/durran/mongoid.git"
|
||||
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 'dm-core' #:(
|
||||
|
||||
group :test do
|
||||
gem 'rspec', '>= 2.0.0.beta.12'
|
||||
gem 'rspec-rails', ">= 2.0.0.beta.8"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class Friend
|
|||
validates_format_of :url, :with =>
|
||||
/^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix
|
||||
|
||||
#validate {self.url ! = User.first.url}
|
||||
|
||||
before_validation :clean_url
|
||||
|
||||
protected
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
class Post
|
||||
require 'lib/common'
|
||||
require_relative '../../lib/common'
|
||||
|
||||
|
||||
# XML accessors must always preceed mongo field tags
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class StatusMessage < Post
|
||||
include StatusMessagesHelper
|
||||
require 'lib/net/curl'
|
||||
require_relative '../../lib/net/curl'
|
||||
|
||||
xml_name :status_message
|
||||
|
||||
|
|
|
|||
|
|
@ -17,18 +17,4 @@
|
|||
=link_to 'Destroy', status_message, :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
|
||||
%h2 Friends
|
||||
%table
|
||||
%tr
|
||||
%th username
|
||||
%th url
|
||||
- for friend in @friends
|
||||
%tr
|
||||
%td= friend.username
|
||||
%td= friend.url
|
||||
%td= link_to 'Show', friend
|
||||
%td= link_to 'Destroy', friend, :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
|
||||
|
||||
%p= link_to "New Status Message", new_status_message_path
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require 'addressable/uri'
|
||||
require 'eventmachine'
|
||||
require 'em-http'
|
||||
# require 'addressable/uri'
|
||||
# require 'eventmachine'
|
||||
# require 'em-http'
|
||||
|
||||
class MessageHandler
|
||||
|
||||
|
|
@ -24,6 +24,7 @@ class MessageHandler
|
|||
@queue.pop{ |query|
|
||||
case query.type
|
||||
when :post
|
||||
puts Addressable::URI::parse(query.destination).inspect
|
||||
http = EventMachine::HttpRequest.new(query.destination).post :timeout => TIMEOUT, :body =>{:xml => query.body}
|
||||
http.callback { process}
|
||||
when :get
|
||||
|
|
|
|||
Loading…
Reference in a new issue