iruby 0.7.4 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e37561d8cd48b57f5ad431cfdf984306e638a262113f2cb741cf3a7d7a8e2e1
4
- data.tar.gz: b1cd1da09bd9a6158749225e0097f92442ec5d600ab6f40a6189b50d0f2a4bb6
3
+ metadata.gz: d874a72b0b879122f83a0a31cd86d387bf9ead180e4f1954a42d2ec82b5de6be
4
+ data.tar.gz: 8cbe956be221da36f99cc8c550857fcc7dee567f4a4cbcf43a167ec8ce0b5a41
5
5
  SHA512:
6
- metadata.gz: 6f70bdf2fa9da79a2e072f8a27ae729f5656a02a1d34a14bdd01287a16bfe257732875fc7a76db3f498cfd25cf49f4a9aa5ce2c82040ec90082bfca5e5d2f4e2
7
- data.tar.gz: 789fe4b197775ef1245e96db8ac039a0df166898652c689ce2f66a7eb25db99a5f4806bccb7b76cc52cbdc7c4e6a3749eebda903b586b170842c9630f50af082
6
+ metadata.gz: 6cc1fdaf13bf195ad4d18206c8663f693a77a1c0bcf29446c3d1c91a8e6e88fc80d8612868caa47794752dae9bcf6edc07165374fbb3637e4af1e49d8e8efa96
7
+ data.tar.gz: 9d092e97d5adc8b615f7d1f02a8fa5b52428e5c167e24e8997770a2d808e10d327a4df86fbaba8f986640110109785cd796cd5751a50ff45b298ca85037f8976
@@ -2,13 +2,8 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches:
6
- - master
7
5
  pull_request:
8
- types:
9
- - opened
10
- - synchronize
11
- - reopened
6
+ workflow_dispatch:
12
7
 
13
8
  jobs:
14
9
  ubuntu:
@@ -19,106 +14,127 @@ jobs:
19
14
  fail-fast: false
20
15
  matrix:
21
16
  os:
22
- - ubuntu-latest
17
+ - ubuntu-latest
23
18
  ruby:
24
- - "3.0"
25
- - "2.7"
26
- - "2.6"
27
- - "2.5"
28
- - "2.4"
29
- - "2.3"
30
- - debug
19
+ - "3.4"
20
+ - "3.3"
21
+ - "3.2"
22
+ - "3.1"
23
+ - "3.0"
24
+ - "2.7"
25
+ - "2.6"
26
+ - "2.5"
27
+ - debug
31
28
 
32
29
  steps:
33
- - uses: actions/checkout@v2
34
- with:
35
- fetch-depth: 1
36
-
37
- - uses: ruby/setup-ruby@v1
38
- with:
39
- ruby-version: ${{ matrix.ruby }}
40
-
41
- - run: rake build
42
-
43
- - name: Install irb for old Ruby
44
- if: |
45
- matrix.ruby == '2.5' ||
46
- matrix.ruby == '2.4' ||
47
- matrix.ruby == '2.3'
48
- run: |
49
- cat <<GEMFILE > Gemfile.irb
50
- source 'https://rubygems.org'
51
- gem 'irb'
52
- GEMFILE
53
- BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
54
-
55
- - run: gem install pkg/*.gem
56
-
57
- - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
58
- env:
59
- IRUBY_SESSION_ADAPTER: ffi-rzmq
60
-
61
- - name: Install requirements on ubuntu
62
- run: |
63
- sudo apt update
64
- sudo apt install -y --no-install-recommends \
65
- libczmq-dev \
66
- python3 \
67
- python3-pip \
68
- python3-setuptools
69
- sudo pip3 install wheel
70
- sudo pip3 install -r ci/requirements.txt
71
-
72
- - run: bundle install --jobs 4 --retry 3
73
-
74
- - name: Run tests
75
- env:
76
- PYTHON: python3
77
- ADAPTERS: cztop ffi-rzmq
78
- run: |
79
- for adapter in $ADAPTERS; do
80
- export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
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 (if Ruby 2.7)
41
+ if: |
42
+ matrix.ruby == '2.7'
43
+ run: |
44
+ cat <<GEMFILE > Gemfile.irb
45
+ source 'https://rubygems.org'
46
+ gem 'ffi'
47
+ GEMFILE
48
+ BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
49
+
50
+ - name: Install ffi 1.6.x (if Ruby 2.6)
51
+ if: |
52
+ matrix.ruby == '2.6'
53
+ run: |
54
+ cat <<GEMFILE > Gemfile.irb
55
+ source 'https://rubygems.org'
56
+ gem 'ffi', '~> 1.6.0'
57
+ GEMFILE
58
+ BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
59
+
60
+ - name: Install ffi 1.6.x and irb < 1.4.3 (if Ruby 2.5)
61
+ if: |
62
+ matrix.ruby == '2.5'
63
+ run: |
64
+ cat <<GEMFILE > Gemfile.irb
65
+ source 'https://rubygems.org'
66
+ gem 'ffi', '~> 1.6.0'
67
+ gem 'irb', '< 1.4.3'
68
+ GEMFILE
69
+ BUNDLE_GEMFILE=Gemfile.irb bundle install --jobs 4 --retry 3
70
+
71
+ - run: gem install pkg/*.gem
72
+
73
+ - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
74
+ env:
75
+ IRUBY_SESSION_ADAPTER: ffi-rzmq
76
+
77
+ - name: Install requirements on ubuntu
78
+ run: |
79
+ sudo apt update
80
+ sudo apt install -y --no-install-recommends \
81
+ libczmq-dev \
82
+ python3 \
83
+ python3-pip \
84
+ python3-setuptools
85
+ sudo pip3 install wheel
86
+ sudo pip3 install -r ci/requirements.txt
87
+
88
+ - run: bundle install --jobs 4 --retry 3
89
+
90
+ - name: Run tests
91
+ env:
92
+ PYTHON: python3
93
+ ADAPTERS: cztop ffi-rzmq
94
+ run: |
95
+ for adapter in $ADAPTERS; do
96
+ export IRUBY_TEST_SESSION_ADAPTER_NAME=$adapter
97
+ bundle exec rake test TESTOPTS="-v"
98
+ done
83
99
 
84
100
  windows:
85
101
  name: Windows
86
102
  runs-on: windows-latest
87
103
 
88
104
  steps:
89
- - uses: actions/checkout@v2
90
- with:
91
- fetch-depth: 1
105
+ - uses: actions/checkout@v4
106
+ with:
107
+ fetch-depth: 1
92
108
 
93
- - uses: ruby/setup-ruby@v1
94
- with:
95
- ruby-version: "3.0"
109
+ - uses: ruby/setup-ruby@v1
110
+ with:
111
+ ruby-version: "ruby"
96
112
 
97
- - run: rake build
113
+ - run: rake build
98
114
 
99
- - run: gem install pkg/*.gem
115
+ - run: gem install pkg/*.gem
100
116
 
101
- - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
102
- env:
103
- IRUBY_SESSION_ADAPTER: ffi-rzmq
117
+ - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
118
+ env:
119
+ IRUBY_SESSION_ADAPTER: ffi-rzmq
104
120
 
105
121
  macos:
106
122
  name: macOS
107
123
  runs-on: macos-latest
108
124
 
109
125
  steps:
110
- - uses: actions/checkout@v2
111
- with:
112
- fetch-depth: 1
126
+ - uses: actions/checkout@v4
127
+ with:
128
+ fetch-depth: 1
113
129
 
114
- - uses: ruby/setup-ruby@v1
115
- with:
116
- ruby-version: "3.0"
130
+ - uses: ruby/setup-ruby@v1
131
+ with:
132
+ ruby-version: "ruby"
117
133
 
118
- - run: rake build
134
+ - run: rake build
119
135
 
120
- - run: gem install pkg/*.gem
136
+ - run: gem install pkg/*.gem
121
137
 
122
- - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
123
- env:
124
- IRUBY_SESSION_ADAPTER: ffi-rzmq
138
+ - run: ruby -r iruby -e "p IRuby::SessionAdapter.select_adapter_class"
139
+ env:
140
+ IRUBY_SESSION_ADAPTER: ffi-rzmq
data/CHANGES.md CHANGED
@@ -1,4 +1,34 @@
1
- # 0.7.4 (2021-08-16)
1
+ # 0.8.1 (2025-02-16)
2
+
3
+ * Add support for jupyter widgets by @matt-do-it in https://github.com/SciRuby/iruby/pull/350
4
+ * Suppress "literal string will be frozen in the future" warning by @tikkss in https://github.com/SciRuby/iruby/pull/353
5
+ * Fix warnings in project by @simpl1g in https://github.com/SciRuby/iruby/pull/356
6
+ * restore support for IRB <= v1.13.0 by @sealocal in https://github.com/SciRuby/iruby/pull/358
7
+ * Restore ruby 2.6 and 2.5 in CI by @sealocal in https://github.com/SciRuby/iruby/pull/359
8
+ * Add Ruby 3.4 to CI by @kojix2 in https://github.com/SciRuby/iruby/pull/360
9
+ * Fix NoMethodError in backend by @edsinclair in https://github.com/SciRuby/iruby/pull/364
10
+
11
+ # 0.8.0 (2024-07-28)
12
+
13
+ * Hide output on assignment by @ankane in https://github.com/SciRuby/iruby/pull/312
14
+ * Introduce the new Application classes by @mrkn in https://github.com/SciRuby/iruby/pull/317
15
+ * Fix Gnuplot issues in Ruby 2.7 (#321) by @kojix2 in https://github.com/SciRuby/iruby/pull/322
16
+ * Add Ruby3.1 to CI by @kojix2 in https://github.com/SciRuby/iruby/pull/323
17
+ * Update README.md by @marek-witkowski in https://github.com/SciRuby/iruby/pull/324
18
+ * ci: upgrade actions/checkout by @kojix2 in https://github.com/SciRuby/iruby/pull/325
19
+ * Add Ruby 3.2 to CI for ubuntu by @petergoldstein in https://github.com/SciRuby/iruby/pull/327
20
+ * Default to true for `store_history` if not in silent mode by @gartens in https://github.com/SciRuby/iruby/pull/330
21
+ * Add Ruby 3.3 to CI for Ubuntu by @kojix2 in https://github.com/SciRuby/iruby/pull/331
22
+ * Remove Ruby 2.3 and 2.4 from CI by @kojix2 in https://github.com/SciRuby/iruby/pull/332
23
+ * Fix typos by @kojix2 in https://github.com/SciRuby/iruby/pull/335
24
+ * Format README.md and ci.yml by @kojix2 in https://github.com/SciRuby/iruby/pull/337
25
+ * Fix PlainBackend for irb v1.13.0 by @zalt50 in https://github.com/SciRuby/iruby/pull/339
26
+ * Added `date` to header by @ebababi in https://github.com/SciRuby/iruby/pull/342
27
+ * Update CI Configuration for IRuby by @kojix2 in https://github.com/SciRuby/iruby/pull/344
28
+ * Add logger and Remove base64 to Fix CI Tests by @kojix2 in https://github.com/SciRuby/iruby/pull/345
29
+ * Update CI trigger configuration by @kojix2 in https://github.com/SciRuby/iruby/pull/346
30
+
31
+ # 0.7.4 (2021-08-18)
2
32
 
3
33
  ## Enhancements
4
34
 
data/Gemfile CHANGED
@@ -15,3 +15,8 @@ end
15
15
  group :test do
16
16
  gem 'cztop'
17
17
  end
18
+
19
+ # Tests are failing on Ruby 3.3 because warnings related to OpenStruct are being written to the standard error output.
20
+ # This is being captured by Open3.capture2e and then mistakenly parsed as JSON.
21
+ # This gem can be removed when json gem is updated
22
+ gem 'ostruct'
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
- $ env ruby -v
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
- $ iruby register --force
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
@@ -9,8 +9,9 @@ FileList['tasks/**.rake'].each {|f| load f }
9
9
 
10
10
  desc "Run tests"
11
11
  task :test do
12
+ test_opts = ENV.fetch("TESTOPTS", "").split
12
13
  cd(base_dir) do
13
- ruby("test/run-test.rb")
14
+ ruby("test/run-test.rb", *test_opts)
14
15
  end
15
16
  end
16
17
 
data/exe/iruby ADDED
@@ -0,0 +1,7 @@
1
+ #! /usr/bin/env ruby
2
+ require "iruby"
3
+ require "iruby/application"
4
+
5
+ app = IRuby::Application.instance
6
+ app.setup
7
+ app.run
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.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
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'