lib/rails_current.rb in rails_current-2.1.0 vs lib/rails_current.rb in rails_current-2.2.0

- old
+ new

@@ -1,16 +1,17 @@ # -*- encoding : utf-8 -*- module Current - VERSION = '2.1.0' + VERSION = '2.2.0' + def Current.version VERSION end def Current.dependencies { - 'map' => [ 'map' , ' >= 6.0.1' ] + 'map' => [ 'map', ' ~> 6.0' ] } end def Current.description "track 'current_user' et all in a tidy, global, and thread-safe fashion for your rails apps" @@ -170,12 +171,12 @@ controller = mock_controller_class.new controller.perform_caching = true controller.cache_store = store - request = ActionDispatch::TestRequest.create({}) - response = ActionDispatch::TestResponse.create({}) + request = ActionDispatch::TestRequest.create + response = ActionDispatch::TestResponse.create controller.request = request controller.response = response singleton_class = @@ -243,14 +244,10 @@ def Current.proxy_for(object) Proxy.new(object) end end -def Current(*args, &block) - Current.attribute(*args, &block) -end - if defined?(Rails) ## # module Current @@ -299,5 +296,6 @@ BEGIN { Object.send(:remove_const, :Current) if defined?(::Current) Object.send(:remove_const, :Rails_current) if defined?(::Rails_current) } +