netica 0.0.20-java → 0.0.21-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +4 -0
  2. data/lib/netica.rb +16 -1
  3. data/lib/netica/version.rb +1 -1
  4. metadata +2 -2
data/README.md CHANGED
@@ -67,6 +67,10 @@ Then, re-read the value of the Belief node.
67
67
 
68
68
  ## Release Notes
69
69
 
70
+ ### Version 0.0.21
71
+
72
+ Search multiple locations for NeticaJ.jar.
73
+
70
74
  ### Version 0.0.20
71
75
 
72
76
  Delete a stored network by token with ActiveNetwork#destroy_by_token.
@@ -1,5 +1,20 @@
1
1
  require 'java'
2
- require '/lib/NeticaJ.jar'
2
+
3
+ loaded_netica_j = false
4
+
5
+ locations = ['/Library/Java/Extensions/NeticaJ.jar', '/System/Library/Java/Extensions/NeticaJ.jar', '/usr/lib/java/NeticaJ.jar', '/lib/NeticaJ.jar']
6
+ locations.each do |fname|
7
+ if !loaded_netica_j && File.exists?(fname)
8
+ begin
9
+ require fname
10
+ loaded_netica_j = true
11
+ rescue LoadError
12
+ puts "NeticaJ.jar not found at '#{fname}'"
13
+ end
14
+ end
15
+ end
16
+
17
+ raise "NeticaJ library files not found in #{locations}. See https://github.com/disruptive/netica for installation instructions." unless loaded_netica_j
3
18
 
4
19
  require "netica/version"
5
20
  require "netica/environ"
@@ -1,3 +1,3 @@
1
1
  module Netica
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: netica
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.20
5
+ version: 0.0.21
6
6
  platform: java
7
7
  authors:
8
8
  - Jerry Richardson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-29 00:00:00.000000000 Z
12
+ date: 2014-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis