knjrbfw 0.0.9 → 0.0.10

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.9
1
+ 0.0.10
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{knjrbfw}
8
- s.version = "0.0.9"
8
+ s.version = "0.0.10"
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-02-21}
12
+ s.date = %q{2012-02-25}
13
13
  s.description = %q{Including stuff for HTTP, SSH and much more.}
14
14
  s.email = %q{k@spernj.org}
15
15
  s.extra_rdoc_files = [
@@ -165,24 +165,7 @@ class Knj::Datarow
165
165
  }
166
166
  )
167
167
 
168
- define_method("#{val_dc}=") do |newtransval|
169
- _kas.trans_set(self, {
170
- val => newtransval
171
- })
172
- end
173
-
174
- define_method("#{val_dc}") do
175
- return _kas.trans(self, val)
176
- end
177
-
178
- define_method("#{val_dc}_html") do
179
- str = _kas.trans(self, val)
180
- if str.to_s.strip.length <= 0
181
- return "[no translation for #{val}]"
182
- end
183
-
184
- return str
185
- end
168
+ self.define_translation_methods(:val => val, :val_dc => val_dc)
186
169
  end
187
170
  end
188
171
 
@@ -296,6 +279,27 @@ class Knj::Datarow
296
279
  end
297
280
 
298
281
  #Various methods to define methods based on the columns for the datarow.
282
+ def self.define_translation_methods(args)
283
+ define_method("#{args[:val_dc]}=") do |newtransval|
284
+ _kas.trans_set(self, {
285
+ args[:val] => newtransval
286
+ })
287
+ end
288
+
289
+ define_method("#{args[:val_dc]}") do
290
+ return _kas.trans(self, args[:val])
291
+ end
292
+
293
+ define_method("#{args[:val_dc]}_html") do
294
+ str = _kas.trans(self, args[:val])
295
+ if str.to_s.strip.length <= 0
296
+ return "[no translation for #{args[:val]}]"
297
+ end
298
+
299
+ return str
300
+ end
301
+ end
302
+
299
303
  def self.define_bool_methods(args)
300
304
  #Spawns a method on the class which returns true if the data is 1.
301
305
  method_name = "#{args[:col_name]}?".to_sym
@@ -7,7 +7,10 @@ module Knj::Errors
7
7
  class Exists < StandardError; end
8
8
 
9
9
  def self.error_str(err, args = {})
10
- raise "Invalid object of class '#{err.class.name}' given." if !err.is_a?(Exception)
10
+ if !err.is_a?(Exception) and err.class.message != "Java::JavaLang::LinkageError"
11
+ raise "Invalid object of class '#{err.class.name}' given."
12
+ end
13
+
11
14
  str = ""
12
15
 
13
16
  if args[:html]
@@ -35,6 +35,10 @@ class KnjDB_mysql
35
35
  @java_rs_data.delete(id)
36
36
  end
37
37
 
38
+ def clean
39
+ self.tables.clean if self.tables
40
+ end
41
+
38
42
  def reconnect
39
43
  case @subtype
40
44
  when "mysql"
@@ -108,7 +112,7 @@ class KnjDB_mysql
108
112
  when "mysql2"
109
113
  return KnjDB_mysql2_result.new(@conn.query(str, @query_args))
110
114
  when "java"
111
- stmt = conn.createStatement
115
+ stmt = conn.create_statement
112
116
 
113
117
  if str.match(/^\s*(delete|update|create|drop|insert\s+into)\s+/i)
114
118
  begin
@@ -120,7 +124,7 @@ class KnjDB_mysql
120
124
  return nil
121
125
  else
122
126
  begin
123
- res = stmt.executeQuery(str)
127
+ res = stmt.execute_query(str)
124
128
  ret = KnjDB_java_mysql_result.new(@knjdb, @opts, res)
125
129
 
126
130
  #Save reference to result and statement, so we can close them when they are garbage collected.
@@ -163,14 +167,14 @@ class KnjDB_mysql
163
167
  @mutex.synchronize do
164
168
  case @subtype
165
169
  when "mysql"
166
- conn.query_with_result = false
170
+ @conn.query_with_result = false
167
171
  return KnjDB_mysql_unbuffered_result.new(@conn, @opts, @conn.query(str))
168
172
  when "mysql2"
169
173
  raise "MySQL2 does not support unbuffered queries yet! Waiting for :stream..."
170
174
  when "java"
