sane 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.17.0
1
+ 0.17.1
@@ -1,4 +1,8 @@
1
1
  # require some "necessary" other gems
2
+
3
+ # shouldn't need this next line
4
+ # require 'rubygems' if RUBY_VERSION < '1.9' # for the other requires
5
+
2
6
  require 'require_all' # for require_rel
3
7
  require 'os'
4
8
  require 'andand'
@@ -0,0 +1,3 @@
1
+ class Array
2
+ alias :blank? :empty?
3
+ end
@@ -0,0 +1,3 @@
1
+ class Array
2
+ alias :contain? include?
3
+ end
@@ -0,0 +1,18 @@
1
+ class Array
2
+ def select!
3
+ where_at = 0
4
+ total = length
5
+ each{|member|
6
+ if yield(member)
7
+ self[where_at] = member
8
+ where_at += 1
9
+ end
10
+ }
11
+ while(where_at < total)
12
+ self[where_at] = nil
13
+ where_at += 1
14
+ end
15
+ compact! # there may be a better way...
16
+ self
17
+ end
18
+ end
@@ -48,7 +48,7 @@ class Object
48
48
 
49
49
  # helper to bring up a debugger with less writing [just _dbg]
50
50
  def _dbg
51
- require 'rubygems'
51
+ require 'rubygems' if RUBY_VERSION < '1.9' # for ruby-debug gem
52
52
  require 'pp' # who would want debug without pp? not I
53
53
  begin
54
54
  require 'ruby-debug'
@@ -0,0 +1,3 @@
1
+ class String
2
+ alias :blank? :empty?
3
+ 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.17.0
4
+ version: 0.17.1
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-12-22 00:00:00 -07:00
12
+ date: 2010-01-06 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -62,6 +62,9 @@ files:
62
62
  - lib/sane.rb
63
63
  - lib/sane/add_regexes.rb
64
64
  - lib/sane/array_ave.rb
65
+ - lib/sane/array_blank.rb
66
+ - lib/sane/array_contain.rb
67
+ - lib/sane/array_select_bang.rb
65
68
  - lib/sane/bugs.rb
66
69
  - lib/sane/contain.rb
67
70
  - lib/sane/enumerable-extra.rb
@@ -72,7 +75,7 @@ files:
72
75
  - lib/sane/hash_minus_hash.rb
73
76
  - lib/sane/irb_startup_options.rb
74
77
  - lib/sane/sane_random.rb
75
- - sane.gemspec
78
+ - lib/sane/string_blank.rb
76
79
  - spec/spec.sane.rb
77
80
  - todo
78
81
  - TODO
@@ -1,71 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{sane}
8
- s.version = "0.17.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Roger Pack"]
12
- s.date = %q{2009-12-22}
13
- s.description = %q{Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there}
14
- s.email = ["rogerdpack@gmail.com"]
15
- s.extra_rdoc_files = [
16
- "ChangeLog",
17
- "README",
18
- "TODO"
19
- ]
20
- s.files = [
21
- "ChangeLog",
22
- "README",
23
- "Rakefile",
24
- "VERSION",
25
- "lib/_dbg.rb",
26
- "lib/sane.rb",
27
- "lib/sane/add_regexes.rb",
28
- "lib/sane/array_ave.rb",
29
- "lib/sane/bugs.rb",
30
- "lib/sane/contain.rb",
31
- "lib/sane/enumerable-extra.rb",
32
- "lib/sane/file.rb",
33
- "lib/sane/file_filename.rb",
34
- "lib/sane/float.rb",
35
- "lib/sane/hash_hashes.rb",
36
- "lib/sane/hash_minus_hash.rb",
37
- "lib/sane/irb_startup_options.rb",
38
- "lib/sane/sane_random.rb",
39
- "sane.gemspec",
40
- "spec/spec.sane.rb",
41
- "todo"
42
- ]
43
- s.homepage = %q{http://github.com/rogerdpack/sane_ruby}
44
- s.rdoc_options = ["--charset=UTF-8"]
45
- s.require_paths = ["lib"]
46
- s.rubygems_version = %q{1.3.5}
47
- s.summary = %q{Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there}
48
- s.test_files = [
49
- "spec/spec.sane.rb"
50
- ]
51
-
52
- if s.respond_to? :specification_version then
53
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
- s.specification_version = 3
55
-
56
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
57
- s.add_runtime_dependency(%q<rdp-require_all>, [">= 0"])
58
- s.add_runtime_dependency(%q<os>, [">= 0"])
59
- s.add_runtime_dependency(%q<andand>, [">= 0"])
60
- else
61
- s.add_dependency(%q<rdp-require_all>, [">= 0"])
62
- s.add_dependency(%q<os>, [">= 0"])
63
- s.add_dependency(%q<andand>, [">= 0"])
64
- end
65
- else
66
- s.add_dependency(%q<rdp-require_all>, [">= 0"])
67
- s.add_dependency(%q<os>, [">= 0"])
68
- s.add_dependency(%q<andand>, [">= 0"])
69
- end
70
- end
71
-