jupyter_on_rails 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +30 -30
- data/lib/jupyter_on_rails/initializer.rb +20 -6
- data/lib/jupyter_on_rails/kernel.rb +0 -13
- data/lib/jupyter_on_rails/railtie/jupyter.rake +0 -1
- 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: 27f2fd3fc91d19c53934a71316291e7cf5611e5a7f111f9c3aaa8b473a907e0d
|
4
|
+
data.tar.gz: ad3df102931dda73da46bd5feabf66a00fee9d8bf545dca737b6c4fbb45e4317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bc320a0c1b2b6b580d3ff90834aee380d117605e8df4325de238014ba51176670bc2e32422a0b64e0c5bff098b46ef2c1558413acd76226d939d76b94ab1693
|
7
|
+
data.tar.gz: db968e93f18f3a806f329e9aa5503001d415cb83f95bd34bae48d7066ba59bc1e0f97221d0cdef9b6c17d081db8d04bf3d760c24ae070e3960ad251eee6b142a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jupyter_on_rails (0.
|
4
|
+
jupyter_on_rails (0.12.0)
|
5
5
|
daru
|
6
6
|
iruby
|
7
7
|
railties
|
@@ -9,25 +9,24 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (
|
13
|
-
actionview (=
|
14
|
-
activesupport (=
|
15
|
-
rack (~> 2.0, >= 2.0
|
12
|
+
actionpack (7.0.2.4)
|
13
|
+
actionview (= 7.0.2.4)
|
14
|
+
activesupport (= 7.0.2.4)
|
15
|
+
rack (~> 2.0, >= 2.2.0)
|
16
16
|
rack-test (>= 0.6.3)
|
17
17
|
rails-dom-testing (~> 2.0)
|
18
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (
|
20
|
-
activesupport (=
|
19
|
+
actionview (7.0.2.4)
|
20
|
+
activesupport (= 7.0.2.4)
|
21
21
|
builder (~> 3.1)
|
22
22
|
erubi (~> 1.4)
|
23
23
|
rails-dom-testing (~> 2.0)
|
24
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activesupport (
|
25
|
+
activesupport (7.0.2.4)
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
27
27
|
i18n (>= 1.6, < 2)
|
28
28
|
minitest (>= 5.1)
|
29
29
|
tzinfo (~> 2.0)
|
30
|
-
zeitwerk (~> 2.3)
|
31
30
|
addressable (2.8.0)
|
32
31
|
public_suffix (>= 2.0.2, < 5.0)
|
33
32
|
ast (2.4.2)
|
@@ -49,10 +48,10 @@ GEM
|
|
49
48
|
async (~> 1.14)
|
50
49
|
async-pool (0.3.6)
|
51
50
|
async (~> 1.25)
|
52
|
-
backports (3.
|
51
|
+
backports (3.23.0)
|
53
52
|
builder (3.2.4)
|
54
53
|
bump (0.10.0)
|
55
|
-
concurrent-ruby (1.1.
|
54
|
+
concurrent-ruby (1.1.10)
|
56
55
|
console (1.12.0)
|
57
56
|
fiber-local
|
58
57
|
crass (1.0.6)
|
@@ -75,7 +74,7 @@ GEM
|
|
75
74
|
faraday (>= 0.8)
|
76
75
|
faraday-net_http (1.0.1)
|
77
76
|
faraday-net_http_persistent (1.1.0)
|
78
|
-
ffi (1.15.
|
77
|
+
ffi (1.15.5)
|
79
78
|
ffi-rzmq (2.0.7)
|
80
79
|
ffi-rzmq-core (>= 1.0.7)
|
81
80
|
ffi-rzmq-core (1.0.7)
|
@@ -91,11 +90,11 @@ GEM
|
|
91
90
|
rainbow (>= 2.2.1)
|
92
91
|
rake (>= 10.0)
|
93
92
|
retriable (~> 3.0)
|
94
|
-
i18n (1.
|
93
|
+
i18n (1.10.0)
|
95
94
|
concurrent-ruby (~> 1.0)
|
96
|
-
io-console (0.5.
|
97
|
-
irb (1.
|
98
|
-
reline (>= 0.
|
95
|
+
io-console (0.5.11)
|
96
|
+
irb (1.4.1)
|
97
|
+
reline (>= 0.3.0)
|
99
98
|
iruby (0.7.4)
|
100
99
|
data_uri (~> 0.1)
|
101
100
|
ffi-rzmq
|
@@ -103,21 +102,21 @@ GEM
|
|
103
102
|
mime-types (>= 3.3.1)
|
104
103
|
multi_json (~> 1.11)
|
105
104
|
native-package-installer
|
106
|
-
loofah (2.
|
105
|
+
loofah (2.18.0)
|
107
106
|
crass (~> 1.0.2)
|
108
107
|
nokogiri (>= 1.5.9)
|
109
108
|
method_source (1.0.0)
|
110
109
|
mime-types (3.4.1)
|
111
110
|
mime-types-data (~> 3.2015)
|
112
|
-
mime-types-data (3.
|
113
|
-
mini_portile2 (2.
|
114
|
-
minitest (5.
|
111
|
+
mime-types-data (3.2022.0105)
|
112
|
+
mini_portile2 (2.8.0)
|
113
|
+
minitest (5.15.0)
|
115
114
|
multi_json (1.15.0)
|
116
115
|
multipart-post (2.1.1)
|
117
|
-
native-package-installer (1.1.
|
116
|
+
native-package-installer (1.1.4)
|
118
117
|
nio4r (2.5.7)
|
119
|
-
nokogiri (1.
|
120
|
-
mini_portile2 (~> 2.
|
118
|
+
nokogiri (1.13.6)
|
119
|
+
mini_portile2 (~> 2.8.0)
|
121
120
|
racc (~> 1.4)
|
122
121
|
octokit (4.21.0)
|
123
122
|
faraday (>= 0.9)
|
@@ -144,16 +143,17 @@ GEM
|
|
144
143
|
nokogiri (>= 1.6)
|
145
144
|
rails-html-sanitizer (1.4.2)
|
146
145
|
loofah (~> 2.3)
|
147
|
-
railties (
|
148
|
-
actionpack (=
|
149
|
-
activesupport (=
|
146
|
+
railties (7.0.2.4)
|
147
|
+
actionpack (= 7.0.2.4)
|
148
|
+
activesupport (= 7.0.2.4)
|
150
149
|
method_source
|
151
|
-
rake (>=
|
150
|
+
rake (>= 12.2)
|
152
151
|
thor (~> 1.0)
|
152
|
+
zeitwerk (~> 2.5)
|
153
153
|
rainbow (3.0.0)
|
154
154
|
rake (13.0.3)
|
155
155
|
regexp_parser (2.1.1)
|
156
|
-
reline (0.
|
156
|
+
reline (0.3.1)
|
157
157
|
io-console (~> 0.5)
|
158
158
|
retriable (3.1.2)
|
159
159
|
rexml (3.2.5)
|
@@ -173,12 +173,12 @@ GEM
|
|
173
173
|
sawyer (0.8.2)
|
174
174
|
addressable (>= 2.3.5)
|
175
175
|
faraday (> 0.8, < 2.0)
|
176
|
-
thor (1.1
|
176
|
+
thor (1.2.1)
|
177
177
|
timers (4.3.3)
|
178
178
|
tzinfo (2.0.4)
|
179
179
|
concurrent-ruby (~> 1.0)
|
180
180
|
unicode-display_width (2.0.0)
|
181
|
-
zeitwerk (2.4
|
181
|
+
zeitwerk (2.5.4)
|
182
182
|
|
183
183
|
PLATFORMS
|
184
184
|
ruby
|
@@ -3,21 +3,35 @@
|
|
3
3
|
module JupyterOnRails
|
4
4
|
module Initializer
|
5
5
|
def self.run(root:, sandbox:)
|
6
|
-
|
7
|
-
|
6
|
+
require 'active_support/lazy_load_hooks'
|
7
|
+
|
8
|
+
ActiveSupport.on_load(:active_record) do
|
9
|
+
# Load Daru extensions
|
10
|
+
|
8
11
|
require 'daru'
|
9
|
-
require 'active_record'
|
10
12
|
rescue LoadError
|
11
13
|
else
|
12
14
|
require 'jupyter_on_rails/daru/active_record_ext'
|
13
15
|
require 'jupyter_on_rails/daru/data_frame_ext'
|
14
16
|
|
15
|
-
::
|
16
|
-
|
17
|
-
end
|
17
|
+
include ::JupyterOnRails::Daru::ActiveRecordExt
|
18
|
+
|
18
19
|
::Daru::DataFrame.instance_eval do
|
19
20
|
include ::JupyterOnRails::Daru::DataFrameExt
|
20
21
|
end
|
22
|
+
|
23
|
+
IRuby::Display::Registry.instance_eval do
|
24
|
+
match do |obj|
|
25
|
+
obj.is_a?(ActiveRecord::Relation) ||
|
26
|
+
obj.is_a?(::Class) && obj < ActiveRecord::Base && !obj.abstract_class
|
27
|
+
end
|
28
|
+
priority 100
|
29
|
+
format 'text/html' do |obj|
|
30
|
+
n = 10
|
31
|
+
puts "finding top #{n}"
|
32
|
+
obj.limit(n).to_df.to_html
|
33
|
+
end
|
34
|
+
end
|
21
35
|
end
|
22
36
|
|
23
37
|
original = Dir.pwd
|
@@ -26,19 +26,6 @@ module JupyterOnRails
|
|
26
26
|
IRuby::Kernel.events.register(:initialized) do |_kernel|
|
27
27
|
JupyterOnRails::Initializer.run(root: @root, sandbox: @sandbox)
|
28
28
|
end
|
29
|
-
|
30
|
-
IRuby::Display::Registry.instance_eval do
|
31
|
-
match do |obj|
|
32
|
-
obj.is_a?(ActiveRecord::Relation) ||
|
33
|
-
obj.is_a?(::Class) && obj < ActiveRecord::Base && !obj.abstract_class
|
34
|
-
end
|
35
|
-
priority 100
|
36
|
-
format 'text/html' do |obj|
|
37
|
-
n = 10
|
38
|
-
puts "finding top #{n}"
|
39
|
-
obj.limit(n).to_df.to_html
|
40
|
-
end
|
41
|
-
end
|
42
29
|
end
|
43
30
|
end
|
44
31
|
end
|
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.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki INOUE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|