sbsm 1.2.9 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +3 -0
- data/lib/sbsm/cgi.rb +15 -0
- data/lib/sbsm/request.rb +1 -1
- data/lib/sbsm/session.rb +3 -8
- data/lib/sbsm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4c300971692a328081c6b56bd30d327fdb02252
|
4
|
+
data.tar.gz: dcd9b428233ca4fb56e372a76601c8e289a280ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9100a0913b65ca6f7fc7b3a39cf9f6ecd026a2bc92e785dd4f5a462f20a6212bbcb78509b7391c2a1df67c55d3f6a0354282fd554ff34ceafa393a4e8a228958
|
7
|
+
data.tar.gz: b31394abfa5c3ff78f2cdbb640e5fbf7a92c4300dc07969397d5d6d09ffa8f855eefccb5da99d4745bbdea83e950a1bca0cd99270ea6e2bdee568dfce1a36a0e
|
data/History.txt
CHANGED
data/lib/sbsm/cgi.rb
CHANGED
@@ -27,6 +27,21 @@ require 'cgi'
|
|
27
27
|
require 'drb/drb'
|
28
28
|
|
29
29
|
class CGI
|
30
|
+
# Lets satisfy cgi-offline prompt, even if request does not have
|
31
|
+
# REQUEST_METHOD. (It must be mostly for test purpose).
|
32
|
+
# See http://ruby-doc.org/stdlib-2.3.1/libdoc/cgi/rdoc/CGI.html#method-c-new
|
33
|
+
def self.initialize_without_offline_prompt(*args)
|
34
|
+
cgi_input = true
|
35
|
+
unless ENV.has_key?('REQUEST_METHOD')
|
36
|
+
cgi_input = false
|
37
|
+
ENV['REQUEST_METHOD'] = 'GET'
|
38
|
+
end
|
39
|
+
cgi = CGI.new(*args)
|
40
|
+
unless cgi_input
|
41
|
+
ENV.delete('REQUEST_METHOD')
|
42
|
+
end
|
43
|
+
cgi
|
44
|
+
end
|
30
45
|
module TagMaker
|
31
46
|
def nOE_element_def(element, append = nil)
|
32
47
|
s = <<-END
|
data/lib/sbsm/request.rb
CHANGED
@@ -38,7 +38,7 @@ module SBSM
|
|
38
38
|
include DRbUndumped
|
39
39
|
attr_reader :cgi
|
40
40
|
def initialize(drb_uri, html_version = "html4", cgiclass = CGI)
|
41
|
-
@cgi =
|
41
|
+
@cgi = CGI.initialize_without_offline_prompt('html4')
|
42
42
|
@drb_uri = drb_uri
|
43
43
|
@thread = nil
|
44
44
|
@request = Apache.request
|
data/lib/sbsm/session.rb
CHANGED
@@ -36,7 +36,7 @@ require 'delegate'
|
|
36
36
|
module SBSM
|
37
37
|
class Session < SimpleDelegator
|
38
38
|
attr_reader :user, :active_thread, :app, :key, :cookie_input,
|
39
|
-
:unsafe_input, :valid_input, :request_path
|
39
|
+
:unsafe_input, :valid_input, :request_path, :cgi
|
40
40
|
include DRbUndumped
|
41
41
|
PERSISTENT_COOKIE_NAME = "sbsm-persistent-cookie"
|
42
42
|
DEFAULT_FLAVOR = 'sbsm'
|
@@ -50,7 +50,6 @@ module SBSM
|
|
50
50
|
CAP_MAX_THRESHOLD = 8
|
51
51
|
MAX_STATES = 4
|
52
52
|
SERVER_NAME = nil
|
53
|
-
@@cgi = CGI.new('html4')
|
54
53
|
def Session.reset_stats
|
55
54
|
@@stats = {}
|
56
55
|
end
|
@@ -100,8 +99,7 @@ module SBSM
|
|
100
99
|
@unknown_user_class = @user.class
|
101
100
|
@variables = {}
|
102
101
|
@mutex = Mutex.new
|
103
|
-
|
104
|
-
#@cgi = CGI.new('html4')
|
102
|
+
@cgi = CGI.initialize_without_offline_prompt('html4')
|
105
103
|
super(app)
|
106
104
|
end
|
107
105
|
def age(now=Time.now)
|
@@ -132,9 +130,6 @@ module SBSM
|
|
132
130
|
@active_thread = nil
|
133
131
|
true
|
134
132
|
end
|
135
|
-
def cgi
|
136
|
-
@@cgi
|
137
|
-
end
|
138
133
|
@@msie_ptrn = /MSIE/
|
139
134
|
@@win_ptrn = /Win/i
|
140
135
|
def client_activex?
|
@@ -444,7 +439,7 @@ module SBSM
|
|
444
439
|
self
|
445
440
|
end
|
446
441
|
def to_html
|
447
|
-
@state.to_html(
|
442
|
+
@state.to_html(cgi)
|
448
443
|
rescue DRb::DRbConnError
|
449
444
|
raise
|
450
445
|
rescue StandardError => err
|
data/lib/sbsm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbsm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|