171
- stmt = conn.createStatement
172
-
173
175
  if str.match(/^\s*(delete|update|create|drop|insert\s+into)\s+/i)
176
+ stmt = @conn.createStatement
177
+
174
178
  begin
175
179
  stmt.execute(str)
176
180
  ensure
@@ -179,7 +183,8 @@ class KnjDB_mysql
179
183
 
180
184
  return nil
181
185
  else
182
- stmt.setFetchSize(500)
186
+ stmt = @conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY)
187
+ stmt.setFetchSize(java.lang.Integer::MIN_VALUE)
183
188
 
184
189
  begin
185
190
  res = stmt.executeQuery(str)
@@ -475,7 +480,7 @@ class KnjDB_java_mysql_result
475
480
 
476
481
  @keys = []
477
482
  1.upto(@count) do |count|
478
- @keys << meta.column_name(count).to_sym
483
+ @keys << meta.column_label(count).to_sym
479
484
  end
480
485
  end
481
486
 
@@ -1,5 +1,5 @@
1
1
  class KnjDB_mysql::Tables
2
- attr_reader :db, :driver
2
+ attr_reader :db, :driver, :list
3
3
  attr_accessor :list_should_be_reloaded
4
4
 
5
5
  def initialize(args)
@@ -12,6 +12,10 @@ class KnjDB_mysql::Tables
12
12
  @list_should_be_reloaded = true
13
13
  end
14
14
 
15
+ def clean
16
+ @list.clean
17
+ end
18
+
15
19
  #Returns a table by the given table-name.
16
20
  def [](table_name)
17
21
  table_name = table_name.to_s
@@ -30,33 +34,10 @@ class KnjDB_mysql::Tables
30
34
  end
31
35
 
32
36
  def list(args = {})
33
- ret = {}
37
+ ret = {} unless block_given?
34
38
 
35
39
  @list_mutex.synchronize do
36
40
  @db.q("SHOW TABLE STATUS") do |d_tables|
37
- if @subtype == "java"
38
- d_tables = {
39
- :Name => d_tables[:TABLE_NAME],
40
- :Engine => d_tables[:ENGINE],
41
- :Version => d_tables[:VERSION],
42
- :Row_format => d_tables[:ROW_FORMAT],
43
- :Rows => d_tables[:TABLE_ROWS],
44
- :Avg_row_length => d_tables[:AVG_ROW_LENGTH],
45
- :Data_length => d_tables[:DATA_LENGTH],
46
- :Max_data_length => d_tables[:MAX_DATA_LENGTH],
47
- :Index_length => d_tables[:INDEX_LENGTH],
48
- :Data_free => d_tables[:DATA_FREE],
49
- :Auto_increment => d_tables[:AUTO_INCREMENT],
50
- :Create_time => d_tables[:CREATE_TIME],
51
- :Update_time => d_tables[:UPDATE_TIME],
52
- :Check_time => d_tables[:CHECK_TIME],
53
- :Collation => d_tables[:TABLE_COLLATION],
54
- :Checksum => d_tables[:CHECKSUM],
55
- :Create_options => d_tables[:CREATE_OPTIONS],
56
- :Comment => d_tables[:TABLE_COMMENT]
57
- }
58
- end
59
-
60
41
  obj = @list.get!(d_tables[:Name])
61
42
 
62
43
  if !obj
@@ -77,7 +58,11 @@ class KnjDB_mysql::Tables
77
58
  end
78
59
  end
79
60
 
80
- return ret
61
+ if block_given?
62
+ return nil
63
+ else
64
+ return ret
65
+ end
81
66
  end
82
67
 
83
68
  def create(name, data)
@@ -117,7 +102,7 @@ class KnjDB_mysql::Tables::Table
117
102
  @list = Knj::Wref_map.new
118
103
  @indexes_list = Knj::Wref_map.new
119
104
 
120
- raise "Could not figure out name from keys: '#{@data.keys.sort.join(", ")}'." if !@data[:Name]
105
+ raise "Could not figure out name from: '#{@data}'." if !@data[:Name]
121
106
  end
122
107
 
123
108
  def name
@@ -156,20 +141,6 @@ class KnjDB_mysql::Tables::Table
156
141
  sql = "SHOW FULL COLUMNS FROM `#{self.name}`"
157
142
 
158
143
  @db.q(sql) do |d_cols|
