gdbm 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -5
- data/lib/gdbm.rb +577 -590
- data/test/test_gdbm-1.8.7.rb +5 -0
- data/test/test_gdbm-1.9.1.rb +12 -3
- metadata +5 -5
data/test/test_gdbm-1.8.7.rb
CHANGED
@@ -6,6 +6,9 @@ rescue LoadError
|
|
6
6
|
end
|
7
7
|
|
8
8
|
if defined? GDBM
|
9
|
+
|
10
|
+
$stderr.puts "WARNING: Loaded non-FFI gdbm library (probably from the standard lib)." unless defined? GDBM_FFI
|
11
|
+
|
9
12
|
require 'tmpdir'
|
10
13
|
require 'fileutils'
|
11
14
|
|
@@ -689,4 +692,6 @@ if defined? GDBM
|
|
689
692
|
}
|
690
693
|
end
|
691
694
|
end
|
695
|
+
else
|
696
|
+
$stderr.puts "WARNING: Did not load gdbm library."
|
692
697
|
end
|
data/test/test_gdbm-1.9.1.rb
CHANGED
@@ -7,14 +7,21 @@ rescue LoadError
|
|
7
7
|
end
|
8
8
|
|
9
9
|
#This is needed because JRuby does not have it implemented yet,
|
10
|
-
#but it's in MRI 1.9 and in the tests below (remove_entry_secure)
|
10
|
+
#but it's in MRI 1.9 and in the tests below (remove_entry_secure).
|
11
|
+
#
|
12
|
+
#This is NOT NECESSARILY 1.9's implementation of it, though.
|
11
13
|
class File::Stat
|
12
|
-
|
13
|
-
|
14
|
+
unless self.instance_methods.include? :world_writable?
|
15
|
+
def world_writable?
|
16
|
+
(self.mode & 0002) != 0
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
|
17
21
|
if defined? GDBM
|
22
|
+
|
23
|
+
$stderr.puts "WARNING: Loaded non-FFI gdbm library (probably from the standard lib)." unless defined? GDBM_FFI
|
24
|
+
|
18
25
|
require 'tmpdir'
|
19
26
|
require 'fileutils'
|
20
27
|
|
@@ -720,4 +727,6 @@ if defined? GDBM
|
|
720
727
|
}
|
721
728
|
end
|
722
729
|
end
|
730
|
+
else
|
731
|
+
$stderr.puts "WARNING: Did not load gdbm library."
|
723
732
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gdbm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "1.
|
4
|
+
version: "1.1"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Collins
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-01 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
16
|
-
description: This library provides a
|
16
|
+
description: This library provides a gdbm library compatible with the MRI standard library, but using Ruby-FFI rather than a C extension. This allows gdbm to easily be used from alternative Ruby implementations, such as JRuby. It can also be used with MRI, if there is some kind of need for that.
|
17
17
|
email:
|
18
18
|
executables: []
|
19
19
|
|
@@ -50,9 +50,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements: []
|
51
51
|
|
52
52
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.3.
|
53
|
+
rubygems_version: 1.3.4
|
54
54
|
signing_key:
|
55
55
|
specification_version: 3
|
56
|
-
summary: Provides
|
56
|
+
summary: Provides access to gdbm through Ruby-FFI, particularly for JRuby and other alternative Ruby implementations.
|
57
57
|
test_files: []
|
58
58
|
|