knjappserver 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.21
1
+ 0.0.22
@@ -51,9 +51,8 @@ end
51
51
 
52
52
  require "#{options[:knjrbfw_path]}knjrbfw"
53
53
  require "knj/autoload"
54
- require "tmpdir"
55
54
 
56
- tmpdir = "#{Dir.tmpdir}/knjappserver"
55
+ tmpdir = "#{Knj::Os.tmpdir}/knjappserver"
57
56
  tmppath = "#{tmpdir}/run_#{options[:title]}"
58
57
  count = 0
59
58
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{knjappserver}
8
- s.version = "0.0.21"
8
+ s.version = "0.0.22"
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"]
12
- s.date = %q{2012-04-26}
12
+ s.date = %q{2012-05-03}
13
13
  s.description = %q{Which supports a lot of undocumented stuff.}
14
14
  s.email = %q{k@spernj.org}
15
15
  s.executables = ["check_running.rb", "knjappserver_start.rb"]
@@ -1,6 +1,6 @@
1
1
  class Knjappserver::Httpsession
2
2
  attr_accessor :data, :alert_sent
3
- attr_reader :get, :session, :session_id, :session_hash, :kas, :active, :out, :eruby, :browser, :debug, :resp, :page_path, :post, :cgroup, :meta, :httpsession_var, :handler, :working
3
+ attr_reader :cookie, :get, :session, :session_id, :session_hash, :kas, :active, :out, :eruby, :browser, :debug, :resp, :page_path, :post, :cgroup, :meta, :httpsession_var, :handler, :working
4
4
 
5
5
  dir = File.dirname(__FILE__)
6
6
 
@@ -92,6 +92,7 @@ class Knjappserver
92
92
  return Knj::Locales.number_out(*args)
93
93
  end
94
94
 
95
+ #Hashes with numeric keys will be turned into arrays instead. This is not done automatically because it can wrongly corrupt data if not used correctly.
95
96
  def get_parse_arrays(arg = nil, ob = nil)
96
97
  arg = _get.clone if !arg
97
98
 
@@ -18,6 +18,7 @@ class Knjappserver::Log < Knj::Datarow
18
18
  "
19
19
  end
20
20
 
21
+ return_sql = false
21
22
  sql << " WHERE 1=1"
22
23
 
23
24
  ret = list_helper(d)
@@ -25,6 +26,8 @@ class Knjappserver::Log < Knj::Datarow
25
26
  case key
26
27
  when "object_lookup"
27
28
  sql << " AND Log_link.id IS NOT NULL"
29
+ when "return_sql"
30
+ return_sql = true
28
31
  when "tag"
29
32
  data_val = d.ob.get_by(:Log_data_value, {"value" => val})
30
33
  if !data_val
@@ -41,6 +44,8 @@ class Knjappserver::Log < Knj::Datarow
41
44
  sql << ret[:sql_order]
42
45
  sql << ret[:sql_limit]
43
46
 
47
+ return sql if return_sql
48
+
44
49
  return d.ob.list_bysql(:Log, sql, &block)
45
50
  end
46
51
 
@@ -5,10 +5,9 @@ describe "Knjappserver" do
5
5
  require "rubygems"
6
6
  require "knjappserver"
7
7
  require "knjrbfw"
8
- require "tmpdir"
9
8
  require "knj/autoload"
10
9
 
11
- db_path = "#{Dir.tmpdir}/knjappserver_rspec.sqlite3"
10
+ db_path = "#{Knj::Os.tmpdir}/knjappserver_rspec.sqlite3"
12
11
  File.unlink(db_path) if File.exists?(db_path)
13
12
 
14
13
  require "knj/knjdb/libknjdb.rb"
@@ -5,10 +5,9 @@ describe "Knjappserver" do
5
5
  require "rubygems"
6
6
  require "knjappserver"
7
7
  require "knjrbfw"
8
- require "tmpdir"
9
8
  require "knj/autoload"
10
9
 
11
- db_path = "#{Dir.tmpdir}/knjappserver_rspec.sqlite3"
10
+ db_path = "#{Knj::Os.tmpdir}/knjappserver_rspec.sqlite3"
12
11
  File.unlink(db_path) if File.exists?(db_path)
13
12
 
14
13
  require "knj/knjdb/libknjdb.rb"
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.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-26 00:00:00.000000000 +02:00
12
+ date: 2012-05-03 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: knjrbfw
17
- requirement: &10828140 !ruby/object:Gem::Requirement
17
+ requirement: &16549300 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *10828140
25
+ version_requirements: *16549300
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: erubis
28
- requirement: &10827060 !ruby/object:Gem::Requirement
28
+ requirement: &16547440 !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: *10827060
36
+ version_requirements: *16547440
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: mail
39
- requirement: &10826360 !ruby/object:Gem::Requirement
39
+ requirement: &16546360 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *10826360
47
+ version_requirements: *16546360
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &10825400 !ruby/object:Gem::Requirement
50
+ requirement: &16542740 !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: *10825400
58
+ version_requirements: *16542740
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
- requirement: &10824260 !ruby/object:Gem::Requirement
61
+ requirement: &16525460 !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: *10824260
69
+ version_requirements: *16525460
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jeweler
72
- requirement: &10822320 !ruby/object:Gem::Requirement
72
+ requirement: &16523980 !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: *10822320
80
+ version_requirements: *16523980
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rcov
83
- requirement: &10821260 !ruby/object:Gem::Requirement
83
+ requirement: &16522600 !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: *10821260
91
+ version_requirements: *16522600
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: sqlite3
94
- requirement: &10820300 !ruby/object:Gem::Requirement
94
+ requirement: &16521620 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *10820300
102
+ version_requirements: *16521620
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: json
105
- requirement: &10819440 !ruby/object:Gem::Requirement
105
+ requirement: &16520740 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,7 +110,7 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *10819440
113
+ version_requirements: *16520740
114
114
  description: Which supports a lot of undocumented stuff.
115
115
  email: k@spernj.org
116
116
  executables:
@@ -208,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  segments:
210
210
  - 0
211
- hash: -1162266061337157012
211
+ hash: 2394284405486771539
212
212
  required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  none: false
214
214
  requirements: