epitools 0.1.4 → 0.1.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{epitools}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["epitron"]
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
51
51
  s.homepage = %q{http://github.com/epitron/epitools}
52
52
  s.rdoc_options = ["--charset=UTF-8"]
53
53
  s.require_paths = ["lib"]
54
- s.rubygems_version = %q{1.3.6}
54
+ s.rubygems_version = %q{1.3.7}
55
55
  s.summary = %q{NOT UTILS... METILS!}
56
56
  s.test_files = [
57
57
  "spec/zopen_spec.rb",
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
68
68
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
69
69
  s.specification_version = 3
70
70
 
71
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
71
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
72
72
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
73
73
  else
74
74
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
@@ -7,7 +7,7 @@ __DIR__ = File.dirname(__FILE__)
7
7
  string_to_proc
8
8
  permutations
9
9
  ratio
10
- general
10
+ zopen
11
11
  ].each do |mod|
12
12
  require File.join(__DIR__, "epitools", mod)
13
13
  end
@@ -2,7 +2,14 @@ require 'zlib'
2
2
 
3
3
  #
4
4
  # A mutation of "open" that lets you read/write gzip files, as well as
5
- # regular files. (NOTE: gzip detection is purely based on filename.)
5
+ # regular files. (NOTE: gzip detection is purely based on filename.)
6
+ #
7
+ # It accepts a block just like open().
8
+ #
9
+ # Example:
10
+ # zopen("test.txt") #=> #<File:test.txt>
11
+ # zopen("test.txt.gz") #=> #<Zlib::GzipReader:0xb6c79424>
12
+ # zopen("otherfile.gz", "w") #=> #<Zlib::GzipReader:0xb6c79424>
6
13
  #
7
14
  def zopen(filename, mode="r")
8
15
 
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 4
9
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
10
11
  platform: ruby
11
12
  authors:
12
13
  - epitron
@@ -21,9 +22,11 @@ dependencies:
21
22
  name: rspec
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 13
27
30
  segments:
28
31
  - 1
29
32
  - 2
@@ -81,23 +84,27 @@ rdoc_options:
81
84
  require_paths:
82
85
  - lib
83
86
  required_ruby_version: !ruby/object:Gem::Requirement
87
+ none: false
84
88
  requirements:
85
89
  - - ">="
86
90
  - !ruby/object:Gem::Version
91
+ hash: 3
87
92
  segments:
88
93
  - 0
89
94
  version: "0"
90
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
+ none: false
91
97
  requirements:
92
98
  - - ">="
93
99
  - !ruby/object:Gem::Version
100
+ hash: 3
94
101
  segments:
95
102
  - 0
96
103
  version: "0"
97
104
  requirements: []
98
105
 
99
106
  rubyforge_project:
100
- rubygems_version: 1.3.6
107
+ rubygems_version: 1.3.7
101
108
  signing_key:
102
109
  specification_version: 3
103
110
  summary: NOT UTILS... METILS!