cmdstan 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: f760b7b7dfcb1cdf50fafe0b0c754ba3a022013291d2021be4b20cd6418cc161
4
- data.tar.gz: 5fcf89661313e8437c6713347da13c8009aa6abec38bbcb1a2bd73fc788e806c
3
+ metadata.gz: f0438de041affa64ca7db73cd65f35b67a80a389d76ed70d73a294f877db0071
4
+ data.tar.gz: 06da4d0a6ca5f5a84d05c442ef860efc2b0f0d619645139dede04a924564c5c6
5
5
  SHA512:
6
- metadata.gz: b53a3e11c38abdaeac92bdd2f5ee5e40dee6ba3a6ce392a947c4d76dcf76c4454cfe90d93a628286f5dcdff483067b0fa42d5824d8bbf2d6bd51d7e28356f7c8
7
- data.tar.gz: 887ff5d1f8e888d2c68877378b645c4c21f25eb82efc8127f4a44cef6272257ea23a66324f001ac2be94e17d7f646cde7945bf7ce6a5cc4aa462bfd14bba35db
6
+ metadata.gz: 86c6687ba6802f658b865f8f94a56d7f2bdc24abc5dc5606dc389b5fba2558648b1dc41b3b3762c4d38478caed95d47e35ba15a6434379af5d8f9eb5a1173f74
7
+ data.tar.gz: f52cc26a90504161e3f5df6848509a42341f0725e23936741447962f6777ea8706998870ee2d2b6e8c8efd50e08778678e45b9273ce4a7aabe848c54bbbd7ad2
@@ -1,3 +1,7 @@
1
+ ## 0.1.5 (2020-11-21)
2
+
3
+ - Added `tbb` to path for Linux
4
+
1
5
  ## 0.1.4 (2020-11-01)
2
6
 
3
7
  - Updated CmdStan to 2.25.0
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Bayesian inference for Ruby, powered by [CmdStan](https://github.com/stan-dev/cmdstan)
4
4
 
5
- [![Build Status](https://travis-ci.org/ankane/cmdstan.svg?branch=master)](https://travis-ci.org/ankane/cmdstan) [![Build status](https://ci.appveyor.com/api/projects/status/n9sp7b34m6du5ltw/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/cmdstan/branch/master)
5
+ [![Build Status](https://github.com/ankane/cmdstan/workflows/build/badge.svg?branch=master)](https://github.com/ankane/cmdstan/actions)
6
6
 
7
7
  ## Installation
8
8
 
@@ -4,10 +4,16 @@ module CmdStan
4
4
 
5
5
  def run_command(*args)
6
6
  env = {}
7
+ # add tbb to path
8
+ tbblib = ENV["STAN_TBB"] || File.join(CmdStan.path, "stan", "lib", "stan_math", "lib", "tbb")
7
9
  if windows?
8
- # add tbb to path
9
- tbblib = ENV["STAN_TBB"] || File.join(CmdStan.path, "stan", "lib", "stan_math", "lib", "tbb")
10
+ # uses ; for separator
11
+ raise "Invalid TBB path" if tbblib.include?(";")
10
12
  env["PATH"] = "#{tbblib};#{ENV["PATH"]}"
13
+ elsif !mac?
14
+ # uses : for separator
15
+ raise "Invalid TBB path" if tbblib.include?(":")
16
+ env["LD_LIBRARY_PATH"] = "#{tbblib}:#{ENV["LD_LIBRARY_PATH"]}"
11
17
  end
12
18
 
13
19
  # use an open3 method since it does escaping (like system)
@@ -27,6 +33,10 @@ module CmdStan
27
33
  windows? ? ".exe" : ""
28
34
  end
29
35
 
36
+ def mac?
37
+ RbConfig::CONFIG["host_os"] =~ /darwin/i
38
+ end
39
+
30
40
  def windows?
31
41
  Gem.win_platform?
32
42
  end
@@ -1,3 +1,3 @@
1
1
  module CmdStan
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdstan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-01 00:00:00.000000000 Z
11
+ date: 2020-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler