hash-utils 0.11.0 → 0.11.1
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 +1 -1
- data/hash-utils.gemspec +3 -3
- data/lib/hash-utils/file.rb +4 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.1
|
data/hash-utils.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hash-utils}
|
8
|
-
s.version = "0.11.
|
8
|
+
s.version = "0.11.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Martin Kozák"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-09}
|
13
13
|
s.email = %q{martinkozak@martinkozak.net}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
@@ -45,7 +45,7 @@ to Ruby's one.
|
|
45
45
|
|
46
46
|
}
|
47
47
|
s.require_paths = ["lib"]
|
48
|
-
s.rubygems_version = %q{1.
|
48
|
+
s.rubygems_version = %q{1.6.2}
|
49
49
|
s.summary = %q{Adds a lot of useful fundamental utility methods which are missing in Ruby, both to Array and Hash classes and introduces some useful methods and syntactic sugar to Object and String classes too.}
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
data/lib/hash-utils/file.rb
CHANGED
@@ -9,7 +9,8 @@
|
|
9
9
|
class File
|
10
10
|
|
11
11
|
##
|
12
|
-
# Writes data to file and closes it in single call.
|
12
|
+
# Writes data to file and closes it in single call. Data are written
|
13
|
+
# in binary mode since +0.11.1+.
|
13
14
|
#
|
14
15
|
# @param [String] filepath path to file
|
15
16
|
# @param [String] data data for write
|
@@ -19,7 +20,7 @@ class File
|
|
19
20
|
|
20
21
|
def self.write(filepath, data = "")
|
21
22
|
len = nil
|
22
|
-
File.open(filepath, "
|
23
|
+
File.open(filepath, "wb") do |io|
|
23
24
|
len = io.write(data)
|
24
25
|
end
|
25
26
|
return len
|
@@ -34,7 +35,7 @@ class File
|
|
34
35
|
#
|
35
36
|
|
36
37
|
def self.touch(filepath)
|
37
|
-
File.open(filepath, "
|
38
|
+
File.open(filepath, "wb").close()
|
38
39
|
end
|
39
40
|
|
40
41
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: hash-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.11.
|
5
|
+
version: 0.11.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Martin Koz\xC3\xA1k"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-09 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
requirements:
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
hash: -
|
95
|
+
hash: -1180165342308683422
|
96
96
|
segments:
|
97
97
|
- 0
|
98
98
|
version: "0"
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
requirements: []
|
106
106
|
|
107
107
|
rubyforge_project:
|
108
|
-
rubygems_version: 1.
|
108
|
+
rubygems_version: 1.6.2
|
109
109
|
signing_key:
|
110
110
|
specification_version: 3
|
111
111
|
summary: Adds a lot of useful fundamental utility methods which are missing in Ruby, both to Array and Hash classes and introduces some useful methods and syntactic sugar to Object and String classes too.
|