leveldb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/leveldb/version.rb +1 -1
  3. metadata +15 -2
  4. data/lib/fiddler.rb +0 -77
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d547f092bdcb30953adbf70670bc8d6342eac11
4
- data.tar.gz: d446c8980b3ee0c230932722e73c408ab70f4660
3
+ metadata.gz: 48578e37fa490da4f33b59f2d858ebf384eaa6b1
4
+ data.tar.gz: 396172ae4fd81be3c4a83284977a707d63f83ce2
5
5
  SHA512:
6
- metadata.gz: da8e914f735c3846b8a0c24541cc9cd5bc203f32afd61c7b287ed7142401b5b74c8990ce77f17e894a8145dd5e23eae70e55fbe3ae5fcef05c8c4b1601a24da0
7
- data.tar.gz: 3c4770ed0ff4f84ac01af8bcaa2a217a614c33ccbfb90211b82924a98b1336e51a6b1cb4f63068639b9121222537c3213445f5a477bfd472e2ae6f6df4851425
6
+ metadata.gz: 9f2e32505426b075e3df93420497f8139d6f48f37a23c6b9fc25cefd6d2e96b95494a69c470f2eff494f24490ba59e48bdae0332a31ced4c7111347e2261bc13
7
+ data.tar.gz: 40668670e25b372676574c710be01f46bc451683c0a33f3f31a6ac2379a5ff0623340459f2d6ef9dba48fcc74a0de7f547ca52ade221bfc35ca4ff22ac750b3d
@@ -1,3 +1,3 @@
1
1
  module LevelDB
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leveldb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DAddYE
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2013-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fiddler-rb
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.1
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +210,6 @@ files:
196
210
  - ext/leveldb/build_config.mk
197
211
  - ext/leveldb/LICENSE
198
212
  - ext/leveldb/Makefile
199
- - lib/fiddler.rb
200
213
  - lib/leveldb/batch.rb
201
214
  - lib/leveldb/db.rb
202
215
  - lib/leveldb/iterator.rb
data/lib/fiddler.rb DELETED
@@ -1,77 +0,0 @@
1
- require 'fiddle'
2
- require 'fiddle/import'
3
- require 'rbconfig'
4
-
5
- module Fiddler
6
- include Fiddle
7
- include Fiddle::CParser
8
- include Fiddle::Importer
9
- extend Fiddle::Importer
10
- extend self
11
-
12
- LIBSUFFIX =
13
- case RbConfig::CONFIG['host_os'].downcase
14
- when /windows|cgywin/ then 'dll'
15
- when /darwin/ then 'dylib'
16
- else 'so'
17
- end
18
-
19
- LIBPATHS =
20
- [ '/usr/local/lib',
21
- '/opt/local/lib',
22
- '/usr/lib64',
23
- File.expand_path("../../ext/leveldb", __FILE__)]
24
-
25
- def dlload(*libs)
26
- libs.map! do |lib|
27
- LIBPATHS.map { |l| File.join(l, "#{lib}.#{LIBSUFFIX}") }.
28
- detect { |l| File.exist?(l) }
29
- end
30
- super(*libs)
31
- end
32
-
33
- # Alias CTypes
34
- ::Fiddle.constants.each do |c|
35
- next unless c.to_s =~ /^TYPE_(.+)$/
36
- const_set $1, const_get(c)
37
- end
38
-
39
- ULONG = -LONG
40
- LLONG = LONG_LONG
41
- ULLONG = -LONG_LONG
42
- UCHAR = -CHAR
43
- USHORT = -SHORT
44
- UINT = -INT
45
-
46
- def cdef(name, ret_type, args_types={}, options={})
47
- address = handler["#{@_prefix}#{name}"] || handler[name.to_s]
48
- options = {name: name}.merge(options)
49
- call_type = options.delete(:call_type) || Function::DEFAULT
50
- params = args_types.keys.join(', ')
51
- values = args_types.values
52
- cdefs[name] = Function.new(address, values, ret_type, call_type, options)
53
-
54
- module_eval <<-RB, __FILE__, __LINE__ + 1
55
- def #{name}(#{params})
56
- cdefs[#{name.inspect}].call(#{params})
57
- end
58
- module_function #{name.inspect}
59
- RB
60
- end
61
-
62
- def cdefs
63
- @_cdefs ||= {}
64
- end
65
-
66
- def [](val)
67
- cdefs[val]
68
- end
69
-
70
- def prefix(value)
71
- @_prefix = value
72
- end
73
-
74
- def self.included(base)
75
- base.extend self
76
- end
77
- end