iruby 0.4.0 → 0.7.1

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ubuntu.yml +69 -0
  3. data/CHANGES.md +219 -0
  4. data/Gemfile +0 -2
  5. data/LICENSE +1 -1
  6. data/README.md +81 -62
  7. data/Rakefile +10 -10
  8. data/ci/Dockerfile.main.erb +1 -3
  9. data/iruby.gemspec +13 -19
  10. data/lib/iruby.rb +6 -6
  11. data/lib/iruby/backend.rb +38 -10
  12. data/lib/iruby/command.rb +2 -6
  13. data/lib/iruby/display.rb +216 -81
  14. data/lib/iruby/event_manager.rb +40 -0
  15. data/lib/iruby/formatter.rb +3 -3
  16. data/lib/iruby/input.rb +6 -6
  17. data/lib/iruby/input/autoload.rb +1 -1
  18. data/lib/iruby/input/builder.rb +4 -4
  19. data/lib/iruby/input/button.rb +2 -2
  20. data/lib/iruby/input/cancel.rb +1 -1
  21. data/lib/iruby/input/checkbox.rb +3 -3
  22. data/lib/iruby/input/date.rb +3 -3
  23. data/lib/iruby/input/field.rb +2 -2
  24. data/lib/iruby/input/file.rb +3 -3
  25. data/lib/iruby/input/form.rb +6 -6
  26. data/lib/iruby/input/label.rb +4 -4
  27. data/lib/iruby/input/multiple.rb +10 -10
  28. data/lib/iruby/input/popup.rb +2 -2
  29. data/lib/iruby/input/radio.rb +6 -6
  30. data/lib/iruby/input/select.rb +8 -8
  31. data/lib/iruby/input/textarea.rb +1 -1
  32. data/lib/iruby/input/widget.rb +2 -2
  33. data/lib/iruby/jupyter.rb +1 -0
  34. data/lib/iruby/kernel.rb +157 -29
  35. data/lib/iruby/ostream.rb +27 -10
  36. data/lib/iruby/session.rb +1 -0
  37. data/lib/iruby/session_adapter.rb +7 -3
  38. data/lib/iruby/session_adapter/pyzmq_adapter.rb +11 -10
  39. data/lib/iruby/session_adapter/test_adapter.rb +49 -0
  40. data/lib/iruby/utils.rb +15 -0
  41. data/lib/iruby/version.rb +1 -1
  42. data/run-test.sh +1 -1
  43. data/test/helper.rb +136 -0
  44. data/test/integration_test.rb +1 -2
  45. data/test/iruby/backend_test.rb +37 -0
  46. data/test/iruby/command_test.rb +0 -1
  47. data/test/iruby/display_test.rb +188 -0
  48. data/test/iruby/event_manager_test.rb +92 -0
  49. data/test/iruby/jupyter_test.rb +0 -1
  50. data/test/iruby/kernel_test.rb +185 -0
  51. data/test/iruby/mime_test.rb +50 -0
  52. data/test/iruby/multi_logger_test.rb +0 -4
  53. data/test/iruby/session_adapter/cztop_adapter_test.rb +1 -1
  54. data/test/iruby/session_adapter/ffirzmq_adapter_test.rb +1 -1
  55. data/test/iruby/session_adapter/session_adapter_test_base.rb +1 -3
  56. data/test/iruby/session_adapter_test.rb +42 -67
  57. data/test/iruby/session_test.rb +10 -15
  58. data/test/run-test.rb +19 -0
  59. metadata +74 -62
  60. data/.travis.yml +0 -41
  61. data/CHANGES +0 -143
  62. data/CONTRIBUTORS +0 -19
  63. data/lib/iruby/session/rbczmq.rb +0 -72
  64. data/lib/iruby/session_adapter/rbczmq_adapter.rb +0 -33
  65. data/test/iruby/session_adapter/rbczmq_adapter_test.rb +0 -37
  66. data/test/test_helper.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab064a6f7df94f983b75ff53092fb54f6e9a7cc747e220a2e5b021eac840897e
