jupyter_on_rails 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jupyter_on_rails/railtie/jupyter.rake +3 -3
- data/lib/jupyter_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 769af5be4c72d1dce0739d209f0db7002fa8816f9bd471acd0bed6b3904d8669
|
4
|
+
data.tar.gz: ad10d114debe205827a83f766363ef4221b4b15c2556593f70ac3000a6dcac52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1938f2c92fdd5f4c0465b06a16e71c2648e2fac680e6a0b6ccf6fed7cbd68d21b8f0d7731a177b577bb38b99e3fc7206f6794fd1fd1629c4532b25cecc9646b6
|
7
|
+
data.tar.gz: c4fec94fd82d5a61776f2b707872718de2baf45165d0c5785037300aa21295417dd5f8d9a88f8b4b16d369c940300124b1036ec650cc9ce3fd3b961d4efb33a1
|
@@ -5,10 +5,10 @@ namespace :jupyter do
|
|
5
5
|
desc 'start jupyter notebook'
|
6
6
|
task :notebook do
|
7
7
|
root = Rails.root
|
8
|
-
ipython_dir = ENV['IPYTHONDIR'] || root / '.ipython'
|
8
|
+
ipython_dir = ENV['JUPYTER_DATA_DIR'] || ENV['IPYTHONDIR'] || root / '.ipython'
|
9
9
|
ipython_dir = File.absolute_path(ipython_dir.to_s)
|
10
10
|
|
11
|
-
sh "
|
11
|
+
sh "JUPYTER_DATA_DIR=#{Shellwords.shellescape(ipython_dir.to_s)} bundle exec iruby register --force"
|
12
12
|
|
13
13
|
sh "rm -rf #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/rails"
|
14
14
|
sh "cp -r #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/ruby #{Shellwords.shellescape(ipython_dir.to_s)}/kernels/rails"
|
@@ -22,7 +22,7 @@ namespace :jupyter do
|
|
22
22
|
|
23
23
|
File.write(kernel_file, JSON.dump(kernel_h))
|
24
24
|
|
25
|
-
env = { '
|
25
|
+
env = { 'JUPYTER_DATA_DIR' => ipython_dir.to_s }
|
26
26
|
commands = %w[jupyter notebook]
|
27
27
|
commands = %w[pipenv run] + commands if (root / 'Pipfile').exist?
|
28
28
|
Process.exec(env, *commands)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jupyter_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki INOUE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|