iruby 0.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +80 -85
- data/CHANGES.md +21 -1
- data/README.md +19 -9
- data/Rakefile +2 -1
- data/exe/iruby +7 -0
- data/iruby.gemspec +3 -1
- data/lib/iruby/application.rb +380 -0
- data/lib/iruby/backend.rb +11 -2
- data/lib/iruby/error.rb +12 -0
- data/lib/iruby/jupyter.rb +4 -1
- data/lib/iruby/kernel.rb +4 -2
- data/lib/iruby/kernel_app.rb +108 -0
- data/lib/iruby/logger.rb +12 -2
- data/lib/iruby/session.rb +2 -0
- data/lib/iruby/version.rb +1 -1
- data/test/helper.rb +22 -3
- data/test/integration_test.rb +7 -1
- data/test/iruby/application/application_test.rb +32 -0
- data/test/iruby/application/console_test.rb +97 -0
- data/test/iruby/application/helper.rb +38 -0
- data/test/iruby/application/kernel_test.rb +93 -0
- data/test/iruby/application/register_test.rb +139 -0
- data/test/iruby/application/unregister_test.rb +77 -0
- data/test/iruby/jupyter_test.rb +27 -15
- data/test/iruby/kernel_test.rb +0 -2
- data/test/iruby/multi_logger_test.rb +13 -0
- data/test/run-test.rb +1 -0
- metadata +37 -11
- data/bin/iruby +0 -5
- data/lib/iruby/command.rb +0 -190
- data/test/iruby/command_test.rb +0 -207
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e413c79b6abf037b0f2052ee0eed3c5176cdbcce91432330c02a6fabfd1bed2
|
4
|
+
data.tar.gz: c3d551239522d942ef1356f831a48e50bdadc233d0ceb0b8ba3e95a48017902b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3782105ba5ea49520760220fd88acab086c58600f73be2c74c822be08a7ec094e18e75084ea8bd676486d473f92ad37a40c72b9ebc64325fea1649c40edab3
|
7
|
+
data.tar.gz: 2ed1524ee160602a494192bc3b8734c7f416aa3ae4beb24a3a541852bde3d565938a2ffb43916b4112c7f215cdef1509f1e5326a960b22d213575fa95c3229c6
|
data/.github/workflows/ci.yml
CHANGED
@@ -2,13 +2,11 @@ name: CI
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
5
|
pull_request:
|
8
6
|
types:
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
- opened
|
8
|
+
- synchronize
|
9
|
+
- reopened
|
12
10
|
|
13
11
|
jobs:
|
14
12
|
ubuntu:
|
@@ -19,106 +17,103 @@ jobs:
|
|
19
17
|
fail-fast: false
|
20
18
|
matrix:
|
21
19
|
os:
|
22
|
-
|
20
|
+
- ubuntu-latest
|
23
21
|
ruby:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
- debug
|
22
|
+
- "3.3"
|
23
|
+
- "3.2"
|
24
|
+
- "3.1"
|
25
|
+
- "3.0"
|
26
|
+
- "2.7"
|
27
|
+
- debug
|
31
28
|
|
32
29
|
steps:
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
bundle exec rake test TESTOPTS=-v
|
82
|
-
done
|
30
|
+
- uses: actions/checkout@v4
|
31
|
+
with:
|
32
|
+
fetch-depth: 1
|
33
|
+
|
34
|
+
- uses: ruby/setup-ruby@v1
|
35
|
+
with:
|
36
|
+
ruby-version: ${{ matrix.ruby }}
|
37
|
+
|
38
|
+
- run: rake build
|
39
|
+
|
40
|
+
- name: Install ffi 1.6 for old Ruby
|
41
|
+
if: |
|
42
|
+
matrix.ruby == '2.7'
|
43
|
+
run: |
|
44
|
+
cat <<GEMFILE > Gemfile.irb
|
45
|
+
source 'https://rubygems.org'
|
46
|
+
gem 'ffi', '~> 1.6'
|
47
|
+
GEMFILE
|
48
|
+
BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
|
49
|
+
|
50
|
+
- run: gem install pkg/*.gem
|
51
|
+
|
52
|
+
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
|
53
|
+
env:
|
54
|
+
IRUBY_SESSION_ADAPTER: ffi-rzmq
|
55
|
+
|
56
|
+
- name: Install requirements on ubuntu
|
57
|
+
run: |
|
58
|
+
sudo apt update
|
59
|
+
sudo apt install -y --no-install-recommends \
|
60
|
+
libczmq-dev \
|
61
|
+
python3 \
|
62
|
+
python3-pip \
|
63
|
+
python3-setuptools
|
64
|
+
sudo pip3 install wheel
|
65
|
+
sudo pip3 install -r ci/requirements.txt
|
66
|
+
|
67
|
+
- run: bundle install --jobs 4 --retry 3
|
68
|
+
|
69
|
+
- name: Run tests
|
70
|
+
env:
|
71
|
+
PYTHON: python3
|
72
|
+
ADAPTERS: cztop ffi-rzmq
|
73
|
+
run: |
|
74
|
+
for adapter in $ADAPTERS; do
|
75
|
+
export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
|
76
|
+
bundle exec rake test TESTOPTS="-v"
|
77
|
+
done
|
83
78
|
|
84
79
|
windows:
|
85
80
|
name: Windows
|
86
81
|
runs-on: windows-latest
|
87
82
|
|
88
83
|
steps:
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
- uses: actions/checkout@v4
|
85
|
+
with:
|
86
|
+
fetch-depth: 1
|
92
87
|
|
93
|
-
|
94
|
-
|
95
|
-
|
88
|
+
- uses: ruby/setup-ruby@v1
|
89
|
+
with:
|
90
|
+
ruby-version: "ruby"
|
96
91
|
|
97
|
-
|
92
|
+
- run: rake build
|
98
93
|
|
99
|
-
|
94
|
+
- run: gem install pkg/*.gem
|
100
95
|
|
101
|
-
|
102
|
-
|
103
|
-
|
96
|
+
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
|
97
|
+
env:
|
98
|
+
IRUBY_SESSION_ADAPTER: ffi-rzmq
|
104
99
|
|
105
100
|
macos:
|
106
101
|
name: macOS
|
107
102
|
runs-on: macos-latest
|
108
103
|
|
109
104
|
steps:
|
110
|
-
|
111
|
-
|
112
|
-
|
105
|
+
- uses: actions/checkout@v4
|
106
|
+
with:
|
107
|
+
fetch-depth: 1
|
113
108
|
|
114
|
-
|
115
|
-
|
116
|
-
|
109
|
+
- uses: ruby/setup-ruby@v1
|
110
|
+
with:
|
111
|
+
ruby-version: "ruby"
|
117
112
|
|
118
|
-
|
113
|
+
- run: rake build
|
119
114
|
|
120
|
-
|
115
|
+
- run: gem install pkg/*.gem
|
121
116
|
|
122
|
-
|
123
|
-
|
124
|
-
|
117
|
+
- run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
|
118
|
+
env:
|
119
|
+
IRUBY_SESSION_ADAPTER: ffi-rzmq
|
data/CHANGES.md
CHANGED
@@ -1,4 +1,24 @@
|
|
1
|
-
# 0.
|
1
|
+
# 0.8.0 (2024-07-28)
|
2
|
+
|
3
|
+
* Hide output on assignment by @ankane in https://github.com/SciRuby/iruby/pull/312
|
4
|
+
* Introduce the new Application classes by @mrkn in https://github.com/SciRuby/iruby/pull/317
|
5
|
+
* Fix Gnuplot issues in Ruby 2.7 (#321) by @kojix2 in https://github.com/SciRuby/iruby/pull/322
|
6
|
+
* Add Ruby3.1 to CI by @kojix2 in https://github.com/SciRuby/iruby/pull/323
|
7
|
+
* Update README.md by @marek-witkowski in https://github.com/SciRuby/iruby/pull/324
|
8
|
+
* ci: upgrade actions/checkout by @kojix2 in https://github.com/SciRuby/iruby/pull/325
|
9
|
+
* Add Ruby 3.2 to CI for ubuntu by @petergoldstein in https://github.com/SciRuby/iruby/pull/327
|
10
|
+
* Default to true for `store_history` if not in silent mode by @gartens in https://github.com/SciRuby/iruby/pull/330
|
11
|
+
* Add Ruby 3.3 to CI for Ubuntu by @kojix2 in https://github.com/SciRuby/iruby/pull/331
|
12
|
+
* Remove Ruby 2.3 and 2.4 from CI by @kojix2 in https://github.com/SciRuby/iruby/pull/332
|
13
|
+
* Fix typos by @kojix2 in https://github.com/SciRuby/iruby/pull/335
|
14
|
+
* Format README.md and ci.yml by @kojix2 in https://github.com/SciRuby/iruby/pull/337
|
15
|
+
* Fix PlainBackend for irb v1.13.0 by @zalt50 in https://github.com/SciRuby/iruby/pull/339
|
16
|
+
* Added `date` to header by @ebababi in https://github.com/SciRuby/iruby/pull/342
|
17
|
+
* Update CI Configuration for IRuby by @kojix2 in https://github.com/SciRuby/iruby/pull/344
|
18
|
+
* Add logger and Remove base64 to Fix CI Tests by @kojix2 in https://github.com/SciRuby/iruby/pull/345
|
19
|
+
* Update CI trigger configuration by @kojix2 in https://github.com/SciRuby/iruby/pull/346
|
20
|
+
|
21
|
+
# 0.7.4 (2021-08-18)
|
2
22
|
|
3
23
|
## Enhancements
|
4
24
|
|
data/README.md
CHANGED
@@ -10,11 +10,11 @@ IRuby is a Ruby kernel for [Jupyter project](http://try.jupyter.org/).
|
|
10
10
|
|
11
11
|
You can try IRuby with a sample notebook on Binder (the same link as the banner placed above):
|
12
12
|
|
13
|
-
https://mybinder.org/v2/gh/RubyData/binder/master?filepath=ruby-data.ipynb
|
13
|
+
<https://mybinder.org/v2/gh/RubyData/binder/master?filepath=ruby-data.ipynb>
|
14
14
|
|
15
15
|
The following URL launches JupyterLab directly on Binder.
|
16
16
|
|
17
|
-
https://mybinder.org/v2/gh/RubyData/binder/master?filepath=../lab
|
17
|
+
<https://mybinder.org/v2/gh/RubyData/binder/master?filepath=../lab>
|
18
18
|
|
19
19
|
## Installation
|
20
20
|
|
@@ -31,13 +31,12 @@ The following dependencies are optional.
|
|
31
31
|
|
32
32
|
* [Pry][Pry], if you want to use [Pry][Pry] instead of IRB for the code execution backend
|
33
33
|
|
34
|
-
|
35
34
|
### Installing Jupyter Notebook and/or JupyterLab
|
36
35
|
|
37
36
|
See the official document to know how to install Jupyter Notebook and/or JupyterLab.
|
38
37
|
|
39
|
-
* https://jupyter.readthedocs.io/en/latest/install/notebook-classic.html
|
40
|
-
* https://jupyter.readthedocs.io/en/latest/install.html
|
38
|
+
* <https://jupyter.readthedocs.io/en/latest/install/notebook-classic.html>
|
39
|
+
* <https://jupyter.readthedocs.io/en/latest/install.html>
|
41
40
|
|
42
41
|
### Ubuntu
|
43
42
|
|
@@ -62,6 +61,17 @@ gem install --user-install iruby
|
|
62
61
|
iruby register --force
|
63
62
|
```
|
64
63
|
|
64
|
+
### Fedora
|
65
|
+
|
66
|
+
#### Fedora 36
|
67
|
+
|
68
|
+
```shell
|
69
|
+
sudo dnf install ruby ruby-dev make zeromq-devel
|
70
|
+
|
71
|
+
gem install --user-install iruby
|
72
|
+
iruby register --force
|
73
|
+
```
|
74
|
+
|
65
75
|
### Windows
|
66
76
|
|
67
77
|
[DevKit](https://rubyinstaller.org/add-ons/devkit.html) is necessary for building RubyGems with native C-based extensions.
|
@@ -95,7 +105,7 @@ iruby register --force
|
|
95
105
|
|
96
106
|
### Docker
|
97
107
|
|
98
|
-
Try [RubyData Docker Stacks](https://github.com/RubyData/docker-stacks).
|
108
|
+
Try [RubyData Docker Stacks](https://github.com/RubyData/docker-stacks).
|
99
109
|
Running jupyter notebook:
|
100
110
|
|
101
111
|
```shell
|
@@ -112,7 +122,7 @@ You can use Java classes in your IRuby notebook.
|
|
112
122
|
After installation, make sure that your `env` is set up to use jruby.
|
113
123
|
|
114
124
|
```shell
|
115
|
-
|
125
|
+
env ruby -v
|
116
126
|
```
|
117
127
|
|
118
128
|
If you use RVM, it is enough to switch the current version to jruby.
|
@@ -120,7 +130,7 @@ If you use RVM, it is enough to switch the current version to jruby.
|
|
120
130
|
If you have already used IRuby with a different version, you need to generate a new kernel:
|
121
131
|
|
122
132
|
```shell
|
123
|
-
|
133
|
+
iruby register --force
|
124
134
|
```
|
125
135
|
|
126
136
|
### Install the development version of IRuby
|
@@ -171,7 +181,7 @@ Contributions to IRuby are very welcome.
|
|
171
181
|
|
172
182
|
To former contributors
|
173
183
|
|
174
|
-
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.
|
184
|
+
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.
|
175
185
|
|
176
186
|
## License
|
177
187
|
|
data/Rakefile
CHANGED
data/exe/iruby
ADDED
data/iruby.gemspec
CHANGED
@@ -11,7 +11,8 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
14
|
-
s.
|
14
|
+
s.bindir = "exe"
|
15
|
+
s.executables = %w[iruby]
|
15
16
|
s.test_files = s.files.grep(%r{^test/})
|
16
17
|
s.require_paths = %w[lib]
|
17
18
|
s.extensions = %w[ext/Rakefile]
|
@@ -21,6 +22,7 @@ Gem::Specification.new do |s|
|
|
21
22
|
s.add_dependency 'data_uri', '~> 0.1'
|
22
23
|
s.add_dependency 'ffi-rzmq'
|
23
24
|
s.add_dependency 'irb'
|
25
|
+
s.add_dependency 'logger'
|
24
26
|
s.add_dependency 'mime-types', '>= 3.3.1'
|
25
27
|
s.add_dependency 'multi_json', '~> 1.11'
|
26
28
|
s.add_dependency 'native-package-installer'
|