nn-core 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 691df12ac377ed030b7fd74b5b54d6b9b3becb98
4
- data.tar.gz: 3f5b4557cd9539120cb7ee980e8c878b6ea03de4
3
+ metadata.gz: 8cf60b74863f8930559df1e805bad108c8d8a296
4
+ data.tar.gz: 821972ce80cc2f508b909711a6addc7105edc7f3
5
5
  SHA512:
6
- metadata.gz: 8d304d2c2b4945a9795557621aba3350854c19b4f69aa96bacd9bb204006a9fc169cc599079913d81a2b0fb3ed506e03487e2c4f2f7606ff31e111f424458eeb
7
- data.tar.gz: 4ba0fa436aea595eb065bf941d591579e040e57bb64729dfe857df99bb67e517cec8ce7488867f21a87986b6964ff65dd8d8fe5b803b3802b1a37d7b7b063bb3
6
+ metadata.gz: 69fa1bdd1a03ecec06de53dd445e94056535b1a06434033b6158c5e709947eed20264790ea2998c5f2107dd46048e1b01427b5d3192766749544a49cbc4bf431
7
+ data.tar.gz: 519382feaa8ecd593d90e2ce6396c1200f9bc19f70695bc0b8eb4d5b117e800d62d582a7d5c7f3fd49c9126ef917e6e06337afb5f1d05c5d6c5093b5955aed11
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ pkg/*
7
7
 
8
8
  *.rbc
9
9
  .redcar/
10
+ ext/nanomsg
@@ -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
  [![Build Status](https://travis-ci.org/chuckremes/nn-core.svg?branch=master)](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. Make sure to build libnanomsg first by following these instructions:
15
+ 1. Add this line to your `Gemfile`:
18
16
 
19
- http://github.com/250bpm/nanomsg
17
+ ```ruby
18
+ gem 'nn-core'
19
+ ```
20
20
 
21
- 2. git clone git://github.com/chuckremes/nn-core.git
21
+ 2. Install the gem using bundler:
22
22
 
23
- 3. cd nn-core
23
+ ```shell
24
+ bundle install
25
+ ```
24
26
 
25
- 4. ruby -S gem build nn-core.gemspec
27
+ 3. In your code, do:
26
28
 
27
- 5. ruby -S gem install nn-core*.gem
29
+ ```ruby
30
+ require "nn-core"
31
+ ```
28
32
 
29
- 6. In your code, do:
33
+ # Manual Installation
30
34
 
31
- ```ruby
32
- require "nn-core"
33
- ```
35
+ 1. Clone this repository
34
36
 
35
- License
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
 
@@ -0,0 +1,5 @@
1
+ desc "Compile the nanomsg native C library"
2
+ task :default do
3
+ system("git clone https://github.com/nanomsg/nanomsg.git")
4
+ system("cd nanomsg && git checkout 0.5-beta && ./autogen.sh && ./configure && make")
5
+ end
@@ -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 = [
@@ -1,3 +1,3 @@
1
1
  module NNCore
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -22,5 +22,6 @@ to build an API using Ruby idioms.}
22
22
 
23
23
  s.add_runtime_dependency "ffi"
24
24
  s.add_development_dependency "rspec", ["~> 3.2"]
25
- s.add_development_dependency "rake"
25
+ s.add_dependency "rake"
26
+ s.extensions = %w(ext/Rakefile)
26
27
  end
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.3.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: 2015-02-19 00:00:00.000000000 Z
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: :development
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.4.5
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
- has_rdoc:
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