ffi-rzmq-core 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -1
- data/lib/ffi-rzmq-core/libzmq.rb +16 -2
- data/lib/ffi-rzmq-core/version.rb +1 -1
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 561de0a68ce485a9837ae9cc79fe78b1530cca60
|
4
|
+
data.tar.gz: e297bff1957316e22321e75d840c5d3c1bdf9a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eca25565f23b0cd6d4a7411d447f29862336c363de8d7d3a780bf595228891f14a386063865b3bceb22ef5ccbbc2129e46090ab319872dd277b55d14cb46853d
|
7
|
+
data.tar.gz: 9ab922592840a121e908bba83168f55558ffbbd15e854e1ba36937ddda5b012db776fca8a4913e46bd5882147411bad88a349e5896422160d8e743728cb7bde8
|
data/README.md
CHANGED
@@ -10,4 +10,18 @@ hoping this encourages other library writers to create their own. Rather than du
|
|
10
10
|
wrapping code, they can just pull in this gem and build a more idiomatic library around the
|
11
11
|
basic definitions.
|
12
12
|
|
13
|
-
See [ffi-rzmq]
|
13
|
+
See [ffi-rzmq]
|
14
|
+
|
15
|
+
### Development
|
16
|
+
|
17
|
+
As this library supports both ZeroMQ 3.2+ and ZeroMQ 4.0+ it's common to have to swap out
|
18
|
+
which version of ZeroMQ is installed to test out various features (say, 4.0 for security).
|
19
|
+
|
20
|
+
With Homebrew on Mac OS X this is easy enough. The main ZeroMQ formula installs 4.0. To get
|
21
|
+
version 3.2 pull in the homebrew-versions using:
|
22
|
+
|
23
|
+
brew tap homebrew/versions
|
24
|
+
|
25
|
+
and install version 3.2:
|
26
|
+
|
27
|
+
brew install zeromq32
|
data/lib/ffi-rzmq-core/libzmq.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
1
3
|
# Wraps the libzmq library and attaches to the functions that are
|
2
4
|
# common across the 3.2.x+ and 4.x APIs.
|
3
5
|
#
|
@@ -9,11 +11,23 @@ module LibZMQ
|
|
9
11
|
# to the usual system paths
|
10
12
|
inside_gem = File.join(File.dirname(__FILE__), '..', '..', 'ext')
|
11
13
|
local_path = FFI::Platform::IS_WINDOWS ? ENV['PATH'].split(';') : ENV['PATH'].split(':')
|
14
|
+
homebrew_path = nil
|
15
|
+
|
16
|
+
begin
|
17
|
+
stdout, status = Open3.capture2("brew", "--prefix")
|
18
|
+
homebrew_path = if status.success?
|
19
|
+
"#{stdout.chomp}/lib"
|
20
|
+
else
|
21
|
+
'/usr/local/homebrew/lib'
|
22
|
+
end
|
23
|
+
rescue
|
24
|
+
# Homebrew doesn't exist
|
25
|
+
end
|
12
26
|
|
13
27
|
# Search for libzmq in the following order...
|
14
28
|
ZMQ_LIB_PATHS = ([inside_gem] + local_path + [
|
15
|
-
'/usr/local/lib', '/opt/local/lib',
|
16
|
-
]).map{|path| "#{path}/libzmq.#{FFI::Platform::LIBSUFFIX}"}
|
29
|
+
'/usr/local/lib', '/opt/local/lib', homebrew_path, '/usr/lib64'
|
30
|
+
]).compact.map{|path| "#{path}/libzmq.#{FFI::Platform::LIBSUFFIX}"}
|
17
31
|
ffi_lib(ZMQ_LIB_PATHS + %w{libzmq})
|
18
32
|
|
19
33
|
rescue LoadError
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-rzmq-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuck Remes
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: ffi
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ~>
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '1.9'
|
19
20
|
type: :runtime
|
20
|
-
|
21
|
+
prerelease: false
|
21
22
|
version_requirements: !ruby/object:Gem::Requirement
|
22
23
|
requirements:
|
23
24
|
- - ~>
|
24
25
|
- !ruby/object:Gem::Version
|
25
26
|
version: '1.9'
|
26
|
-
prerelease: false
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '2.14'
|
33
34
|
type: :development
|
34
|
-
|
35
|
+
prerelease: false
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
38
|
- - ~>
|
38
39
|
- !ruby/object:Gem::Version
|
39
40
|
version: '2.14'
|
40
|
-
prerelease: false
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - '>='
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '0'
|
47
48
|
type: :development
|
48
|
-
|
49
|
+
prerelease: false
|
49
50
|
version_requirements: !ruby/object:Gem::Requirement
|
50
51
|
requirements:
|
51
52
|
- - '>='
|
52
53
|
- !ruby/object:Gem::Version
|
53
54
|
version: '0'
|
54
|
-
prerelease: false
|
55
55
|
description: |-
|
56
56
|
This gem provides only the FFI wrapper for the ZeroMQ (0mq) networking library.
|
57
57
|
Project can be used by any other zeromq gems that want to provide their own high-level Ruby API.
|
@@ -86,7 +86,7 @@ homepage: http://github.com/chuckremes/ffi-rzmq-core
|
|
86
86
|
licenses:
|
87
87
|
- MIT
|
88
88
|
metadata: {}
|
89
|
-
post_install_message:
|
89
|
+
post_install_message:
|
90
90
|
rdoc_options: []
|
91
91
|
require_paths:
|
92
92
|
- lib
|
@@ -101,9 +101,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
106
|
-
signing_key:
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.0.14
|
106
|
+
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: This gem provides only the FFI wrapper for the ZeroMQ (0mq) networking library.
|
109
109
|
test_files:
|
@@ -113,4 +113,3 @@ test_files:
|
|
113
113
|
- spec/spec_helper.rb
|
114
114
|
- spec/structures_spec.rb
|
115
115
|
- spec/support/version_checking.rb
|
116
|
-
has_rdoc:
|