iruby 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6328c32b7e75b494cd08458788f44d248a9a489
4
- data.tar.gz: 72025f2f1d1dd21822c428df248654e428136172
3
+ metadata.gz: 7b09b1cf29e3f33b4b7a7f79773e4c2f07581bbe
4
+ data.tar.gz: 6d09db553a2b1b2b13912d9f29f9c4613e7fda22
5
5
  SHA512:
6
- metadata.gz: 32acad6991f90fcfdc255dbf5ca568a2777b36f553c9410f977bf03bc203a11fd0242748af86a5bf5a2cfe1f3edd37f32015ba723e6e7aed339516dc7eeb1566
7
- data.tar.gz: 91d092d26a2f45f19b6cc6f57b4deced49afe99ca6d99dc4daf57e93adf992f0ae6abb55c5f5df522fe1eb105d81594858a4617c126f35ffb41ae7ca744bb7f2
6
+ metadata.gz: b7cd57569f47ea87f8da1ba1a7109b67f2f50cb5f9d9e7f302e3390b89e0136b45113751784f215601376aed561bc284ca3ebed86f2800ca133fb3eb85b2a1a0
7
+ data.tar.gz: 527bc7b8990342e5236e1b9e92ee414865cb45c4d30ae3cc7f22ceffffb4a55d404829960f5219e78acc4dd2221f8d5f57e88753a3bcfcdc5f4b0d6aa71ae6f0
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 0.1.9
2
+
3
+ * Check IPython version
4
+
1
5
  0.1.7/0.1.8
2
6
 
3
7
  * Bugfixes #11, #12, #13
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
  ![IRuby Notebook](screenshot.png)
6
6
 
7
- ### Usage
7
+ ### Quick start
8
8
 
9
- Install the rubygem using `gem install iruby` and then run `iruby notebook` or `iruby`.
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 true
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
@@ -1,3 +1,3 @@
1
1
  module IRuby
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damián Silvani