mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add actionpack as a dependency
This commit is contained in:
parent
8fde483eb0
commit
53c82f6dc0
3 changed files with 39 additions and 2 deletions
33
Gemfile.lock
33
Gemfile.lock
|
@ -2,6 +2,7 @@ PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
actioncable (0.1.0)
|
actioncable (0.1.0)
|
||||||
|
actionpack (>= 4.2.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
celluloid (~> 0.16.0)
|
celluloid (~> 0.16.0)
|
||||||
em-hiredis (~> 0.3.0)
|
em-hiredis (~> 0.3.0)
|
||||||
|
@ -12,17 +13,32 @@ PATH
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (4.2.3)
|
actionpack (4.2.1)
|
||||||
|
actionview (= 4.2.1)
|
||||||
|
activesupport (= 4.2.1)
|
||||||
|
rack (~> 1.6)
|
||||||
|
rack-test (~> 0.6.2)
|
||||||
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
||||||
|
actionview (4.2.1)
|
||||||
|
activesupport (= 4.2.1)
|
||||||
|
builder (~> 3.1)
|
||||||
|
erubis (~> 2.7.0)
|
||||||
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||||
|
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
||||||
|
activesupport (4.2.1)
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
json (~> 1.7, >= 1.7.7)
|
json (~> 1.7, >= 1.7.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
|
builder (3.2.2)
|
||||||
celluloid (0.16.0)
|
celluloid (0.16.0)
|
||||||
timers (~> 4.0.0)
|
timers (~> 4.0.0)
|
||||||
em-hiredis (0.3.0)
|
em-hiredis (0.3.0)
|
||||||
eventmachine (~> 1.0)
|
eventmachine (~> 1.0)
|
||||||
hiredis (~> 0.5.0)
|
hiredis (~> 0.5.0)
|
||||||
|
erubis (2.7.0)
|
||||||
eventmachine (1.0.7)
|
eventmachine (1.0.7)
|
||||||
faye-websocket (0.9.2)
|
faye-websocket (0.9.2)
|
||||||
eventmachine (>= 0.12.0)
|
eventmachine (>= 0.12.0)
|
||||||
|
@ -31,13 +47,28 @@ GEM
|
||||||
hitimes (1.2.2)
|
hitimes (1.2.2)
|
||||||
i18n (0.7.0)
|
i18n (0.7.0)
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
|
loofah (2.0.2)
|
||||||
|
nokogiri (>= 1.5.9)
|
||||||
metaclass (0.0.4)
|
metaclass (0.0.4)
|
||||||
|
mini_portile (0.6.2)
|
||||||
minitest (5.7.0)
|
minitest (5.7.0)
|
||||||
mocha (1.1.0)
|
mocha (1.1.0)
|
||||||
metaclass (~> 0.0.1)
|
metaclass (~> 0.0.1)
|
||||||
|
nokogiri (1.6.6.2)
|
||||||
|
mini_portile (~> 0.6.0)
|
||||||
puma (2.10.2)
|
puma (2.10.2)
|
||||||
rack (>= 1.1, < 2.0)
|
rack (>= 1.1, < 2.0)
|
||||||
rack (1.6.0)
|
rack (1.6.0)
|
||||||
|
rack-test (0.6.3)
|
||||||
|
rack (>= 1.0)
|
||||||
|
rails-deprecated_sanitizer (1.0.3)
|
||||||
|
activesupport (>= 4.2.0.alpha)
|
||||||
|
rails-dom-testing (1.0.6)
|
||||||
|
activesupport (>= 4.2.0.beta, < 5.0)
|
||||||
|
nokogiri (~> 1.6.0)
|
||||||
|
rails-deprecated_sanitizer (>= 1.0.1)
|
||||||
|
rails-html-sanitizer (1.0.2)
|
||||||
|
loofah (~> 2.0)
|
||||||
rake (10.4.2)
|
rake (10.4.2)
|
||||||
redis (3.2.1)
|
redis (3.2.1)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
|
|
|
@ -12,6 +12,7 @@ Gem::Specification.new do |s|
|
||||||
s.platform = Gem::Platform::RUBY
|
s.platform = Gem::Platform::RUBY
|
||||||
|
|
||||||
s.add_dependency 'activesupport', '>= 4.2.0'
|
s.add_dependency 'activesupport', '>= 4.2.0'
|
||||||
|
s.add_dependency 'actionpack', '>= 4.2.0'
|
||||||
s.add_dependency 'faye-websocket', '~> 0.9.2'
|
s.add_dependency 'faye-websocket', '~> 0.9.2'
|
||||||
s.add_dependency 'websocket-driver', '= 0.5.4'
|
s.add_dependency 'websocket-driver', '= 0.5.4'
|
||||||
s.add_dependency 'celluloid', '~> 0.16.0'
|
s.add_dependency 'celluloid', '~> 0.16.0'
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
require 'action_dispatch/http/request'
|
||||||
|
|
||||||
module ActionCable
|
module ActionCable
|
||||||
module Connection
|
module Connection
|
||||||
# For every websocket the cable server is accepting, a Connection object will be instantiated. This instance becomes the parent
|
# For every websocket the cable server is accepting, a Connection object will be instantiated. This instance becomes the parent
|
||||||
|
@ -117,7 +119,10 @@ module ActionCable
|
||||||
protected
|
protected
|
||||||
# The request that initiated the websocket connection is available here. This gives access to the environment, cookies, etc.
|
# The request that initiated the websocket connection is available here. This gives access to the environment, cookies, etc.
|
||||||
def request
|
def request
|
||||||
@request ||= ActionDispatch::Request.new(Rails.application.env_config.merge(env))
|
@request ||= begin
|
||||||
|
environment = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
|
||||||
|
ActionDispatch::Request.new(environment || env)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# The cookies of the request that initiated the websocket connection. Useful for performing authorization checks.
|
# The cookies of the request that initiated the websocket connection. Useful for performing authorization checks.
|
||||||
|
|
Loading…
Reference in a new issue