sane 0.10.1 → 0.10.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/Rakefile CHANGED
@@ -22,10 +22,8 @@ Jeweler::Tasks.new do |s|
22
22
 
23
23
  s.homepage = 'http://github.com/rogerdpack/sane_ruby'
24
24
  s.authors = ["Roger Pack"]
25
- s.description = s.summary = %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}
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
-
28
- s.add_runtime_dependency("require_all")
29
- s.add_runtime_dependency("backports")
27
+ s.add_runtime_dependency("require_all", '>= 1.0.1')
30
28
  s.add_runtime_dependency("hash_set_operators")
31
29
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
@@ -1,8 +1,6 @@
1
1
  # some uber useful gems
2
2
  require 'rubygems'
3
3
  require 'require_all'
4
- require 'backports/tools.rb' # backports
5
- require 'backports/1.9/io' # File.binread
6
4
  require 'hash_set_operators' # not sure why these aren't in core
7
5
  require_rel 'sane' # require all sub files
8
6
 
@@ -0,0 +1,5 @@
1
+ class File
2
+ def self.binread filename
3
+ File.open(filename, 'rb')do |f| f.read; end
4
+ end
5
+ end
@@ -58,9 +58,16 @@ 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--which lacks in ruby
62
- def sprint *args
63
- print(*args)
61
+ # a method that outputs several items on one line
62
+ # similar to Java's println, but it adds spaces between items, ex:
63
+ # sputs 1,2,3
64
+ # => 1 2 3
65
+ def sputs *args
66
+ for arg in args
67
+ out = arg.to_s
68
+ print out
69
+ print " " if out[-1..-1] != " "
70
+ end
64
71
  puts
65
72
  end
66
73
 
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sane}
8
- s.version = "0.10.1"
8
+ s.version = "0.10.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-11-27}
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}
12
+ s.date = %q{2009-12-01}
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 = [
16
16
  "ChangeLog",
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
28
28
  "lib/sane/array_ave.rb",
29
29
  "lib/sane/bugs.rb",
30
30
  "lib/sane/enumerable-extra.rb",
31
+ "lib/sane/file.rb",
31
32
  "lib/sane/float.rb",
32
33
  "lib/sane/hash_hashes.rb",
33
34
  "lib/sane/hash_set_operators_bug_fix.rb",
@@ -42,24 +43,21 @@ Gem::Specification.new do |s|
42
43
  s.rdoc_options = ["--charset=UTF-8"]
43
44
  s.require_paths = ["lib"]
44
45
  s.rubygems_version = %q{1.3.5}
45
- s.summary = %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}
46
+ 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}
46
47
 
47
48
  if s.respond_to? :specification_version then
48
49
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
50
  s.specification_version = 3
50
51
 
51
52
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
52
- s.add_runtime_dependency(%q<require_all>, [">= 0"])
53
- s.add_runtime_dependency(%q<backports>, [">= 0"])
53
+ s.add_runtime_dependency(%q<require_all>, [">= 1.0.1"])
54
54
  s.add_runtime_dependency(%q<hash_set_operators>, [">= 0"])
55
55
  else
56
- s.add_dependency(%q<require_all>, [">= 0"])
57
- s.add_dependency(%q<backports>, [">= 0"])
56
+ s.add_dependency(%q<require_all>, [">= 1.0.1"])
58
57
  s.add_dependency(%q<hash_set_operators>, [">= 0"])
59
58
  end
60
59
  else
61
- s.add_dependency(%q<require_all>, [">= 0"])
62
- s.add_dependency(%q<backports>, [">= 0"])
60
+ s.add_dependency(%q<require_all>, [">= 1.0.1"])
63
61
  s.add_dependency(%q<hash_set_operators>, [">= 0"])
64
62
  end
65
63
  end
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../lib/sane'
1
+ require File.dirname(File.expand_path __FILE__) + '/../lib/sane'
2
2
  require 'rubygems'
3
3
  class TestSane; end
4
4
 
@@ -48,7 +48,7 @@ describe TestSane do
48
48
  end
49
49
 
50
50
  it "should hash hashes right" do
51
- a = {}
51
+ a = {} # this fails in 1.8.6, or works, rather
52
52
 
53
53
  a[{:a => 3, :b => 4}] = 3
54
54
  assert a[{:b => 4, :a => 3}] == 3
@@ -89,6 +89,9 @@ describe TestSane do
89
89
  it "should have ave method" do
90
90
  [1,2,3].ave.should == 2
91
91
  end
92
-
92
+
93
+ it "should have an sputs method that outputs " do
94
+ sputs 1,2,3
95
+ end
93
96
 
94
97
  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.10.1
4
+ version: 0.10.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-11-27 00:00:00 -07:00
12
+ date: 2009-12-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,17 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: backports
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
23
+ version: 1.0.1
34
24
  version:
35
25
  - !ruby/object:Gem::Dependency
36
26
  name: hash_set_operators
@@ -42,7 +32,7 @@ dependencies:
42
32
  - !ruby/object:Gem::Version
43
33
  version: "0"
44
34
  version:
45
- description: 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
35
+ description: Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there
46
36
  email:
47
37
  - rogerdpack@gmail.com
48
38
  executables: []
@@ -64,6 +54,7 @@ files:
64
54
  - lib/sane/array_ave.rb
65
55
  - lib/sane/bugs.rb
66
56
  - lib/sane/enumerable-extra.rb
57
+ - lib/sane/file.rb
67
58
  - lib/sane/float.rb
68
59
  - lib/sane/hash_hashes.rb
69
60
  - lib/sane/hash_set_operators_bug_fix.rb
@@ -101,6 +92,6 @@ rubyforge_project:
101
92
  rubygems_version: 1.3.5
102
93
  signing_key:
103
94
  specification_version: 3
104
- summary: 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
95
+ summary: Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there
105
96
  test_files: []
106
97