Permalink
Browse files

First attempt upgrading it to Cramp 0.12 and Tramp

  • Loading branch information...
1 parent d30dee3 commit 7e2f8d3f4458711fdf451411149813d5cc656823 @akitaonrails committed Feb 14, 2011
View
@@ -0,0 +1,2 @@
+.DS_Store
+*.swp
View
@@ -9,10 +9,9 @@ h2. Usage
This should install all the dependencies
<pre>
- gem install arel --pre
- gem install activemodel --pre
gem install thin
gem install cramp
+ gem install tramp
</pre>
This demo uses MySQL, so you will need to create your own database. Read @config/database.sql@ to create it and edit @config/database.yml@ with the correct server, username and password.
@@ -62,6 +61,10 @@ h2. TODO
* Add multiple room and user registration support, but this requires exchanging session information as well. Making Rack::Session work may be a requirement
* Add templating than just static file to allow for some HAML or ERB views, adding Tilt to Cramp would be good as well
+h2. Changelog
+
+* 02/14/2011 - Updated to Cramp 0.12 and the new Tramp gem.
+
h2. Credits
* "Pratik Naik":http://m.onkey.org/ for Cramp
@@ -1,7 +1,7 @@
-class ApplicationController < Cramp::Controller::Action
+class ApplicationController < Cramp::Action
include ApplicationHelper
end
-class WebSocketApplicationController < Cramp::Controller::Websocket
+class WebSocketApplicationController < Cramp::Websocket
include ApplicationHelper
-end
+end
View
@@ -1,4 +1,4 @@
-class Chat < Cramp::Model::Base
+class Chat < Tramp::Base
attribute :id, :type => Integer, :primary_key => true
attribute :name
attribute :sent_at
@@ -18,4 +18,4 @@ def self.recent(last_message)
end
validates_presence_of :name
-end
+end
View
@@ -2,22 +2,22 @@
require 'thin'
require 'usher'
require 'erb'
-require 'cramp/controller'
-require 'cramp/model'
+require 'cramp'
+require 'tramp'
require 'active_support/all'
require 'active_support/json'
-require 'config/routes'
-require 'app/helpers/application'
-require 'app/controllers/application_controller'
-require 'app/controllers/chat_controller'
-require 'app/controllers/retrieve_controller'
-require 'app/controllers/receive_controller'
-require 'app/controllers/static_controller'
-require 'app/models/chat'
-require 'lib/fixes'
+require './config/routes'
+require './app/helpers/application'
+require './app/controllers/application_controller'
+require './app/controllers/chat_controller'
+require './app/controllers/retrieve_controller'
+require './app/controllers/receive_controller'
+require './app/controllers/static_controller'
+require './app/models/chat'
+require './lib/fixes'
-Cramp::Model.init(YAML.load(File.read('./config/database.yml')))
-Cramp::Controller::Websocket.backend = :thin
+Tramp.init(YAML.load(File.read('./config/database.yml')))
+Cramp::Websocket.backend = :thin
Thin::Logging.trace = true
-Rack::Handler::Thin.run app_routes, :Port => 3000
+Rack::Handler::Thin.run app_routes, :Port => 3000
View
@@ -1,3 +1,4 @@
---
:database: cramp_chat_development
:username: root
+:password: root
@@ -362,7 +362,7 @@ FABridge.prototype =
// accepts a type structure, returns a constructed type
addTypeDataToCache: function(typeData)
{
- newType = new ASProxy(this, typeData.name);
+ var newType = new ASProxy(this, typeData.name);
var accessors = typeData.accessors;
for (var i = 0; i < accessors.length; i++)
{
Binary file not shown.
Oops, something went wrong.

0 comments on commit 7e2f8d3

Please sign in to comment.