159
- if @subtype == "java"
160
- d_cols = {
161
- :Field => d_cols[:COLUMN_NAME],
162
- :Type => d_cols[:COLUMN_TYPE],
163
- :Collation => d_cols[:COLLATION_NAME],
164
- :Null => d_cols[:IS_NULLABLE],
165
- :Key => d_cols[:COLUMN_KEY],
166
- :Default => d_cols[:COLUMN_DEFAULT],
167
- :Extra => d_cols[:EXTRA],
168
- :Privileges => d_cols[:PRIVILEGES],
169
- :Comment => d_cols[:COLUMN_COMMENT]
170
- }
171
- end
172
-
173
144
  obj = @list.get!(d_cols[:Field])
174
145
 
175
146
  if !obj
@@ -189,8 +160,6 @@ class KnjDB_mysql::Tables::Table
189
160
  end
190
161
  end
191
162
 
192
- raise "No block was given." if !block_given?
193
-
194
163
  return ret
195
164
  end
196
165
 
@@ -199,23 +168,6 @@ class KnjDB_mysql::Tables::Table
199
168
  ret = {}
200
169
 
201
170
  @db.q("SHOW INDEX FROM `#{self.name}`") do |d_indexes|
202
- if @subtype == "java"
203
- d_indexes = {
204
- :Table => d_indexes[:TABLE_NAME],
205
- :Non_unique => d_indexes[:NON_UNIQUE],
206
- :Key_name => d_indexes[:INDEX_NAME],
207
- :Seq_in_index => d_indexes[:SEQ_IN_INDEX],
208
- :Column_name => d_indexes[:COLUMN_NAME],
209
- :Collation => d_indexes[:COLLATION],
210
- :Cardinality => d_indexes[:CARDINALITY],
211
- :Sub_part => d_indexes[:SUB_PART],
212
- :Packed => d_indexes[:PACKED],
213
- :Null => d_indexes[:NULLABLE],
214
- :Index_type => d_indexes[:INDEX_TYPE],
215
- :Comment => d_indexes[:COMMENT]
216
- }
217
- end
218
-
219
171
  next if d_indexes[:Key_name] == "PRIMARY"
220
172
 
221
173
  obj = @indexes_list.get!(d_indexes[:Key_name])
@@ -238,8 +190,6 @@ class KnjDB_mysql::Tables::Table
238
190
  end
239
191
  end
240
192
 
241
- raise "No block was given." if !block_given?
242
-
243
193
  return ret
244
194
  end
245
195
 
@@ -106,6 +106,17 @@ class Knj::Db
106
106
  end
107
107
  end
108
108
 
109
+ #Clean up various memory-stuff if possible.
110
+ def clean
111
+ if @conns
112
+ @conns.objects.each do |data|
113
+ data[:object].clean if data[:object].respond_to?("clean")
114
+ end
115
+ elsif @conn
116
+ @conn.clean if @conn.respond_to?("clean")
117
+ end
118
+ end
119
+
109
120
  def close
110
121
  @conn.close if @conn
111
122
  @conns.destroy if @conns
@@ -44,10 +44,17 @@ class Knj::Db::Revision
44
44
  raise "':return_keys' is not 'symbols' - Knjdbrevision will not work without it." if db.opts[:return_keys] != "symbols"
45
45
  raise "No tables given." if !schema.has_key?("tables")
46
46
 
47
+ #Cache tables to avoid constant reloading.
48
+ tables = db.tables.list
49
+
47
50
  schema["tables"].each do |table_name, table_data|
48
51
  begin
49
52
  begin
50
- table_obj = db.tables[table_name.to_sym]
53
+ table_obj = db.tables[table_name]
54
+
55
+ #Cache indexes- and column-objects to avoid constant reloading.
56
+ cols = table_obj.columns
57
+ indexes = table_obj.indexes
51
58
 
52
59
  if table_data["columns"]
53
60
  first_col = true
@@ -215,7 +222,7 @@ class Knj::Db::Revision
215
222
  end
216
223
  end
217
224
 
218
- self.rows_init("table" => table_obj, "rows" => table_data["rows"]) if table_data["rows"]
225
+ self.rows_init("table" => table_obj, "rows" => table_data["rows"]) if table_data and table_data["rows"]
219
226
  rescue Knj::Errors::NotFound => e
220
227
  if table_data["renames"]
221
228
  table_data["renames"].each do |table_name_rename|
@@ -78,9 +78,16 @@ module Knj::Os
78
78
  :err => ""
79
79
  }
80
80
 
