iruby 0.1.8 → 0.1.9
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 +4 -4
- data/CHANGES +4 -0
- data/CONTRIBUTORS +2 -0
- data/README.md +5 -2
- data/lib/iruby/command.rb +11 -0
- data/lib/iruby/kernel.rb +3 -1
- data/lib/iruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b09b1cf29e3f33b4b7a7f79773e4c2f07581bbe
|
4
|
+
data.tar.gz: 6d09db553a2b1b2b13912d9f29f9c4613e7fda22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7cd57569f47ea87f8da1ba1a7109b67f2f50cb5f9d9e7f302e3390b89e0136b45113751784f215601376aed561bc284ca3ebed86f2800ca133fb3eb85b2a1a0
|
7
|
+
data.tar.gz: 527bc7b8990342e5236e1b9e92ee414865cb45c4d30ae3cc7f22ceffffb4a55d404829960f5219e78acc4dd2221f8d5f57e88753a3bcfcdc5f4b0d6aa71ae6f0
|
data/CHANGES
CHANGED
data/CONTRIBUTORS
CHANGED
@@ -3,5 +3,7 @@ Daniel Mendler <mail@daniel-mendler.de>
|
|
3
3
|
Jan Vlnas <git@jan.vlnas.cz>
|
4
4
|
Josh Adams <josh@isotope11.com>
|
5
5
|
martin sarsale <martin@properati.com>
|
6
|
+
Matthias Bussonier <bussonniermatthias@gmail.com>
|
7
|
+
Michael Hauser-Raspe <michael.hauser-raspe@cantab.net>
|
6
8
|
MinRK <benjaminrk@gmail.com>
|
7
9
|
Robby Clements <rclements@isotope11.com>
|
data/README.md
CHANGED
@@ -4,9 +4,12 @@ This is a Ruby kernel for IPython.
|
|
4
4
|
|
5
5
|

|
6
6
|
|
7
|
-
###
|
7
|
+
### Quick start
|
8
8
|
|
9
|
-
|
9
|
+
At first install the packages `ipython`, `python-jinja`, `python-tornado`, `python-pyzmq` so that you get a working `ipython notebook`.
|
10
|
+
Maybe the packages are called slightly different on your Unix.
|
11
|
+
|
12
|
+
Now install the rubygem using `gem install iruby` and then run `iruby notebook` or `iruby`.
|
10
13
|
|
11
14
|
Take a look at the [Example Notebook](http://nbviewer.ipython.org/urls/raw.github.com/minad/iruby/master/IRuby-Example.ipynb).
|
12
15
|
|
data/lib/iruby/command.rb
CHANGED
@@ -32,7 +32,18 @@ module IRuby
|
|
32
32
|
raise
|
33
33
|
end
|
34
34
|
|
35
|
+
def check_version
|
36
|
+
required = '1.2.0'
|
37
|
+
version = `ipython --version`.chomp
|
38
|
+
if version < required
|
39
|
+
STDERR.puts "Your IPython version #{version} is too old, at least #{required} is required"
|
40
|
+
exit 1
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
35
44
|
def run_ipython
|
45
|
+
check_version
|
46
|
+
|
36
47
|
dir = @args.grep(/\A--iruby-dir=.*\Z/)
|
37
48
|
@args -= dir
|
38
49
|
dir = dir.last.to_s.sub(/\A--profile=/, '')
|
data/lib/iruby/kernel.rb
CHANGED
@@ -43,6 +43,7 @@ module IRuby
|
|
43
43
|
|
44
44
|
@execution_count = 0
|
45
45
|
@backend = create_backend
|
46
|
+
@running = true
|
46
47
|
end
|
47
48
|
|
48
49
|
def create_backend
|
@@ -54,7 +55,7 @@ module IRuby
|
|
54
55
|
|
55
56
|
def run
|
56
57
|
send_status('starting')
|
57
|
-
while
|
58
|
+
while @running
|
58
59
|
ident, msg = @session.recv(@reply_socket, 0)
|
59
60
|
type = msg[:header]['msg_type']
|
60
61
|
if type =~ /_request\Z/ && respond_to?(type)
|
@@ -151,6 +152,7 @@ module IRuby
|
|
151
152
|
|
152
153
|
def shutdown_request(ident, msg)
|
153
154
|
@session.send(@reply_socket, 'shutdown_reply', msg[:content], ident)
|
155
|
+
@running = false
|
154
156
|
end
|
155
157
|
|
156
158
|
def history_request(ident, msg)
|
data/lib/iruby/version.rb
CHANGED