sane 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,18 +1,16 @@
1
- * renamed println to sprint
2
-
3
-
4
- 0.1.0
5
- * add File.write [stolen from facets]
6
-
7
- 0.0.8
8
- * add __DIR__ [stolen from oldrcrs]
9
-
10
- 0.0.6
11
- * bug fix [require andand]
12
-
13
- 0.0.5
14
- * add dependency on andand, rogerdpack-rbeautify # essentials
15
- * add dbg call [essential]
16
-
17
- 0.0.3
18
- * add assert method
1
+ # 3: add hash_set_operators
2
+ # 0.2.2: add Regex+Regex, bug fixes
3
+ # 0.2.0:
4
+ # add irb simple prompt, auto indent by default [sane defaults!]
5
+ # 1: add $: << '.', don't do Hash#hash on 1.9
6
+ # 0.1.
7
+ # 9 add irb autocompletion on by default [if you're in an IRB session, that is]
8
+ # 8 add Hash#hash
9
+ # 7 add File.binwrite
10
+ # rename aliaz alias_h [ for alias hash ]
11
+ # 6 add File.binread [1.9 has it, 1.8 not]
12
+ # 5 remove #sum method [not rails compat]
13
+ # 4 add _dbg as a file
14
+ # 0.1.3 require 'pp' with _dbg
15
+ # 0.1.2 add singleton_class
16
+ # 0.1.1 add aliaz
data/Rakefile CHANGED
@@ -24,6 +24,7 @@ Jeweler::Tasks.new do |s|
24
24
  s.authors = ["Roger Pack"]
25
25
  s.description = 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}
26
26
  s.email = ["rogerdpack@gmail.com"]
27
- s.add_runtime_dependency("rdp-require_all")
28
- s.add_runtime_dependency("hash_set_operators")
27
+ s.add_dependency("rdp-require_all")
28
+ s.add_dependency("hash_set_operators")
29
+ s.add_dependency 'os'
29
30
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.0
1
+ 0.12.2
data/lib/sane.rb CHANGED
@@ -1,12 +1,13 @@
1
1
  # require some "necessary" gems
2
2
 
3
3
  require 'rubygems' if RUBY_VERSION < '1.9' # for the other requires
4
- require 'require_all'
4
+
5
+ require 'require_all' # for require_rel
5
6
  require 'hash_set_operators' # not sure why this one isn't in core
7
+ require 'os'
6
8
 
7
9
  require_rel 'sane' # and require all files in sub directory
8
10
 
9
-
10
11
  class Sane
11
12
  # helper for installing it locally on 1.8
12
13
  # if you want to be able to use it without rubygems
@@ -0,0 +1,5 @@
1
+ class String
2
+ def contain? something
3
+ include? something
4
+ end
5
+ end
data/sane.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sane}
8
- s.version = "0.12.0"
8
+ s.version = "0.12.2"
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-12-15}
12
+ s.date = %q{2009-12-16}
13
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
14
  s.email = ["rogerdpack@gmail.com"]
15
15
  s.extra_rdoc_files = [
@@ -27,13 +27,13 @@ Gem::Specification.new do |s|
27
27
  "lib/sane/add_regexes.rb",
28
28
  "lib/sane/array_ave.rb",
29
29
  "lib/sane/bugs.rb",
30
+ "lib/sane/contain.rb",
30
31
  "lib/sane/enumerable-extra.rb",
31
32
  "lib/sane/file.rb",
32
33
  "lib/sane/float.rb",
33
34
  "lib/sane/hash_hashes.rb",
34
35
  "lib/sane/hash_set_operators_bug_fix.rb",
35
36
  "lib/sane/irb_startup_options.rb",
36
- "lib/sane/os.rb",
37
37
  "lib/sane/sane_random.rb",
38
38
  "sane.gemspec",
39
39
  "spec/test_sane.spec",
@@ -52,13 +52,16 @@ Gem::Specification.new do |s|
52
52
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
53
53
  s.add_runtime_dependency(%q<rdp-require_all>, [">= 0"])
54
54
  s.add_runtime_dependency(%q<hash_set_operators>, [">= 0"])
55
+ s.add_runtime_dependency(%q<os>, [">= 0"])
55
56
  else
56
57
  s.add_dependency(%q<rdp-require_all>, [">= 0"])
57
58
  s.add_dependency(%q<hash_set_operators>, [">= 0"])
59
+ s.add_dependency(%q<os>, [">= 0"])
58
60
  end
59
61
  else
60
62
  s.add_dependency(%q<rdp-require_all>, [">= 0"])
61
63
  s.add_dependency(%q<hash_set_operators>, [">= 0"])
64
+ s.add_dependency(%q<os>, [">= 0"])
62
65
  end
63
66
  end
64
67
 
data/spec/test_sane.spec CHANGED
@@ -103,6 +103,7 @@ describe Sane do
103
103
  it "should allow for contain? and include?" do
104
104
  assert "a".include? "a"
105
105
  assert "a".contain? "a"
106
+ assert !("a".contain? "b")
106
107
  end
107
108
 
108
109
  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.12.0
4
+ version: 0.12.2
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-15 00:00:00 -07:00
12
+ date: 2009-12-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,6 +32,16 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: "0"
34
34
  version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: os
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
35
45
  description: Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there
36
46
  email:
37
47
  - rogerdpack@gmail.com
@@ -53,13 +63,13 @@ files:
53
63
  - lib/sane/add_regexes.rb
54
64
  - lib/sane/array_ave.rb
55
65
  - lib/sane/bugs.rb
66
+ - lib/sane/contain.rb
56
67
  - lib/sane/enumerable-extra.rb
57
68
  - lib/sane/file.rb
58
69
  - lib/sane/float.rb
59
70
  - lib/sane/hash_hashes.rb
60
71
  - lib/sane/hash_set_operators_bug_fix.rb
61
72
  - lib/sane/irb_startup_options.rb
62
- - lib/sane/os.rb
63
73
  - lib/sane/sane_random.rb
64
74
  - sane.gemspec
65
75
  - spec/test_sane.spec
data/lib/sane/os.rb DELETED
@@ -1,11 +0,0 @@
1
- class OS
2
-
3
- # OS.windows?
4
- # true if on windows [and/or jruby]
5
- # false if on linux or cygwin
6
- def self.windows?
7
- require 'rbconfig'
8
- RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
9
- end
10
-
11
- end