ActiveSupport 3.2 #48

Closed
wants to merge 5 commits into
from
View
7 Gemfile
@@ -4,13 +4,18 @@ gemspec
gem 'cramp', :path => File.dirname(__FILE__)
+group :development do
+ gem 'rake'
+ gem 'minitest'
+end
+
group :test do
gem 'turn'
gem 'http_router'
end
group :example do
- gem 'activerecord', '~> 3.0.9'
+ gem 'activerecord'
gem 'mysql2', '~> 0.2.11'
gem 'em-http-request'
View
111 Gemfile.lock
@@ -4,90 +4,117 @@ PATH
cramp (0.15.1)
activesupport (~> 3.0.9)
eventmachine (~> 1.0.0.beta.3)
- faye-websocket (~> 0.3.0)
- rack (~> 1.3.2)
+ faye-websocket (~> 0.4.4)
+ rack (~> 1.4.1)
thor (~> 0.14.6)
GEM
remote: http://rubygems.org/
specs:
- activemodel (3.0.9)
- activesupport (= 3.0.9)
+ activemodel (3.0.12)
+ activesupport (= 3.0.12)
builder (~> 2.1.2)
i18n (~> 0.5.0)
- activerecord (3.0.9)
- activemodel (= 3.0.9)
- activesupport (= 3.0.9)
+ activerecord (3.0.12)
+ activemodel (= 3.0.12)
+ activesupport (= 3.0.12)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
- activesupport (3.0.9)
- addressable (2.2.6)
- ansi (1.3.0)
+ activesupport (3.0.12)
+ addressable (2.2.7)
+ ansi (1.4.2)
+ archive-tar-minitar (0.5.2)
arel (2.0.10)
async-rack (0.5.1)
rack (~> 1.1)
- async_sinatra (0.5.0)
- rack (>= 1.2.1)
- sinatra (>= 1.0)
+ async_sinatra (1.0.0)
+ rack (>= 1.4.1)
+ sinatra (>= 1.3.2)
builder (2.1.2)
- daemons (1.1.4)
- em-http-request (0.3.0)
- addressable (>= 2.0.0)
- escape_utils
- eventmachine (>= 0.12.9)
- em-synchrony (0.2.0)
- eventmachine (>= 0.12.9)
+ columnize (0.3.6)
+ cookiejar (0.3.0)
+ daemons (1.1.8)
+ em-http-request (1.0.2)
+ addressable (>= 2.2.3)
+ cookiejar
+ em-socksify
+ eventmachine (>= 1.0.0.beta.4)
+ http_parser.rb (>= 0.5.3)
+ em-socksify (0.1.0)
+ eventmachine
+ em-synchrony (1.0.0)
+ eventmachine (>= 1.0.0.beta.1)
erubis (2.7.0)
- escape_utils (0.2.3)
- eventmachine (1.0.0.beta.3)
- faye-websocket (0.3.0)
+ eventmachine (1.0.0.beta.4)
+ faye-websocket (0.4.4)
eventmachine (>= 0.12.0)
- http_router (0.10.0)
+ http_parser.rb (0.5.3)
+ http_router (0.10.2)
rack (>= 1.0.0)
url_mount (~> 0.2.1)
i18n (0.5.0)
- kgio (2.6.0)
- mysql2 (0.2.11)
- rack (1.3.2)
- rainbows (4.2.0)
+ kgio (2.7.3)
+ linecache19 (0.5.12)
+ ruby_core_source (>= 0.1.4)
+ minitest (2.11.4)
+ mysql2 (0.2.18)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rainbows (4.3.1)
kgio (~> 2.5)
rack (~> 1.1)
- unicorn (~> 4.0)
- raindrops (0.7.0)
- sinatra (1.2.6)
- rack (~> 1.1)
- tilt (>= 1.2.2, < 2.0)
+ unicorn (~> 4.1)
+ raindrops (0.8.0)
+ rake (0.9.2.2)
+ ruby-debug-base19 (0.11.25)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.5)
+ archive-tar-minitar (>= 0.5.2)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
- tilt (1.3.2)
- turn (0.8.2)
- ansi (>= 1.2.2)
- tzinfo (0.3.29)
- unicorn (4.0.1)
- kgio (~> 2.4)
+ tilt (1.3.3)
+ turn (0.9.4)
+ ansi
+ tzinfo (0.3.32)
+ unicorn (4.2.0)
+ kgio (~> 2.6)
rack
- raindrops (~> 0.6)
+ raindrops (~> 0.7)
url_mount (0.2.1)
rack
- yajl-ruby (0.8.2)
+ yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
- activerecord (~> 3.0.9)
+ activerecord
async-rack
async_sinatra
cramp!
em-http-request
em-synchrony
erubis
http_router
+ minitest
mysql2 (~> 0.2.11)
rainbows
+ rake
+ ruby-debug19
thin (~> 1.2.11)
turn
yajl-ruby
View
4 cramp.gemspec
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
# s.required_ruby_version = '>=1.9.2'
s.add_dependency('activesupport', '~> 3.0.9')
- s.add_dependency('rack', '~> 1.3.2')
+ s.add_dependency('rack', '~> 1.4.1')
s.add_dependency('eventmachine', '~> 1.0.0.beta.3')
- s.add_dependency('faye-websocket', '~> 0.3.0')
+ s.add_dependency('faye-websocket', '~> 0.4.4')
s.add_dependency('thor', '~> 0.14.6')
s.files = Dir['README', 'MIT-LICENSE', 'lib/**/*', 'bin/**/*']
View
3 lib/cramp.rb
@@ -3,7 +3,6 @@
require 'active_support'
require 'active_support/core_ext/class/attribute'
-require 'active_support/core_ext/class/inheritable_attributes'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/module/aliasing'
require 'active_support/core_ext/module/attribute_accessors'
@@ -22,7 +21,7 @@
rescue LoadError
# No fibers available!
end
-
+
module Cramp
VERSION = '0.15.1'
View
3 lib/cramp/callbacks.rb
@@ -4,7 +4,7 @@ module Callbacks
extend ActiveSupport::Concern
included do
- class_inheritable_accessor :before_start_callbacks, :on_finish_callbacks, :on_start_callback, :on_data_callbacks, :instance_reader => false
+ class_attribute :before_start_callbacks, :on_finish_callbacks, :on_start_callback, :on_data_callbacks, :instance_reader => false
self.before_start_callbacks = []
self.on_finish_callbacks = []
@@ -40,7 +40,6 @@ def before_start(n = 0)
def on_start
callback_wrapper { start } if respond_to?(:start)
-
self.class.on_start_callback.each do |callback|
callback_wrapper { send(callback) unless @finished }
end
View
4 lib/cramp/periodic_timer.rb
@@ -4,13 +4,13 @@ module PeriodicTimer
extend ActiveSupport::Concern
included do
- class_inheritable_accessor :periodic_timers, :instance_reader => false
+ class_attribute :periodic_timers, :instance_reader => false
self.periodic_timers ||= []
end
module ClassMethods
def periodic_timer(method, options = {})
- self.periodic_timers << [method, options]
+ self.periodic_timers += [[method, options]]
end
end