81
- Open3.popen3(cmd) do |stdin, stdout, stderr|
82
- res[:out] << stdout.read
83
- res[:err] << stderr.read
81
+ if RUBY_ENGINE == "jruby"
82
+ IO.popen4(cmd) do |pid, stdin, stdout, stderr|
83
+ res[:out] << stdout.read
84
+ res[:err] << stderr.read
85
+ end
86
+ else
87
+ Open3.popen3(cmd) do |stdin, stdout, stderr|
88
+ res[:out] << stdout.read
89
+ res[:err] << stderr.read
90
+ end
84
91
  end
85
92
 
86
93
  if res[:err].to_s.strip.length > 0
@@ -805,6 +805,67 @@ module Knj::Php
805
805
  return IPAddr.new(ip).to_i
806
806
  end
807
807
 
808
+ # Execute an external program and display raw output.
809
+ def passthru(cmd)
810
+ if RUBY_ENGINE == "jruby"
811
+ IO.popen4(cmd) do |pid, stdin, stdout, stderr|
812
+ tout = Thread.new do
813
+ begin
814
+ stdout.sync = true
815
+ stdout.each do |str|
816
+ $stdout.print str
817
+ end
818
+ rescue Exception => e
819
+ $stdout.print Knj::Errors.error_str(e)
820
+ end
821
+ end
822
+
823
+ terr = Thread.new do
824
+ begin
825
+ stderr.sync = true
826
+ stderr.each do |str|
827
+ $stderr.print str
828
+ end
829
+ rescue Exception => e
830
+ $stdout.print Knj::Errors.error_str(e)
831
+ end
832
+ end
833
+
834
+ tout.join
835
+ terr.join
836
+ end
837
+ else
838
+ Open3.popen3(cmd) do |stdin, stdout, stderr|
839
+ tout = Thread.new do
840
+ begin
841
+ stdout.sync = true
842
+ stdout.each do |str|
843
+ $stdout.print str
844
+ end
845
+ rescue Exception => e
846
+ $stdout.print Knj::Errors.error_str(e)
847
+ end
848
+ end
849
+
850
+ terr = Thread.new do
851
+ begin
852
+ stderr.sync = true
853
+ stderr.each do |str|
854
+ $stderr.print str
855
+ end
856
+ rescue Exception => e
857
+ $stdout.print Knj::Errors.error_str(e)
858
+ end
859
+ end
860
+
861
+ tout.join
862
+ terr.join
863
+ end
864
+ end
865
+
866
+ return nil
867
+ end
868
+
808
869
  # Thanks to this link for the following functions: http://snippets.dzone.com/posts/show/4509
809
870
  def long2ip(long)
810
871
  ip = []
@@ -17,11 +17,18 @@ class Knj::Process_meta
17
17
 
18
18
  exec_file = "#{File.dirname(__FILE__)}/scripts/process_meta_exec.rb"
19
19
 
20
+ if args["id"]
21
+ id = args["id"]
22
+ else
23
+ id = caller[0].to_s.strip
24
+ end
25
+
26
+ cmd = "#{exec_path} \"#{exec_file}\" #{Knj::Strings.unixsafe(id)}"
27
+
20
28
  if RUBY_ENGINE == "jruby"
21
- @pid, @stdin, @stdout, @stderr = IO.popen4("#{exec_path} --#{RUBY_VERSION[0, 3]} \"#{exec_file}\"")
29
+ pid, @stdin, @stdout, @stderr = IO.popen4("#{exec_path} --#{RUBY_VERSION[0, 3]} \"#{exec_file}\" \"#{id}\"")
22
30
  else
23
- @stdin, @stdout, @stderr, wait_thr = Open3.popen3("#{exec_path} \"#{exec_file}\"")
24
- @pid = wait_thr.pid
31
+ @stdin, @stdout, @stderr = Open3.popen3(cmd)
25
32
  end
26
33
 
