nn-core 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +2 -3
- data/README.md +39 -16
- data/ext/Rakefile +5 -0
- data/lib/nn-core/libnanomsg.rb +1 -1
- data/lib/nn-core/version.rb +1 -1
- data/nn-core.gemspec +2 -1
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cf60b74863f8930559df1e805bad108c8d8a296
|
4
|
+
data.tar.gz: 821972ce80cc2f508b909711a6addc7105edc7f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69fa1bdd1a03ecec06de53dd445e94056535b1a06434033b6158c5e709947eed20264790ea2998c5f2107dd46048e1b01427b5d3192766749544a49cbc4bf431
|
7
|
+
data.tar.gz: 519382feaa8ecd593d90e2ce6396c1200f9bc19f70695bc0b8eb4d5b117e800d62d582a7d5c7f3fd49c9126ef917e6e06337afb5f1d05c5d6c5093b5955aed11
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
sudo: false
|
1
2
|
language: ruby
|
2
3
|
rvm:
|
3
4
|
- 1.9.3
|
@@ -8,6 +9,4 @@ rvm:
|
|
8
9
|
script: bundle exec rspec spec
|
9
10
|
matrix:
|
10
11
|
allow_failures:
|
11
|
-
before_install:
|
12
|
-
- git clone git://github.com/nanomsg/nanomsg.git
|
13
|
-
- cd nanomsg && ./autogen.sh && ./configure && sudo make install && sudo ldconfig && cd ${TRAVIS_BUILD_DIR}
|
12
|
+
before_install: pushd ext && rake && popd
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
nn-core
|
2
|
-
-------
|
1
|
+
# nn-core
|
3
2
|
|
4
3
|
[](https://travis-ci.org/chuckremes/nn-core)
|
5
4
|
|
@@ -11,29 +10,53 @@ For more information on nanomsg, please visit its website:
|
|
11
10
|
|
12
11
|
http://nanomsg.org
|
13
12
|
|
14
|
-
Installation
|
15
|
-
------------
|
13
|
+
# Bundler Installation
|
16
14
|
|
17
|
-
1.
|
15
|
+
1. Add this line to your `Gemfile`:
|
18
16
|
|
19
|
-
|
17
|
+
```ruby
|
18
|
+
gem 'nn-core'
|
19
|
+
```
|
20
20
|
|
21
|
-
2.
|
21
|
+
2. Install the gem using bundler:
|
22
22
|
|
23
|
-
|
23
|
+
```shell
|
24
|
+
bundle install
|
25
|
+
```
|
24
26
|
|
25
|
-
|
27
|
+
3. In your code, do:
|
26
28
|
|
27
|
-
|
29
|
+
```ruby
|
30
|
+
require "nn-core"
|
31
|
+
```
|
28
32
|
|
29
|
-
|
33
|
+
# Manual Installation
|
30
34
|
|
31
|
-
|
32
|
-
require "nn-core"
|
33
|
-
```
|
35
|
+
1. Clone this repository
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
+
```shell
|
38
|
+
git clone https://github.com/chuckremes/nn-core.git
|
39
|
+
```
|
40
|
+
|
41
|
+
2. Install the gem dependencies:
|
42
|
+
|
43
|
+
```shell
|
44
|
+
bundle install
|
45
|
+
```
|
46
|
+
|
47
|
+
3. Build libnanomsg:
|
48
|
+
|
49
|
+
```shell
|
50
|
+
pushd ext && rake && popd
|
51
|
+
```
|
52
|
+
|
53
|
+
4. Run the tests to ensure everything works fine:
|
54
|
+
|
55
|
+
```shell
|
56
|
+
bundle exec rake spec
|
57
|
+
```
|
58
|
+
|
59
|
+
# License
|
37
60
|
|
38
61
|
(The MIT License)
|
39
62
|
|
data/ext/Rakefile
ADDED
data/lib/nn-core/libnanomsg.rb
CHANGED
@@ -6,7 +6,7 @@ module NNCore
|
|
6
6
|
begin
|
7
7
|
# bias the library discovery to a path inside the gem first, then
|
8
8
|
# to the usual system paths
|
9
|
-
inside_gem = File.join(File.dirname(__FILE__), '..', '..', 'ext')
|
9
|
+
inside_gem = File.join(File.dirname(__FILE__), '..', '..', 'ext', 'nanomsg', '.libs')
|
10
10
|
local_path = FFI::Platform::IS_WINDOWS ? ENV['PATH'].split(';') : ENV['PATH'].split(':')
|
11
11
|
library_name = "libnanomsg"
|
12
12
|
LIB_PATHS = [
|
data/lib/nn-core/version.rb
CHANGED
data/nn-core.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nn-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuck Remes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -59,7 +59,8 @@ description: |-
|
|
59
59
|
email:
|
60
60
|
- git@chuckremes.com
|
61
61
|
executables: []
|
62
|
-
extensions:
|
62
|
+
extensions:
|
63
|
+
- ext/Rakefile
|
63
64
|
extra_rdoc_files: []
|
64
65
|
files:
|
65
66
|
- ".gitignore"
|
@@ -71,6 +72,7 @@ files:
|
|
71
72
|
- README.md
|
72
73
|
- Rakefile
|
73
74
|
- examples/roundtrip_latency.rb
|
75
|
+
- ext/Rakefile
|
74
76
|
- lib/nn-core.rb
|
75
77
|
- lib/nn-core/constants.rb
|
76
78
|
- lib/nn-core/libnanomsg.rb
|
@@ -110,9 +112,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
112
|
version: '0'
|
111
113
|
requirements: []
|
112
114
|
rubyforge_project: nn-core
|
113
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.5.1
|
114
116
|
signing_key:
|
115
117
|
specification_version: 4
|
116
118
|
summary: Wraps the nanomsg networking library using Ruby FFI (foreign function interface).
|
117
|
-
test_files:
|
118
|
-
|
119
|
+
test_files:
|
120
|
+
- spec/nn_bind_spec.rb
|
121
|
+
- spec/nn_close_spec.rb
|
122
|
+
- spec/nn_connect_spec.rb
|
123
|
+
- spec/nn_getsockopt_spec.rb
|
124
|
+
- spec/nn_poll_spec.rb
|
125
|
+
- spec/nn_recv_spec.rb
|
126
|
+
- spec/nn_send_spec.rb
|
127
|
+
- spec/nn_setsockopt_spec.rb
|
128
|
+
- spec/nn_shutdown_spec.rb
|
129
|
+
- spec/nn_socket_spec.rb
|
130
|
+
- spec/nn_symbol_info_spec.rb
|
131
|
+
- spec/nn_symbol_spec.rb
|
132
|
+
- spec/nn_term_spec.rb
|
133
|
+
- spec/spec_helper.rb
|