torquebox-web 3.0.1-java → 3.0.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f35e1566bb04c5dfba25ce12366ba816eed151f
4
- data.tar.gz: a8e7fd9ae22b1a1ea0e8fa0cf922dd69e20cfcef
3
+ metadata.gz: fde7d8874954f3344565f726dfd357a00242f2b1
4
+ data.tar.gz: cc3385098a1171192b60d168e222056277ef5d3d
5
5
  SHA512:
6
- metadata.gz: df555a30d5d17708ad0d380a82841c1c8ee3d59889370a23ee8f695c43bce168cee135895e0f3018e5a22126ba184baf8f06df2f065a3ac8c39cacdcabbd2a0b
7
- data.tar.gz: b2d966690134749d027bbbc51e3ebbe4d730f46db860af006097864c4372031c08c3ba6ee2d79126df173cd3f29e12955a2a5fb647d774ab83edcfae1d65a7a7
6
+ metadata.gz: 6bffc80a4bbba053eaff9d896523ffa858981178d2414c814dd9a0dc8d855fc0a0cd703f69b69a59d01a8b397ae0e14fdced276022a4f9648294ec1e7b124f59
7
+ data.tar.gz: 55ecd05d6e33fc13ec970f0c98a2f92dde32461664ee4920c6a2c9c17291b3b0341bfad06300712d41a763a746f674e57c1d88ba60e5f1f043f973c05c35bac0
Binary file
data/lib/torquebox-web.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module TorqueboxWeb
2
- VERSION = '3.0.1'
3
- MAVEN_VERSION = '3.0.1'
2
+ VERSION = '3.0.2'
3
+ MAVEN_VERSION = '3.0.2'
4
4
  end
5
5
  begin
6
6
  require 'java'
@@ -55,7 +55,7 @@ module TorqueBox
55
55
 
56
56
  def self.load_session(env)
57
57
  if torquebox_available?
58
- session_data = load_session_data(env['java.servlet_request'].getSession(true))
58
+ session_data = load_session_data(env['java.servlet_request'].getSession(false))
59
59
  else
60
60
  session_data = @test_session_data
61
61
  end
@@ -67,7 +67,7 @@ module TorqueBox
67
67
  session_data = env['rack.session' ]
68
68
  if torquebox_available?
69
69
  ServletStore.store_session_data(env['java.servlet_request'].getSession(true),
70
- session_data)
70
+ session_data) unless session_data.empty?
71
71
  else
72
72
  @test_session_data = session_data
73
73
  end
@@ -75,21 +75,23 @@ module TorqueBox
75
75
 
76
76
  def self.load_session_data(session)
77
77
  session_data = SessionData.new
78
- session_data.java_session = session
79
- session.getAttributeNames.each do |key|
80
- if ( key == RAILS_SESSION_KEY )
81
- marshalled_bytes = session.getAttribute(RAILS_SESSION_KEY)
82
- if ( marshalled_bytes )
83
- data = Marshal.load( String.from_java_bytes( marshalled_bytes ) )
84
- session_data.update( data ) if Hash === data
78
+ if session
79
+ session_data.java_session = session
80
+ session.getAttributeNames.each do |key|
81
+ if ( key == RAILS_SESSION_KEY )
82
+ marshalled_bytes = session.getAttribute(RAILS_SESSION_KEY)
83
+ if ( marshalled_bytes )
84
+ data = Marshal.load( String.from_java_bytes( marshalled_bytes ) )
85
+ session_data.update( data ) if Hash === data
86
+ end
87
+ else
88
+ session_data[key] = session.getAttribute(key)
85
89
  end
86
- else
87
- session_data[key] = session.getAttribute(key)
88
90
  end
91
+ initial_keys = session_data.keys
92
+ session_data[:session_id] = session.getId()
93
+ session_data[:TORQUEBOX_INITIAL_KEYS] = initial_keys
89
94
  end
90
- initial_keys = session_data.keys
91
- session_data[:session_id] = session.getId()
92
- session_data[:TORQUEBOX_INITIAL_KEYS] = initial_keys
93
95
  session_data
94
96
  end
95
97
 
@@ -153,7 +155,7 @@ module TorqueBox
153
155
  def [](key)
154
156
  super(key.to_s)
155
157
  end
156
-
158
+
157
159
  def fetch(key, *args, &block)
158
160
  super(key.to_s, *args, &block)
159
161
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torquebox-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: java
6
6
  authors:
7
7
  - The TorqueBox Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-22 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -49,9 +49,9 @@ files:
49
49
  - lib/torquebox-web.jar
50
50
  - lib/torquebox-web.rb
51
51
  - lib/gem_hook.rb
52
- - lib/torquebox/session/servlet_store.rb
53
- - lib/action_dispatch/session/torque_box_store.rb
54
52
  - lib/action_controller/session/torque_box_store.rb
53
+ - lib/action_dispatch/session/torque_box_store.rb
54
+ - lib/torquebox/session/servlet_store.rb
55
55
  - spec/servlet_store_spec.rb
56
56
  homepage: http://torquebox.org/
57
57
  licenses: