Skip to content

Commit

Permalink
Move ASYNC_RESPONSE to abstract.rb and remove unused vars
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Jan 8, 2010
1 parent 3cd25b8 commit 07064a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2009 Pratik Naik
Copyright (c) 2009-2010 Pratik Naik

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 2 additions & 0 deletions lib/cramp/controller/abstract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class Abstract

include Callbacks

ASYNC_RESPONSE = [-1, {}, []].freeze

class << self
def call(env)
controller = new(env).process
Expand Down
6 changes: 0 additions & 6 deletions lib/cramp/controller/callbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@ module Callbacks

extend ActiveSupport::Concern

ASYNC_RESPONSE = [-1, {}, []].freeze
DEFAULT_STATUS = 200
DEFAULT_HEADERS = { 'Content-Type' => 'text/html' }.freeze

included do
class_inheritable_accessor :default_status, :default_headers, :instance_reader => false
self.default_status = DEFAULT_STATUS
self.default_headers = DEFAULT_HEADERS

class_inheritable_accessor :before_start_callbacks, :on_finish_callbacks, :on_start_callback, :instance_reader => false
self.before_start_callbacks = []
Expand Down

0 comments on commit 07064a8

Please sign in to comment.