27
34
  args = {
@@ -40,6 +47,10 @@ class Knj::Process_meta
40
47
 
41
48
  @process = Knj::Process.new(args)
42
49
 
50
+ res = @process.send("obj" => {"type" => "process_data"})
51
+ raise "Unexpected process-data: '#{res}'." if !res.is_a?(Hash) or res["type"] != "process_data_success"
52
+ @pid = res["pid"]
53
+
43
54
  #If block is given then run block and destroy self.
44
55
  if block_given?
45
56
  begin
@@ -308,12 +319,7 @@ class Knj::Process_meta
308
319
 
309
320
  #Destroyes the project and unsets all variables on the Process_meta-object.
310
321
  def destroy
311
- begin
312
- @process.send("obj" => {"type" => "exit"})
313
- rescue Exception => e
314
- raise e if e.message != "exit"
315
- end
316
-
322
+ @process.send("obj" => {"type" => "exit"})
317
323
  @err_thread.kill if @err_thread
318
324
  @process.destroy
319
325
  Process.kill("TERM", @pid)
@@ -322,8 +328,8 @@ class Knj::Process_meta
322
328
  sleep 0.1
323
329
  process_exists = Knj::Unix_proc.list("pids" => [@pid])
324
330
  raise "Process exists." if !process_exists.empty?
325
- rescue
326
- STDOUT.print "Process wont kill - try to kill...\n"
331
+ rescue => e
332
+ raise e if e.message != "Process exists."
327
333
 
328
334
  begin
329
335
  Process.kill(9, pid) if process_exists
@@ -90,7 +90,11 @@ objects = {}
90
90
  d.answer("type" => "call_eval_success", "result" => res)
91
91
  elsif obj["type"] == "exit"
92
92
  d.answer("type" => "exit_success")
93
+ sleep 0.1
94
+ @process.destroy
93
95
  exit
96
+ elsif obj["type"] == "process_data"
97
+ d.answer("type" => "process_data_success", "pid" => Process.pid)
94
98
  else
95
99
  raise "Didnt know how to handle hash: '#{Knj::Php.print_r(obj, true)}'."
96
100
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Knj::Strings
4
4
  def self.UnixSafe(tha_string)
5
- return tha_string.to_s.gsub(" ", "\\ ").gsub("&", "\&").gsub("(", "\\(").gsub(")", "\\)").gsub('"', '\"').gsub("\n", "\"\n\"")
5
+ return tha_string.to_s.gsub(" ", "\\ ").gsub("&", "\&").gsub("(", "\\(").gsub(")", "\\)").gsub('"', '\"').gsub("\n", "\"\n\"").gsub(":", "\\:").gsub('\'', "\\\\'").gsub("`", "\\\\`")
6
6
  end
7
7
 
8
8
  def self.unixsafe(string)
@@ -54,6 +54,8 @@ class Knj::Table_writer
54
54
  else
55
55
  raise "Unsupported format: '#{@args["format"]}'."
56
56
  end
57
+
58
+ return nil
57
59
  end
58
60
 
59
61
  def close
@@ -73,6 +75,8 @@ class Knj::Table_writer
73
75
  else
74
76
  raise "Unsupported format: '#{@args["format"]}'."
75
77
  end
78
+
79
+ return nil
76
80
  end
77
81
 
78
82
  def ext
@@ -40,7 +40,18 @@ class Knj::Unix_proc
40
40
 
41
41
  next if (!args.key?("ignore_self") or args["ignore_self"]) and match[1].to_i == $$.to_i
42
42
  next if grepstr.length > 0 and match[4].index(grepstr) != nil #dont return current process.
43
- next if args.key?("pids") and args["pids"].index(pid) == nil
43
+
44
+ if args.key?("pids")
45
+ found = false
46
+ args["pids"].each do |pid_given|
47
+ if pid_given.to_s == pid.to_s
48
+ found = true
49
+ break
50
+ end
51
+ end
52
+
53
+ next if !found
54
+ end
44
55
 
45
56
  ret << Knj::Unix_proc.spawn(data)
46
57
  end
@@ -2,17 +2,33 @@ require "weakref"
2
2
 
3
3
  #A weak-reference that wont bite you in the ass like the one in Ruby 1.9.
4
4
  class Knj::Wref
5
+ attr_reader :class_name, :id, :map, :map_id, :spawned
6
+
7
+ #Yields debug-output for every weak-ref that is alive.
8
+ def self.debug_wrefs
9
+ ObjectSpace.each_object(Knj::Wref) do |wref|
10
+ begin
11
+ obj = wref.get
12
+ rescue WeakRef::RefError
13
+ yield("str" => "Dead wref: #{wref.class_name} (#{wref.id})", "alive" => false, "wref" => wref)
14
+ next
15
+ end
16
+
17
+ yield("str" => "Alive wref: #{wref.class_name} (#{wref.id})", "alive" => true, "wref" => wref, "obj" => obj)
18
+ end
19
+ end
20
+
5
21
  def initialize(obj)
6
22
  @weakref = WeakRef.new(obj)
7
- @class = obj.class.name
8
- @id = @class.__id__
23
+ @class_name = obj.class.name.to_sym
24
+ @id = obj.__id__
9
25
  end
10
26
 
11
27
  #Returns the object that this weak reference holds or throws WeakRef::RefError.
12
28
  def get
13
29
  obj = @weakref.__getobj__ if @weakref
14
30
 
15
- if !@weakref or @class != obj.class.name or @id != obj.__id__
31
+ if !@weakref or @class_name != obj.class.name.to_sym or @id != obj.__id__
16
32
  self.destroy
17
33
  raise WeakRef::RefError
18
34
  end
@@ -32,9 +48,9 @@ class Knj::Wref
32
48
 
33
49
  #Removes all data from this object.
34
50
  def destroy
35
- @class = nil
36
- @id = nil
37
51
  @weakref = nil
52
+ @class_name = nil
53
+ @id = nil
38
54
  end
39
55
 
40
56
  #Make Wref compatible with the normal WeakRef.
@@ -48,9 +64,17 @@ class Knj::Wref_map
48
64
  @map = {}
49
65
  end
50
66
 
67
+ #Unsets everything to free up memory.
68
+ def destroy
69
+ @map.clear
70
+ @map = nil
71
+ @args = nil
72
+ end
73
+
51
74
  #Sets a new object in the map with a given ID.
52
75
  def set(id, obj)
53
76
  @map[id] = Knj::Wref.new(obj)
77
+ return nil
54
78
  end
55
79
 
56
80
  #Returns a object by ID or raises a RefError.
@@ -60,13 +84,23 @@ class Knj::Wref_map
60
84
  begin
61
85
  return @map[id].get
62
86
  rescue WeakRef::RefError => e
63
- @map[id].destroy
87
+ begin
88
+ @map[id].destroy
89
+ rescue NoMethodError
90
+ #happens if the object already got destroyed by another thread - ignore.
91
+ end
92
+
64
93
  @map.delete(id)
65
94
  raise e
66
95
  end
67
96
  end
68
97
 
69
98
  #Make it hash-compatible.
99
+ def key?(key)
100
+ return @map.key?(key)
101
+ end
102
+
103
+ alias has_key? key?
70
104
  alias [] get
71
105
  alias []= set
72
106
 
@@ -81,13 +115,15 @@ class Knj::Wref_map
81
115
 
82
116
  #Scans the whole map and removes dead references.
83
117
  def clean
84
- @map.each_index do |key|
118
+ @map.keys.each do |key|
85
119
  begin
86
- @map[key].get #this will remove the key if the object no longer exists.
120
+ self.get(key) #this will remove the key if the object no longer exists.
87
121
  rescue WeakRef::RefError
88
122
  #ignore.
89
123
  end
90
124
  end
125
+
126
+ return nil
91
127
  end
92
128
 
93
129
  #Returns true if a given key exists and the object it holds is alive.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knjrbfw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
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-02-21 00:00:00.000000000 +01:00
12
+ date: 2012-02-25 00:00:00.000000000 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &18376800 !ruby/object:Gem::Requirement
17
+ requirement: &12468460 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 2.3.0
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *18376800
25
+ version_requirements: *12468460
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &18376200 !ruby/object:Gem::Requirement
28
+ requirement: &12467800 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.0.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *18376200
36
+ version_requirements: *12467800
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: jeweler
39
- requirement: &18375600 !ruby/object:Gem::Requirement
39
+ requirement: &12467120 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.6.3
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *18375600
47
+ version_requirements: *12467120
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rcov
50
- requirement: &18374980 !ruby/object:Gem::Requirement
50
+ requirement: &12466460 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *18374980
58
+ version_requirements: *12466460
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: sqlite3
61
- requirement: &18374380 !ruby/object:Gem::Requirement
61
+ requirement: &12378800 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *18374380
69
+ version_requirements: *12378800
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rmagick
72
- requirement: &18373860 !ruby/object:Gem::Requirement
72
+ requirement: &12378140 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *18373860
80
+ version_requirements: *12378140
81
81
  description: Including stuff for HTTP, SSH and much more.
82
82
  email: k@spernj.org
83
83
  executables: []
@@ -339,7 +339,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
339
  version: '0'
340
340
  segments:
341
341
  - 0
342
- hash: 59920470394874823
342
+ hash: 3899539011112579633
343
343
  required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  none: false
345
345
  requirements: