knjrbfw 0.0.75 → 0.0.77

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.75
1
+ 0.0.77
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{knjrbfw}
8
- s.version = "0.0.75"
8
+ s.version = "0.0.77"
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-07-29}
12
+ s.date = %q{2012-08-03}
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 = [
@@ -30,6 +30,7 @@ autoload :OpenSSL, "openssl"
30
30
  autoload :OptionParser, "optparse"
31
31
  autoload :ParseDate, $knjpath + "autoload/backups/parsedate"
32
32
  autoload :Pathname, "pathname"
33
+ autoload :Php4r, "php4r"
33
34
  autoload :Ping, $knjpath + "autoload/ping"
34
35
  autoload :REXML, $knjpath + "autoload/rexml"
35
36
  autoload :StringIO, "stringio"
@@ -27,6 +27,7 @@ module Knj::Gtk2::Tv
27
27
 
28
28
  list_store = Gtk::ListStore.new(*model_args)
29
29
  tv.model = list_store
30
+ tv.reorderable = true
30
31
 
31
32
  count = 0
32
33
  columns.each do |args|
@@ -68,9 +69,10 @@ module Knj::Gtk2::Tv
68
69
  raise "Invalid type: '#{args[:type]}'."
69
70
  end
70
71
 
71
- count += 1
72
-
72
+ col.reorderable = true
73
+ col.sort_column_id = count
73
74
  ret[:renderers] << renderer
75
+ count += 1
74
76
  end
75
77
 
76
78
  return ret
@@ -32,6 +32,7 @@ module Knj
32
32
 
33
33
  #Shortcut to Php4r.print_r.
34
34
  def self.p(*args, &block)
35
+ require "php4r" if !Kernel.const_defined?(:Php4r)
35
36
  return Php4r.print_r(*args, &block)
36
37
  end
37
38
 
@@ -359,11 +359,11 @@ class Knj::Objects
359
359
  return obj
360
360
  else
361
361
  @objects[classname][id] = obj
362
+ return obj
362
363
  end
363
364
  end
364
365
 
365
- #Return spawned object.
366
- return obj
366
+ raise "Unexpected run?"
367
367
  end
368
368
 
369
369
  #Same as normal get but returns false if not found instead of raising error.
@@ -24,4 +24,9 @@ describe "Strings" do
24
24
  res = Knj::Strings.is_regex?("/^Kasper$/")
25
25
  raise "Expected res to be true but it wasnt." if !res
26
26
  end
27
+
28
+ it "secs_to_human_time_str" do
29
+ res = Knj::Strings.secs_to_human_time_str(3695)
30
+ raise "Expected '01:01:35' but got: '#{res}'." if res != "01:01:35"
31
+ end
27
32
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: knjrbfw
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.75
5
+ version: 0.0.77
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kasper Johansen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-07-29 00:00:00 +02:00
13
+ date: 2012-08-03 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -394,7 +394,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
394
394
  requirements:
395
395
  - - ">="
396
396
  - !ruby/object:Gem::Version
397
- hash: 1511757075564892829
397
+ hash: 82004692892730684
398
398
  segments:
399
399
  - 0
400
400
  version: "0"