4
- data.tar.gz: c20d21297d688fc7794b4d0813ada1d9762ba38ea0fb3ccd99f9fbe7845ca5e3
3
+ metadata.gz: 11ac6e3f7e6588a384c9f149d6c3fe4060b7cea7d1ff6461c3ea1acc8cadebf6
4
+ data.tar.gz: 4c57af32989ee7a9d7671220647279f727021d9e6d29f9d40bf1bed0e0fc4ec0
5
5
  SHA512:
6
- metadata.gz: eaf70e7d4ac97a11e03c7c6b5a94f5eb3d1b521ed18332ae510be5872c7faa87fb2814101fff22a8a5019adc8a93915085fb93c1fee5cfec24dd936c57c13fd4
7
- data.tar.gz: cbfb04ac1dc3be65aa4c1c83b0701e39d603a439b35119b0bfa11d11467a7e4b3d29f347317b5b2f9cdfecd17fdcaf4b1474513d56b8a730764ff1ee7482cab7
6
+ metadata.gz: a1d623a6b5b4e46c2845048241fa6abfd535d72e648fd431f42c21c7f895f72f29b2443d74339342e83c5017040ff5f55ff4b0442909649b1ef0afb452c0ba20
7
+ data.tar.gz: '0394ca9c46e802a2532534058acc3af98c6e93e62a60cc035977af441c61145cfda13b224f8f1da1a8b90b48159f6aa858da7c939db2fed4f4329dcd5f2e9ea0'
@@ -0,0 +1,69 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+
13
+ jobs:
14
+ test:
15
+ name: Test
16
+ runs-on: ${{ matrix.os }}
17
+
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os:
22
+ - ubuntu-20.04
23
+ - ubuntu-latest
24
+ ruby:
25
+ - 3.0
26
+ - 2.7
27
+ - 2.6
28
+ - 2.5
29
+ - 2.4
30
+ - 2.3
31
+ - debug
32
+
33
+ steps:
34
+ - uses: actions/checkout@v2
35
+ with:
36
+ fetch-depth: 1
37
+
38
+ - uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby }}
41
+
42
+ - name: Install requirements on ubuntu
43
+ run: |
44
+ sudo apt update
45
+ sudo apt install -y --no-install-recommends \
46
+ libczmq-dev \
47
+ python3 \
48
+ python3-pip \
49
+ python3-setuptools
50
+ sudo pip3 install wheel
51
+ sudo pip3 install -r ci/requirements.txt
52
+
53
+ - run: gem install bundler
54
+
55
+ - run: bundle install --jobs 4 --retry 3
56
+
57
+ - name: Run tests
58
+ env:
59
+ PYTHON: python3
60
+ ADAPTERS: cztop ffi-rzmq pyzmq
61
+ run: |
62
+ for adapter in $ADAPTERS; do
63
+ export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
64
+ bundle exec rake test TESTOPTS=-v
65
+ done
66
+
67
+ - run: rake build
68
+
69
+ - run: gem install pkg/*.gem
data/CHANGES.md ADDED
@@ -0,0 +1,219 @@
1
+ # 0.7.1 (2021-06-21)
2
+
3
+ ## Enhancements
4
+
5
+ * Add support of `to_iruby_mimebundle` format method https://github.com/SciRuby/iruby/pull/304 (@mrkn)
6
+
7
+ ## Bug Fixes
8
+
9
+ * Prevent unintentional display the result of Session#send (@mrkn)
10
+ * Update display formatter for Gruff::Base to prevent warning (@mrkn)
11
+
12
+ # 0.7.0 (2021-05-28)
13
+
14
+ ## Enhancements
15
+
16
+ * The default backend is changed to IRB (@mrkn)
17
+ * Add IRuby::Kernel#switch_backend! method (@mrkn)
18
+
19
+ ## Bug Fixes
20
+
21
+ * Fix the handling of image/svg+xml https://github.com/SciRuby/iruby/pull/300, https://github.com/SciRuby/iruby/pull/301 (@kojix2)
22
+
23
+ # 0.6.1 (2021-05-26)
24
+
25
+ ## Bug Fixes
26
+
27
+ * Follow the messages and hooks orders during execute_request processing (@mrkn)
28
+
29
+ # 0.6.0 (2021-05-25)
30
+
31
+ ## Bug Fixes
32
+
33
+ * Fix the handling of application/javascript https://github.com/SciRuby/iruby/issues/292, https://github.com/SciRuby/iruby/pull/294 (@kylekyle, @mrkn)
34
+
35
+ ## Enhancements
36
+
37
+ * Add the `initialized` event in `IRuby::Kernel` class https://github.com/SciRuby/iruby/pull/168, https://github.com/SciRuby/iruby/pull/296 (@Yuki-Inoue, @mrkn)
38
+ * Add the following four events https://github.com/SciRuby/iruby/pull/295 (@mrkn):
39
+ * `pre-execute` -- occurs before every code execution
40
+ * `pre-run-cell` -- occurs before every non-silent code execution
41
+ * `post-execute` -- occurs after every code execution
42
+ * `post-run-cell` -- occurs after every non-silent code execution
43
+ * Replace Bond with IRB in PlainBackend https://github.com/SciRuby/iruby/pull/276, https://github.com/SciRuby/iruby/pull/297 (@cfis, @mrkn)
44
+
45
+ # 0.5.0 (2021-03-25)
46
+
47
+ ## Bug Fixes
48
+
49
+ * Fix Jupyter console crashes issue https://github.com/SciRuby/iruby/pull/210 (@kojix2)
50
+ * Fix syntax highlighting issue on Jpyter Lab https://github.com/SciRuby/iruby/issues/224 (@kojix2)
51
+ * Fix interoperability issue with ruby-git https://github.com/SciRuby/iruby/pull/139 (@habemus-papadum)
52
+ * Fix the issue of `$stderr.write` that cannot handle multiple arguments https://github.com/SciRuby/iruby/issues/206 (@kojix2)
53
+ * Remove a buggy `inspect_request` implementation https://github.com/SciRuby/iruby/pull/119 (@LunarLanding)
54
+ * Fix uninitialized constant `Fiddle` caused in initialization phase https://github.com/SciRuby/iruby/issues/264 (@MatthewSteen, @kjoix2)
55
+ * Fix the issue on displaying a table https://github.com/SciRuby/iruby/pull/281 (@ankane)
56
+
57
+ ## Enhancements
58
+
59
+ * Add `IRuby.clear_output` method https://github.com/SciRuby/iruby/pull/220 (@kojix2)
60
+ * Make backtrace on exception simplify and more appropriate for code in a cell https://github.com/SciRuby/iruby/pull/249 (@zheng-yongping)
61
+ * Make syntax error message more appropriate https://github.com/SciRuby/iruby/pull/251 (@zheng-yongping)
62
+ * Remove top-level `In` and `Out` constants https://github.com/SciRuby/iruby/pull/229 (@kojix2)
63
+ * Use text/plain for the default format of `Numo::NArray` objects https://github.com/SciRuby/iruby/pull/255 (@kojix2)
64
+ * Use ffi-rzmq as the default ZeroMQ adapter https://github.com/SciRuby/iruby/pull/256 (@kojix2)
65
+ * Drop rbczmq support https://github.com/SciRuby/iruby/pull/260 (@rstammer)
66
+ * Add ruby-vips image support https://github.com/SciRuby/iruby/pull/279 (@ankane)
67
+ * Replace mimemagic with mime-types https://github.com/SciRuby/iruby/pull/291 (@mrkn)
68
+
69
+ # 0.4.0 (2019-07-31)
70
+
71
+ (TBD)
72
+
73
+ # 0.3 (2017-03-26)
74
+
75
+ ## Bug Fixes
76
+
77
+ * Disable Jupyter keyboard manager for all popups made using IRuby.popup (@kylekyle).
78
+ * Fix Iruby/Input date values bug that set date fields to whatever the last date value was (@kylekyle).
79
+ * Fix a bug where time strings put into prompter would give an 'out of range' error (@kylekyle).
80
+
81
+ ## Enhancements
82
+
83
+ * Improvements to IRuby dependency detection using `Bundler::Dependencies#specs` (@kou).
84
+ * Use less memory forcing pry to store only the last 3 commands in memory (@kylekyle).
85
+ * Use bigger z-index that is used accross all browsers (@kylekyle).
86
+ * Ability to input date values as DateTime objects in IRuby/Input (@kylekyle).
87
+ * Add option to have check boxes checked by default (@kylekyle).
88
+ * Option for multi-select in drop down menus in the prompter (@kylekyle).
89
+ * Add support for multiple widgets using `IRuby::Input::Multiple` (@kylekyle).
90
+ * Calender icon for date selector icon (@kylekyle).
91
+ * Add support for Numo/NArray (@zalt50).
92
+ * Text now only completes after a space (@zalt50).
93
+ * Remove the DONTWAIT flag when receiving a message (@cloud-oak).
94
+ * Add support for CZTop (@kou).
95
+
96
+ # 0.2.9 (2016-05-02)
97
+
98
+ ## Bug Fixes
99
+
100
+ * Fix an error where a NoMethodError was being raised where a table rendered using an Array of Hashes has more than `maxcols` columns. (@CGamesPlay)
101
+ * Patch PryBackend to throw unterminated string and unexpected end-of-file syntax errors (@kylekyle)
102
+
103
+ ## Enhnacements
104
+
105
+ * Add an IRuby::Input class which provides widgets for getting inputs from users. (@kylekyle)
106
+ * Add data_uri dependency (@kylekyle)
107
+ * Added a clear_output display function (@mrkn)
108
+ * Doc fixes for installation (@kozo2, @generall)
109
+
110
+ # 0.2.8 (2015-12-06)
111
+
112
+ * Add compatibility with ffi-rzmq
113
+ * Windows support
114
+
115
+ # 0.2.7 (2015-07-02)
116
+
117
+ * Fix problem with autoloaded constants in Display, problem with sciruby gem
118
+
119
+ # 0.2.6 (2015-06-21)
120
+
121
+ * Check registered kernel and Gemfile to prevent gem loading problems
122
+ * Support to_tex method for the rendering
123
+
124
+ # 0.2.5 (2015-06-07)
125
+
126
+ * Fix #29, empty signatures
127
+ * Move iruby utils to IRuby::Utils module
128
+ * Add IRuby.tex alias for IRuby.latex
129
+ * Remove example notebooks from gem
130
+
131
+ # 0.2.4 (2015-06-02)
132
+
133
+ * Better exception handling
134
+ * Fix ctrl-C issue #17
135
+ * Fix timeout issue #19
136
+
137
+ # 0.2.3 (2015-05-31)
138
+
139
+ * Fix notebook indentation
140
+ * Fix tab completion for multiple lines
141
+
142
+ # 0.2.2 (2015-05-26)
143
+
144
+ * Support history variables In, Out, _, _i etc
145
+ * Internal refactoring and minor bugfixes
146
+
147
+ # 0.2.1 (2015-05-26)
148
+
149
+ * Copy Ruby logo to kernel specification
150
+
151
+ # 0.2.0 (2015-05-25)
152
+
153
+ * Dropped IPython2 support
154
+ * Dropped Ruby < 2.0.0 support
155
+ * Supports and requires now IPython3/Jupyter
156
+ * Switch from ffi-rzmq to rbczmq
157
+ * Added IRuby::Conn (experimental, to be used by widgets)
158
+ * iruby register/unregister commands to register IRuby kernel in Jupyter
159
+
160
+ # 0.1.13 (2014-08-19)
161
+
162
+ * Improved IRuby.table, supports :maxrows and :maxcols
163
+ * IRuby#javascript workaround (https://github.com/ipython/ipython/issues/6259)
164
+
165
+ # 0.1.12 (2014-08-01)
166
+
167
+ * IRuby#table add option maxrows
168
+ * powerful display system with format and datatype registry, see #25
169
+ * Add IRuby#javascript
170
+ * Add IRuby#svg
171
+
172
+ # 0.1.11 (2014-07-08)
173
+
174
+ * Push binding if pry binding stack is empty
175
+
176
+ # 0.1.10 (2014-07-08)
177
+
178
+ * Fix #19 (pp)
179
+ * Handle exception when symlink cannot be created
180
+ * Fix dependencies and Pry backend
181
+
182
+ # 0.1.9 (2014-02-28)
183
+
184
+ * Check IPython version
185
+
186
+ # 0.1.7/0.1.8
187
+
188
+ * Bugfixes #11, #12, #13
189
+
190
+ # 0.1.6 (2013-10-11)
191
+
192
+ * Print Matrix and GSL::Matrix as LaTeX
193
+ * Add check for Pry version
194
+
195
+ # 0.1.5 (2013-10-03)
196
+
197
+ * Implement a rich display system
198
+ * Fix error output
199
+
200
+ # 0.1.4 (2013-10-03)
201
+
202
+ * Extract display handler from kernel
203
+ * Always return a text/plain response
204
+
205
+ # 0.1.3 (2013-10-03)
206
+
207
+ * Implement missing request handlers
208
+ * Detect if Bundler is running and set kernel_cmd appropriately
209
+ * Improve Pry integration
210
+ * Add support for the gems gnuplot, gruff, rmagick and mini_magick
211
+
212
+ # 0.1.2 (2013-10-02)
213
+
214
+ * Support for Pry added
215
+ * Launch `iruby console` if plain `iruby` is started
216
+
217
+ # 0.1.0 (2013-10-02)
218
+
219
+ * Cleanup and rewrite of some parts
data/Gemfile CHANGED
@@ -10,10 +10,8 @@ end
10
10
  group :plot do
11
11
  gem 'gnuplot'
12
12
  gem 'rubyvis'
13
- gem 'nyaplot', github: 'sciruby/nyaplot'
14
13
  end
15
14
 
16
15
  group :test do
17
16
  gem 'cztop'
18
- gem 'rbczmq'
19
17
  end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2015 IRuby contributors and the Ruby Science Foundation
1
+ Copyright (c) 2013 - present IRuby contributors and the Ruby Science Foundation
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,52 +1,80 @@
1
1
  # IRuby
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/iruby.svg)](https://badge.fury.io/rb/iruby)
4
- [![Build Status](https://travis-ci.org/SciRuby/iruby.svg?branch=master)](https://travis-ci.org/SciRuby/iruby)
4
+ [![Build Status](https://github.com/SciRuby/iruby/workflows/CI/badge.svg)](https://github.com/SciRuby/iruby/actions)
5
5
  [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/RubyData/binder/master?filepath=ruby-data.ipynb)
6
6
 
7
7
  IRuby is a Ruby kernel for [Jupyter project](http://try.jupyter.org/).
8
8
 
9
+ ## Try IRuby
10
+
11
+ You can try IRuby with a sample notebook on Binder (the same link as the banner placed above):
12
+
13
+ https://mybinder.org/v2/gh/RubyData/binder/master?filepath=ruby-data.ipynb
14
+
15
+ The following URL launches JupyterLab directly on Binder.
16
+
17
+ https://mybinder.org/v2/gh/RubyData/binder/master?filepath=../lab
18
+
9
19
  ## Installation
10
- How to set up [ZeroMQ](http://zeromq.org/) depends on your environment.
11
- You can use one of the following libraries.
12
- * [CZTop](https://gitlab.com/paddor/cztop) and [CZMQ](https://github.com/zeromq/czmq) >= 4.0.0
13
- * [ffi-rzmq](https://github.com/chuckremes/ffi-rzmq) and [libzmq
14
- ](https://github.com/zeromq/libzmq) >= 3.2
15
20
 
16
- ### Ubuntu
17
- Install Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
21
+ ### Requirements
18
22
 
19
- #### Setup ZeroMQ on Ubuntu 16.04
20
- CZTop requires CZMQ >= 4.0.0 and ZMQ >= 4.2.0. The official packages for Ubuntu 16.04 don't satisfy these version requrements, so you need to install from source.
23
+ * [Jupyter](https://jupyter.org)
24
+ * One of the following is required
25
+ * [ffi-rzmq](https://github.com/chuckremes/ffi-rzmq) and [libzmq](https://github.com/zeromq/libzmq)
26
+ * [CZTop](https://gitlab.com/paddor/cztop) and [CZMQ](https://github.com/zeromq/czmq)
21
27
 
22
- ```shell
23
- sudo apt install libtool libffi-dev ruby ruby-dev make
24
- sudo apt install git libzmq-dev autoconf pkg-config
25
- git clone https://github.com/zeromq/czmq
26
- cd czmq
27
- ./autogen.sh && ./configure && sudo make && sudo make install
28
+ If both ffi-rzmq and cztop are installed, ffi-rzmq is used. If you prefer cztop, set the following environment variable.
29
+
30
+ ```sh
31
+ export IRUBY_SESSION_ADAPTER="cztop"
28
32
  ```
29
33
 
30
- #### Setup ZeroMQ on Ubuntu 17.04 to 18.10
31
- Use official packages.
34
+ * [Pry][Pry], if you want to use [Pry][Pry] instead of IRB for the code execution backend
35
+ * If you want to install the development version of IRuby from the source code, try [specific_install](https://github.com/rdp/specific_install).
36
+
37
+ ```
38
+ gem specific_install https://github.com/SciRuby/iruby
39
+ ```
40
+
41
+ ### Ubuntu
42
+
43
+ Install Jupyter.
44
+
45
+ #### Ubuntu 17+
32
46
 
33
47
  ```shell
34
48
  sudo apt install libtool libffi-dev ruby ruby-dev make
35
49
  sudo apt install libzmq3-dev libczmq-dev
50
+
51
+ gem install ffi-rzmq
52
+ gem install iruby --pre
53
+ iruby register --force
36
54
  ```
37
55
 
38
- #### Install CZTop and IRuby
56
+ #### Ubuntu 16
57
+
58
+ CZTop requires CZMQ >= 4.0.0 and ZMQ >= 4.2.0. The official packages for Ubuntu 16.04 don't satisfy these version requrements, so you need to install from source.
59
+
39
60
  ```shell
61
+ sudo apt install libtool libffi-dev ruby ruby-dev make
62
+ sudo apt install git libzmq-dev autoconf pkg-config
63
+ git clone https://github.com/zeromq/czmq
64
+ cd czmq
65
+ ./autogen.sh && ./configure && sudo make && sudo make install
66
+
40
67
  gem install cztop
41
68
  gem install iruby --pre
42
69
  iruby register --force
43
70
  ```
44
71
 
45
72
  ### Windows
46
- Install git and Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
73
+
74
+ Install git and Jupyter.
47
75
  [DevKit](https://rubyinstaller.org/add-ons/devkit.html) is necessary for building RubyGems with native C-based extensions.
48
76
 
49
- Install ZeroMQ.
77
+ Install ZeroMQ.
50
78
  ```shell
51
79
  pacman -S mingw64/mingw-w64-x86_64-zeromq
52
80
  ```
@@ -58,10 +86,12 @@ iruby register --force
58
86
  ```
59
87
 
60
88
  ### macOS
89
+
61
90
  Install ruby with rbenv or rvm.
62
- Install Jupyter with [Anaconda](https://www.anaconda.com/) (recommended).
91
+ Install Jupyter.
63
92
 
64
93
  #### Homebrew
94
+
65
95
  ```shell
66
96
  brew install automake gmp libtool wget
67
97
  brew install zeromq --HEAD
@@ -78,6 +108,7 @@ iruby register --force
78
108
  ```
79
109
 
80
110
  #### MacPorts
111
+
81
112
  If you are using macports, run the following commands.
82
113
 
83
114
  ```shell
@@ -86,47 +117,18 @@ gem install ffi-rzmq
86
117
  gem install iruby
87
118
  ```
88
119
 
89
- ### FreeBSD
90
- At first install IPython/Jupyter.
91
- There is a pyzmq ports (ports/net/py-pyzmq) which depends on libzmq4, however, it doesn't works with ipython.
92
- Therefore we use libzmq3 like the following:
120
+ ### Docker
93
121
 
94
- 1. make your ports tree up-to-date.
95
- 2. replace LIBDEPENDS line in ports/net/py-pyzmq/Makefile
122
+ Try [RubyData Docker Stacks](https://github.com/RubyData/docker-stacks).
123
+ Running jupyter notebook:
96
124
 
97
125
  ```shell
98
- LIB_DEPENDS= libzmq.so:${PORTSDIR}/net/libzmq4
99
- ```
100
- with
101
- ```shell
102
- LIB_DEPENDS= libzmq.so:${PORTSDIR}/net/libzmq3
103
- ```
104
- 3. install related packages
105
-
106
- ```shell
107
- sudo pkg install libzmq3 py27-qt4-gui py27-pexpect-3.3 py27-qt4-svg py27-pygments py27-Jinja2 py27-tornado py27-jsonschema
108
- ```
109
- 4. make install using ports
110
-
111
- ```shell
112
- cd /usr/ports/net/py-pyzmq
113
- sudo make install
114
- cd /usr/ports/devel/ipython
115
- sudo make install
116
- ```
117
- Then, install IRuby and related ports and gems.
118
- ```shell
119
- sudo pkg install rubygem-mimemagic
120
- sudo gem install ffi-rzmq # install ffi, ffi-rzmq-core and ffi-rzmq
121
- git clone https://github.com/SciRuby/iruby.git
122
- cd iruby
123
- gem build iruby.gemspec
124
- sudo gem install iruby-0.2.7.gem
126
+ docker run -p 8888:8888 rubydata/datascience-notebook
125
127
  ```
126
128
 
127
129
  ### Installation for JRuby
128
130
 
129
- You can use Java classes in your IRuby notebook.
131
+ You can use Java classes in your IRuby notebook.
130
132
 
131
133
  * JRuby version >= 9.0.4.0
132
134
  * cztop gem
@@ -146,20 +148,37 @@ If you have already used IRuby with a different version, you need to generate a
146
148
  $ iruby register --force
147
149
  ```
148
150
 
151
+ ## Backends
152
+
153
+ There are two backends: PlainBackend and PryBackend.
154
+
155
+ * PlainBackend is the default backend. It uses [IRB](https://github.com/ruby/irb).
156
+ * PryBackend uses [Pry][Pry].
157
+
158
+ You can switch the backend to PryBackend by running the code below.
159
+
160
+ ```ruby
161
+ IRuby::Kernel.instance.switch_backend!(:pry)
162
+ ```
163
+
149
164
  ## Notebooks
165
+
150
166
  Take a look at the [example notebook](http://nbviewer.ipython.org/urls/raw.github.com/SciRuby/sciruby-notebooks/master/getting_started.ipynb)
151
167
  and the [collection of notebooks](https://github.com/SciRuby/sciruby-notebooks/) which includes a Dockerfile to create a containerized installation of iruby
152
168
  and other scientific gems. You can find the prebuild image at [dockerhub](https://registry.hub.docker.com/u/minad/sciruby-notebooks/).
153
169
 
154
170
  ## Contributing
155
- We welcome contributions from everyone.
156
171
 
157
- ## Authors
158
- See the [CONTRIBUTORS](CONTRIBUTORS) file.
172
+ Contributions to IRuby are very welcome.
173
+
174
+ To former contributors
175
+
176
+ In February 2021, [IRuby became the canonical repository](https://github.com/SciRuby/iruby/issues/285) and is no longer a fork from [minrk/iruby](https://github.com/minrk/iruby). Please fork from this repository again before making pull requests.
159
177
 
160
178
  ## License
161
- Copyright © 2013-19, IRuby contributors and the Ruby Science Foundation.
162
179
 
163
- All rights reserved.
180
+ Copyright (c) IRuby contributors and the Ruby Science Foundation.
181
+
182
+ Licensed under the [MIT](LICENSE) license.
164
183
 
165
- IRuby, along with [SciRuby](http://sciruby.com/), is licensed under the MIT license. See the [LICENSE](LICENSE) file.
184
+ [Pry]: https://github.com/pry/pry