iruby 0.8.1 → 0.8.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d874a72b0b879122f83a0a31cd86d387bf9ead180e4f1954a42d2ec82b5de6be
4
- data.tar.gz: 8cbe956be221da36f99cc8c550857fcc7dee567f4a4cbcf43a167ec8ce0b5a41
3
+ metadata.gz: 4f389a45d763afc30ae093cb65b479b727bde7f1a4ecf04246329f56099ec280
4
+ data.tar.gz: 16dc91aaba973d5b0e8cc4c2d9444266c9c8f479704a5394103a732f2f70ba01
5
5
  SHA512:
6
- metadata.gz: 6cc1fdaf13bf195ad4d18206c8663f693a77a1c0bcf29446c3d1c91a8e6e88fc80d8612868caa47794752dae9bcf6edc07165374fbb3637e4af1e49d8e8efa96
7
- data.tar.gz: 9d092e97d5adc8b615f7d1f02a8fa5b52428e5c167e24e8997770a2d808e10d327a4df86fbaba8f986640110109785cd796cd5751a50ff45b298ca85037f8976
6
+ metadata.gz: a2fcf2691c1f795abad87a5bfe174f17dd49980c11a6ffc1c3fc665e4345cf14caf3be273ff6123224864d261b9b6b730c9bd16907dcd535d2a168ce07f6763a
7
+ data.tar.gz: 523123ce6314e0f5e5e49dc0156dd00e6d3aac45b49af8780009df1977c7edd3306388ed2b3375a315ed5267da0c2311a6da21bbd0fffae58ef8fe19a8079ce6
@@ -68,7 +68,10 @@ jobs:
68
68
  GEMFILE
69
69
  BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
70
70
 
71
- - run: gem install pkg/*.gem
71
+ - name: Install IRuby gem
72
+ run: |
73
+ gem install rubygems-requirements-system
74
+ gem install pkg/*.gem
72
75
 
73
76
  - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
74
77
  env:
@@ -133,7 +136,7 @@ jobs:
133
136
 
134
137
  - run: rake build
135
138
 
136
- - run: gem install pkg/*.gem
139
+ - run: gem install rubygems-requirements-system pkg/*.gem
137
140
 
138
141
  - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
139
142
  env:
data/CHANGES.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.8.2 (2025-04-10)
2
+
3
+ * Update CI to refresh apt packages before installing IRuby gem by @kojix2 in https://github.com/SciRuby/iruby/pull/367
4
+ * Fix missing `OStream#closed?` method by @RobinDaugherty in https://github.com/SciRuby/iruby/pull/368
5
+ * Use rubygems-requirements-system to install system dependencies automatically by @kou in https://github.com/SciRuby/iruby/pull/369
6
+ * Various typo corrections by @kojix2 in https://github.com/SciRuby/iruby/pull/370
7
+ * Minor changes to README by @kojix2 in https://github.com/SciRuby/iruby/pull/371
8
+
1
9
  # 0.8.1 (2025-02-16)
2
10
 
3
11
  * Add support for jupyter widgets by @matt-do-it in https://github.com/SciRuby/iruby/pull/350
data/Gemfile CHANGED
@@ -1,4 +1,7 @@
1
1
  source 'https://rubygems.org'
2
+
3
+ plugin 'rubygems-requirements-system'
4
+
2
5
  gemspec
3
6
 
4
7
  group :pry do
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
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
- IRuby is a Ruby kernel for [Jupyter project](http://try.jupyter.org/).
7
+ IRuby is a Ruby kernel for [Jupyter project](https://jupyter.org/).
8
8
 
9
9
  ## Try IRuby
10
10
 
@@ -20,54 +20,44 @@ The following URL launches JupyterLab directly on Binder.
20
20
 
21
21
  ### Requirements
22
22
 
23
- * [Jupyter](https://jupyter.org)
23
+ - [Jupyter](https://jupyter.org)
24
24
 
25
25
  The following requirements are automatically installed.
26
26
 
27
- * [ffi-rzmq](https://github.com/chuckremes/ffi-rzmq)
28
- * [libzmq](https://github.com/zeromq/libzmq)
27
+ - [ffi-rzmq](https://github.com/chuckremes/ffi-rzmq)
28
+ - [libzmq](https://github.com/zeromq/libzmq)
29
29
 
30
30
  The following dependencies are optional.
31
31
 
32
- * [Pry][Pry], if you want to use [Pry][Pry] instead of IRB for the code execution backend
32
+ - [Pry][Pry], if you want to use [Pry][Pry] instead of IRB for the code execution backend
33
33
 
34
34
  ### Installing Jupyter Notebook and/or JupyterLab
35
35
 
36
36
  See the official document to know how to install Jupyter Notebook and/or JupyterLab.
37
37
 
38
- * <https://jupyter.readthedocs.io/en/latest/install/notebook-classic.html>
39
- * <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>
40
40
 
41
41
  ### Ubuntu
42
42
 
43
- #### Ubuntu 17+
43
+ #### Ubuntu 22.04+
44
44
 
45
45
  ```shell
46
46
  sudo apt install libtool libffi-dev ruby ruby-dev make
47
47
 
48
- gem install --user-install iruby
49
- iruby register --force
50
- ```
51
-
52
- #### Ubuntu 16
53
-
54
- The latest IRuby requires Ruby >= 2.4 while Ubuntu's official Ruby package is version 2.3.
55
- So you need to install Ruby >= 2.4 by yourself before preparing IRuby.
56
- We recommend to use rbenv.
57
-
58
- ```shell
59
- sudo apt install libtool libffi-dev ruby ruby-dev make
48
+ gem install --user-install rubygems-requirements-system
60
49
  gem install --user-install iruby
61
50
  iruby register --force
62
51
  ```
63
52
 
64
53
  ### Fedora
65
54
 
66
- #### Fedora 36
55
+ #### Fedora 40+
67
56
 
68
57
  ```shell
69
58
  sudo dnf install ruby ruby-dev make zeromq-devel
70
59
 
60
+ gem install --user-install rubygems-requirements-system
71
61
  gem install --user-install iruby
72
62
  iruby register --force
73
63
  ```
@@ -89,6 +79,7 @@ Install Jupyter.
89
79
  #### Homebrew
90
80
 
91
81
  ```shell
82
+ gem install rubygems-requirements-system
92
83
  gem install iruby
93
84
  iruby register --force
94
85
  ```
@@ -99,6 +90,7 @@ If you are using macports, run the following commands.
99
90
 
100
91
  ```shell
101
92
  port install libtool autoconf automake autogen
93
+ gem install rubygems-requirements-system
102
94
  gem install iruby
103
95
  iruby register --force
104
96
  ```
@@ -116,8 +108,8 @@ docker run --rm -it -p 8888:8888 rubydata/datascience-notebook
116
108
 
117
109
  You can use Java classes in your IRuby notebook.
118
110
 
119
- * JRuby version >= 9.0.4.0
120
- * iruby gem
111
+ - JRuby version >= 9.0.4.0
112
+ - iruby gem
121
113
 
122
114
  After installation, make sure that your `env` is set up to use jruby.
123
115
 
@@ -160,8 +152,8 @@ export IRUBY_SESSION_ADAPTER="cztop"
160
152
 
161
153
  There are two backends: PlainBackend and PryBackend.
162
154
 
163
- * PlainBackend is the default backend. It uses [IRB](https://github.com/ruby/irb).
164
- * PryBackend uses [Pry][Pry].
155
+ - PlainBackend is the default backend. It uses [IRB](https://github.com/ruby/irb).
156
+ - PryBackend uses [Pry][Pry].
165
157
 
166
158
  You can switch the backend to PryBackend by running the code below.
167
159
 
@@ -171,9 +163,9 @@ IRuby::Kernel.instance.switch_backend!(:pry)
171
163
 
172
164
  ## Notebooks
173
165
 
174
- Take a look at the [example notebook](http://nbviewer.ipython.org/urls/raw.github.com/SciRuby/sciruby-notebooks/master/getting_started.ipynb)
166
+ Take a look at the [example notebook](https://nbviewer.jupyter.org/urls/raw.github.com/SciRuby/sciruby-notebooks/master/getting_started.ipynb)
175
167
  and the [collection of notebooks](https://github.com/SciRuby/sciruby-notebooks/) which includes a Dockerfile to create a containerized installation of iruby
176
- and other scientific gems. You can find the prebuild image at [dockerhub](https://registry.hub.docker.com/u/minad/sciruby-notebooks/).
168
+ and other scientific gems.
177
169
 
178
170
  ## Contributing
179
171
 
data/iruby.gemspec CHANGED
@@ -15,7 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.executables = %w[iruby]
16
16
  s.test_files = s.files.grep(%r{^test/})
17
17
  s.require_paths = %w[lib]
18
- s.extensions = %w[ext/Rakefile]
19
18
 
20
19
  s.required_ruby_version = '>= 2.3.0'
21
20
 
@@ -25,12 +24,21 @@ Gem::Specification.new do |s|
25
24
  s.add_dependency 'logger'
26
25
  s.add_dependency 'mime-types', '>= 3.3.1'
27
26
  s.add_dependency 'multi_json', '~> 1.11'
28
- s.add_dependency 'native-package-installer'
29
27
 
30
28
  s.add_development_dependency 'pycall', '>= 1.2.1'
31
29
  s.add_development_dependency 'rake'
32
30
  s.add_development_dependency 'test-unit'
33
31
  s.add_development_dependency 'test-unit-rr'
34
32
 
33
+ [
34
+ ['arch_linux', 'zeromq'],
35
+ ['debian', 'libzmq3-dev'],
36
+ ['freebsd', 'libzmq4'],
37
+ ['homebrew', 'zmq'],
38
+ ['macports', 'zmq'],
39
+ ].each do |platform, package|
40
+ s.requirements << "system: libzmq: #{platform}: #{package}"
41
+ end
42
+
35
43
  s.metadata['msys2_mingw_dependencies'] = 'zeromq'
36
44
  end
@@ -225,7 +225,7 @@ module IRuby
225
225
  end
226
226
 
227
227
  if ipython_dir
228
- File.join(ipython_dir, 'kerenels')
228
+ File.join(ipython_dir, 'kernels')
229
229
  else
230
230
  Jupyter.kernelspec_dir
231
231
  end
data/lib/iruby/display.rb CHANGED
@@ -7,7 +7,7 @@ module IRuby
7
7
  "text/markdown" => :to_markdown,
8
8
  "image/svg+xml" => :to_svg,
9
9
  "image/png" => :to_png,
10
- "appliation/pdf" => :to_pdf,
10
+ "application/pdf" => :to_pdf,
11
11
  "image/jpeg" => :to_jpeg,
12
12
  "text/latex" => [:to_latex, :to_tex],
13
13
  # NOTE: Do not include the entry of "application/json" because
data/lib/iruby/ostream.rb CHANGED
@@ -11,6 +11,10 @@ module IRuby
11
11
  @session = nil
12
12
  end
13
13
 
14
+ def closed?
15
+ @session.nil?
16
+ end
17
+
14
18
  def flush
15
19
  end
16
20
 
@@ -60,7 +60,7 @@ module IRuby
60
60
  end
61
61
  end
62
62
  if name == 'cztop'
63
- warn "WARNING: cztop was deprecated and will be removed; Use ffi-rzmq, instead."
63
+ warn "WARNING: cztop is deprecated and will be removed; Use ffi-rzmq instead."
64
64
  end
65
65
  return cls
66
66
  end
data/lib/iruby/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module IRuby
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
data/run-test.sh CHANGED
@@ -4,7 +4,7 @@ set -ex
4
4
 
5
5
  export PYTHON=python3
6
6
 
7
- ADAPTERS="cztop ffi-rzmq pyzmq"
7
+ ADAPTERS="cztop ffi-rzmq"
8
8
 
9
9
  for adapter in $ADAPTERS; do
10
10
  export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
@@ -38,7 +38,7 @@ class IRubyTest::IntegrationTest < IRubyTest::TestBase
38
38
  end
39
39
 
40
40
  def test_interaction
41
- omit("This test too much unstable")
41
+ omit("This test is too unstable")
42
42
 
43
43
  write '"Hello, world!"'
44
44
  expect '"Hello, world!"'
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Mendler
8
8
  - The SciRuby developers
9
+ autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2025-02-16 00:00:00.000000000 Z
12
+ date: 2025-04-10 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: data_uri
@@ -94,20 +95,6 @@ dependencies:
94
95
  - - "~>"
95
96
  - !ruby/object:Gem::Version
96
97
  version: '1.11'
97
- - !ruby/object:Gem::Dependency
98
- name: native-package-installer
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: pycall
113
100
  requirement: !ruby/object:Gem::Requirement
@@ -169,8 +156,7 @@ email:
169
156
  - mail@daniel-mendler.de
170
157
  executables:
171
158
  - iruby
172
- extensions:
173
- - ext/Rakefile
159
+ extensions: []
174
160
  extra_rdoc_files: []
175
161
  files:
176
162
  - ".github/workflows/ci.yml"
@@ -186,7 +172,6 @@ files:
186
172
  - docker/setup.sh
187
173
  - docker/test.sh
188
174
  - exe/iruby
189
- - ext/Rakefile
190
175
  - iruby.gemspec
191
176
  - lib/iruby.rb
192
177
  - lib/iruby/application.rb
@@ -266,6 +251,7 @@ licenses:
266
251
  - MIT
267
252
  metadata:
268
253
  msys2_mingw_dependencies: zeromq
254
+ post_install_message:
269
255
  rdoc_options: []
270
256
  require_paths:
271
257
  - lib
@@ -279,8 +265,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
265
  - - ">="
280
266
  - !ruby/object:Gem::Version
281
267
  version: '0'
282
- requirements: []
283
- rubygems_version: 3.6.2
268
+ requirements:
269
+ - 'system: libzmq: arch_linux: zeromq'
270
+ - 'system: libzmq: debian: libzmq3-dev'
271
+ - 'system: libzmq: freebsd: libzmq4'
272
+ - 'system: libzmq: homebrew: zmq'
273
+ - 'system: libzmq: macports: zmq'
274
+ rubygems_version: 3.5.22
275
+ signing_key:
284
276
  specification_version: 4
285
277
  summary: Ruby Kernel for Jupyter
286
278
  test_files:
data/ext/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- task default: :all
2
-
3
- task all: [:ensure_zeromq]
4
-
5
- task :ensure_zeromq do
6
- begin
7
- require 'ffi-rzmq'
8
- rescue LoadError
9
- require 'native-package-installer'
10
- unless NativePackageInstaller.install(arch_linux: 'zeromq',
11
- debian: 'libzmq3-dev',
12
- freebsd: 'libzmq4',
13
- homebrew: 'zmq',
14
- macports: 'zmq',
15
- redhat: 'zeromq-devel')
16
- raise 'Failed to install ZeroMQ'
17
- end
18
- end
19
- end