tdb 0.6.1 → 0.6.1.5.g0e13

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 566a2f467d6fde078bf27e6731baa8fb28a44136
4
+ data.tar.gz: 932d52cacc14466993a46798ea010f308050ed16
5
+ SHA512:
6
+ metadata.gz: 4b77a3c9b3f018c3b51b6a4e3c76f1e9cec70617076357c1cba0cb21b7ca655beeb43ca39eb345500b394174c53bb844c345ab61e07e992cb2ecccecf8b43a1f
7
+ data.tar.gz: 39bc9317b287e32651b58c6809d47edd53f39794384cd58a8faba60bc9cf0f07bb9acf91f819b4fffb62bfe867516843649e88aa5feca217d7a46a23cef0b040
@@ -70,8 +70,8 @@ static void my_raise(struct tdb_context *tdb)
70
70
  exc = rb_hash_aref(exc_hash, INT2NUM(ecode));
71
71
  }
72
72
  if (NIL_P(exc))
73
- rb_bug("no-existent exception: %s\n", str);
74
- rb_raise(exc, str);
73
+ rb_bug("non-existent exception: %s\n", str);
74
+ rb_raise(exc, "%s", str);
75
75
  }
76
76
 
77
77
  static void init_hashes(void)
@@ -94,20 +94,15 @@ rb_hash_aset(hashes,ID2SYM(rb_intern(#x)),ULONG2NUM((unsigned long)rbtdb_##x))
94
94
  HF(default);
95
95
  }
96
96
 
97
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL) /* Ruby 2.1+ */
98
+ # include <ruby/thread.h>
99
+ # define WITHOUT_GVL(fn,a,ubf,b) \
100
+ rb_thread_call_without_gvl((fn),(a),(ubf),(b))
97
101
  /* partial emulation of the 1.9 rb_thread_blocking_region under 1.8 */
98
- #if defined(HAVE_RB_THREAD_BLOCKING_REGION) && \
99
- defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
100
- /*
101
- * Ruby 1.9 - 2.1 (we use deprecated rb_thread_blocking_region in 2.0+
102
- * because we can detect (but not use) rb_thread_blocking_region in 1.9.3
103
- */
102
+ #elif defined(HAVE_RB_THREAD_BLOCKING_REGION) /* Ruby 1.9-2.0 */
104
103
  typedef VALUE (*my_blocking_fn_t)(void*);
105
104
  # define WITHOUT_GVL(fn,a,ubf,b) \
106
105
  rb_thread_blocking_region((my_blocking_fn_t)(fn),(a),(ubf),(b))
107
- #elif defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL) /* Ruby 2.2+ */
108
- #include <ruby/thread.h>
109
- # define WITHOUT_GVL(fn,a,ubf,b) \
110
- rb_thread_call_without_gvl((fn),(a),(ubf),(b))
111
106
  #else /* Ruby 1.8 */
112
107
  # include <rubysig.h>
113
108
  # define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
@@ -1,6 +1,7 @@
1
1
  # -*- encoding: binary -*-
2
2
 
3
3
  # WARNING: this is not recommended, it is still possible to break this
4
+ require 'thread'
4
5
  module TDB::MT
5
6
  def initialize
6
7
  super
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.summary = summary
19
19
  s.test_files = Dir['test/test_*.rb']
20
20
  s.extensions = %w(ext/tdb/extconf.rb)
21
- s.add_development_dependency('wrongdoc', '~> 1.6.2')
21
+ s.add_development_dependency('wrongdoc', '~> 1.8', '>= 1.8.1')
22
22
  s.licenses = %w(LGPLv2.1+)
23
23
  end
@@ -73,6 +73,10 @@ class Test_TDB_MT < Test::Unit::TestCase
73
73
 
74
74
  def test_check_methods
75
75
  m = TDB.instance_methods.sort
76
+ if String === m[0]
77
+ warn "skipping test under Ruby 1.8"
78
+ return
79
+ end
76
80
  m -= Object.instance_methods
77
81
  m -= Enumerable.instance_methods
78
82
  m.map! { |x| x.to_sym }
metadata CHANGED
@@ -1,39 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
5
- prerelease:
4
+ version: 0.6.1.5.g0e13
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ruby tdb hackers
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-10 00:00:00.000000000 Z
11
+ date: 2014-10-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: wrongdoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 1.6.2
19
+ version: '1.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.8.1
22
23
  type: :development
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.8'
30
+ - - ">="
28
31
  - !ruby/object:Gem::Version
29
- version: 1.6.2
30
- description: ! 'TDB is much like other DBM implementations, except it allows concurrent
31
-
32
+ version: 1.8.1
33
+ description: |-
34
+ TDB is much like other DBM implementations, except it allows concurrent
32
35
  writer processes. TDB was initially developed for Samba, but is used by
33
-
34
36
  other projects as well. These Ruby bindings allow Ruby apps to read and
35
-
36
- write to the same databases used by Samba!'
37
+ write to the same databases used by Samba!
37
38
  email: ruby.tdb@librelist.org
38
39
  executables: []
39
40
  extensions:
@@ -50,10 +51,10 @@ extra_rdoc_files:
50
51
  - ext/tdb/tdb.c
51
52
  - LATEST
52
53
  files:
53
- - .document
54
- - .gitignore
55
- - .manifest
56
- - .wrongdoc.yml
54
+ - ".document"
55
+ - ".gitignore"
56
+ - ".manifest"
57
+ - ".wrongdoc.yml"
57
58
  - COPYING
58
59
  - ChangeLog
59
60
  - GIT-VERSION-FILE
@@ -89,33 +90,32 @@ files:
89
90
  homepage: http://bogomips.org/ruby-tdb/
90
91
  licenses:
91
92
  - LGPLv2.1+
93
+ metadata: {}
92
94
  post_install_message:
93
95
  rdoc_options:
94
- - -t
96
+ - "-t"
95
97
  - tdb - Trivial Database bindings for Ruby
96
- - -W
98
+ - "-W"
97
99
  - http://bogomips.org/ruby-tdb.git/tree/%s
98
100
  require_paths:
99
101
  - lib
100
102
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
103
  requirements:
103
- - - ! '>='
104
+ - - ">="
104
105
  - !ruby/object:Gem::Version
105
106
  version: '0'
106
107
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
108
  requirements:
109
- - - ! '>='
109
+ - - ">"
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 1.3.1
112
112
  requirements: []
113
113
  rubyforge_project: qrp
114
- rubygems_version: 1.8.23
114
+ rubygems_version: 2.4.1
115
115
  signing_key:
116
- specification_version: 3
116
+ specification_version: 4
117
117
  summary: Trivial Database bindings for Ruby
118
118
  test_files:
119
+ - test/test_tdb.rb
119
120
  - test/test_tdb_mt.rb
120
121
  - test/test_tdb_hash_functions.rb
121
- - test/test_tdb.rb