sane 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.9.0
@@ -46,7 +46,7 @@ class Object
46
46
  end
47
47
  end unless respond_to? :assert
48
48
 
49
- # helper to bring up a debugger
49
+ # helper to bring up a debugger with less writing [just _dbg]
50
50
  def _dbg
51
51
  require 'rubygems'
52
52
  require 'pp' # who would want debug without pp? not I
@@ -58,13 +58,13 @@ class Object
58
58
  end
59
59
  end
60
60
 
61
- # a method like puts but all on one line--very much like java's println
61
+ # a method like puts but all on one line--very much like java's println--which lacks in ruby
62
62
  def sprint *args
63
63
  print(*args)
64
64
  puts
65
65
  end
66
66
 
67
- def alias_h hash
67
+ def aliash hash
68
68
  hash.each_pair {|new, old|
69
69
  alias_method new, old
70
70
  }
@@ -89,3 +89,10 @@ end
89
89
  if RUBY_VERSION >= '1.9.2'
90
90
  $: << '.' # for some reason loading files from the cwd was taken out. That is not sane.
91
91
  end
92
+
93
+ class OS
94
+ def self.windows?
95
+ require 'rbconfig'
96
+ RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
97
+ end
98
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sane}
8
- s.version = "0.8.0"
8
+ s.version = "0.9.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Roger Pack"]
12
- s.date = %q{2009-10-28}
12
+ s.date = %q{2009-11-03}
13
13
  s.description = %q{Helper methods for ruby to make it easier to work with out of the box--things that are missing from core but should be there}
14
14
  s.email = ["rogerdpack@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -24,7 +24,7 @@ describe TestSane do
24
24
 
25
25
  class A
26
26
  def go; 3; end
27
- alias_h :go2 => :go
27
+ aliash :go2 => :go
28
28
  end
29
29
 
30
30
  it "should aliaz right" do
@@ -67,6 +67,15 @@ describe TestSane do
67
67
  require 'backports' # ugh
68
68
  assert "ab\r\nc".lines[0] == "ab\r\n"
69
69
  end
70
+
71
+ it "should have a windows method" do
72
+ require 'rbconfig'
73
+ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
74
+ assert OS.windows?
75
+ else
76
+ refute OS.windows?
77
+ end
78
+ end
70
79
 
71
80
 
72
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-28 00:00:00 -06:00
12
+ date: 2009-11-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency