knjappserver 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/knjappserver.gemspec +4 -4
- data/lib/include/class_knjappserver.rb +10 -6
- data/spec/knjappserver_spec.rb +3 -1
- metadata +19 -19
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -10,7 +10,7 @@ GEM
|
|
10
10
|
rake
|
11
11
|
knjdbrevision (0.0.2)
|
12
12
|
knjrbfw
|
13
|
-
knjrbfw (0.0.
|
13
|
+
knjrbfw (0.0.7)
|
14
14
|
rake (0.9.2)
|
15
15
|
rcov (0.9.9)
|
16
16
|
rcov (0.9.9-java)
|
@@ -33,7 +33,7 @@ DEPENDENCIES
|
|
33
33
|
erubis
|
34
34
|
jeweler (~> 1.6.3)
|
35
35
|
knjdbrevision (>= 0.0.2)
|
36
|
-
knjrbfw (>= 0.0.
|
36
|
+
knjrbfw (>= 0.0.7)
|
37
37
|
rcov
|
38
38
|
rspec (~> 2.3.0)
|
39
39
|
sqlite3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
data/knjappserver.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{knjappserver}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.13"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
@@ -75,7 +75,7 @@ Gem::Specification.new do |s|
|
|
75
75
|
s.specification_version = 3
|
76
76
|
|
77
77
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
78
|
-
s.add_runtime_dependency(%q<knjrbfw>, [">= 0.0.
|
78
|
+
s.add_runtime_dependency(%q<knjrbfw>, [">= 0.0.7"])
|
79
79
|
s.add_runtime_dependency(%q<erubis>, [">= 0"])
|
80
80
|
s.add_runtime_dependency(%q<knjdbrevision>, [">= 0.0.2"])
|
81
81
|
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
@@ -84,7 +84,7 @@ Gem::Specification.new do |s|
|
|
84
84
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
85
85
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
86
86
|
else
|
87
|
-
s.add_dependency(%q<knjrbfw>, [">= 0.0.
|
87
|
+
s.add_dependency(%q<knjrbfw>, [">= 0.0.7"])
|
88
88
|
s.add_dependency(%q<erubis>, [">= 0"])
|
89
89
|
s.add_dependency(%q<knjdbrevision>, [">= 0.0.2"])
|
90
90
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
@@ -94,7 +94,7 @@ Gem::Specification.new do |s|
|
|
94
94
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
95
95
|
end
|
96
96
|
else
|
97
|
-
s.add_dependency(%q<knjrbfw>, [">= 0.0.
|
97
|
+
s.add_dependency(%q<knjrbfw>, [">= 0.0.7"])
|
98
98
|
s.add_dependency(%q<erubis>, [">= 0"])
|
99
99
|
s.add_dependency(%q<knjdbrevision>, [">= 0.0.2"])
|
100
100
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
@@ -7,6 +7,8 @@ require "#{File.dirname(__FILE__)}/class_knjappserver_cleaner"
|
|
7
7
|
|
8
8
|
require "timeout"
|
9
9
|
require "digest"
|
10
|
+
require "erubis"
|
11
|
+
require "base64"
|
10
12
|
|
11
13
|
class Knjappserver
|
12
14
|
attr_reader :config, :httpserv, :db, :db_handler, :ob, :translations, :paused, :should_restart, :events, :mod_event, :paused, :db_handler, :gettext, :sessions, :logs_access_pending, :threadpool, :vars, :magic_vars, :types, :eruby_cache
|
@@ -94,12 +96,19 @@ class Knjappserver
|
|
94
96
|
files = [
|
95
97
|
"#{@path_knjrbfw}knjrbfw.rb",
|
96
98
|
"#{@path_knjrbfw}knj/arrayext.rb",
|
99
|
+
"#{@path_knjrbfw}knj/event_handler.rb",
|
100
|
+
"#{@path_knjrbfw}knj/errors.rb",
|
101
|
+
"#{@path_knjrbfw}knj/eruby.rb",
|
102
|
+
"#{@path_knjrbfw}knj/hash_methods.rb",
|
97
103
|
"#{@path_knjrbfw}knj/objects.rb",
|
98
104
|
"#{@path_knjrbfw}knj/web.rb",
|
99
105
|
"#{@path_knjrbfw}knj/datarow.rb",
|
100
106
|
"#{@path_knjrbfw}knj/datet.rb",
|
107
|
+
"#{@path_knjrbfw}knj/php.rb",
|
101
108
|
"#{@path_knjrbfw}knj/thread.rb",
|
102
109
|
"#{@path_knjrbfw}knj/threadhandler.rb",
|
110
|
+
"#{@path_knjrbfw}knj/threadpool.rb",
|
111
|
+
"#{@path_knjrbfw}knj/translations.rb",
|
103
112
|
"#{@path_knjrbfw}knj/knjdb/libknjdb.rb",
|
104
113
|
"#{@path_knjappserver}/class_httpresp.rb",
|
105
114
|
"#{@path_knjappserver}/class_httpserver.rb",
|
@@ -111,12 +120,7 @@ class Knjappserver
|
|
111
120
|
]
|
112
121
|
files.each do |file|
|
113
122
|
STDOUT.print "Loading: '#{file}'.\n" if @config[:debug]
|
114
|
-
|
115
|
-
if @config[:autorestart]
|
116
|
-
self.loadfile(file)
|
117
|
-
else
|
118
|
-
require file
|
119
|
-
end
|
123
|
+
self.loadfile(file)
|
120
124
|
end
|
121
125
|
|
122
126
|
|
data/spec/knjappserver_spec.rb
CHANGED
@@ -5,12 +5,13 @@ describe "Knjappserver" do
|
|
5
5
|
require "rubygems"
|
6
6
|
require "knjappserver"
|
7
7
|
require "knjrbfw"
|
8
|
-
require "knj/autoload"
|
9
8
|
require "tmpdir"
|
10
9
|
|
11
10
|
db_path = "#{Dir.tmpdir}/knjappserver_rspec.sqlite3"
|
12
11
|
File.unlink(db_path) if File.exists?(db_path)
|
13
12
|
|
13
|
+
require "knj/knjdb/libknjdb.rb"
|
14
|
+
require "sqlite3"
|
14
15
|
db = Knj::Db.new(
|
15
16
|
:type => "sqlite3",
|
16
17
|
:path => db_path,
|
@@ -70,6 +71,7 @@ describe "Knjappserver" do
|
|
70
71
|
end
|
71
72
|
|
72
73
|
it "should be able to handle a GET-request." do
|
74
|
+
require "knj/http"
|
73
75
|
$http = Knj::Http.new("host" => "localhost", "port" => 1515)
|
74
76
|
data = $http.get("/spec.rhtml")
|
75
77
|
raise "Unexpected HTML: '#{data["data"]}'." if data["data"].to_s.strip != "Test"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knjappserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,18 +14,18 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: knjrbfw
|
17
|
-
requirement: &
|
17
|
+
requirement: &23495040 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.0.
|
22
|
+
version: 0.0.7
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *23495040
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: erubis
|
28
|
-
requirement: &
|
28
|
+
requirement: &23494220 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *23494220
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: knjdbrevision
|
39
|
-
requirement: &
|
39
|
+
requirement: &23493440 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 0.0.2
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *23493440
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
|
-
requirement: &
|
50
|
+
requirement: &23492660 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 2.3.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *23492660
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: bundler
|
61
|
-
requirement: &
|
61
|
+
requirement: &23491860 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 1.0.0
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *23491860
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: jeweler
|
72
|
-
requirement: &
|
72
|
+
requirement: &23491120 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.6.3
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *23491120
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rcov
|
83
|
-
requirement: &
|
83
|
+
requirement: &23490400 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *23490400
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: sqlite3
|
94
|
-
requirement: &
|
94
|
+
requirement: &23489660 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *23489660
|
103
103
|
description: Which supports a lot of undocumented stuff.
|
104
104
|
email: k@spernj.org
|
105
105
|
executables:
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
segments:
|
174
174
|
- 0
|
175
|
-
hash:
|
175
|
+
hash: 1428082859670065281
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
none: false
|
178
178
|
requirements:
|