iruby 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/IRuby-Example.ipynb +119 -32
- data/lib/iruby/command.rb +1 -1
- data/lib/iruby/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55b3e1540c63f4babaac469dccb8464a796aab47
|
4
|
+
data.tar.gz: 4c7a5d28d0198daed5aa744b5cda162042ef815a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0838fe2c36cae89acf23d9a892f428a488d1e85694f20105475767771f791c68b5cd2bcf1d595562076c39afd3b8f902fe815d995937c8f397d007d86d00e741
|
7
|
+
data.tar.gz: 4707a0911e64fd68bde7e75a406224425c7219fcc8877c72646249a6d6d279977219b8d2d0c0f8b5935af187a64e4fd6a3bb2b85634399ae60fa38212ac9d53e
|
data/IRuby-Example.ipynb
CHANGED
@@ -8,20 +8,48 @@
|
|
8
8
|
"worksheets": [
|
9
9
|
{
|
10
10
|
"cells": [
|
11
|
+
{
|
12
|
+
"cell_type": "heading",
|
13
|
+
"level": 1,
|
14
|
+
"metadata": {},
|
15
|
+
"source": [
|
16
|
+
"This is an IPython notebook backed by a Ruby kernel"
|
17
|
+
]
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"cell_type": "markdown",
|
21
|
+
"metadata": {},
|
22
|
+
"source": [
|
23
|
+
"I am developing [IRuby](https://github.com/minad/iruby) a kernel in Ruby that adheres to the [IPython](http://ipython.org/) messaging protocol. It integrates nicely with different Ruby gems as will be shown later."
|
24
|
+
]
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"cell_type": "heading",
|
28
|
+
"level": 2,
|
29
|
+
"metadata": {},
|
30
|
+
"source": [
|
31
|
+
"What does this give you?"
|
32
|
+
]
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"cell_type": "markdown",
|
36
|
+
"metadata": {},
|
37
|
+
"source": [
|
38
|
+
"This gives us a very fancy web notebook interface for Ruby. It's a very good tool for programming presentations. It's basically an in-browser REPL loop, with some extra goodies."
|
39
|
+
]
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"cell_type": "heading",
|
43
|
+
"level": 2,
|
44
|
+
"metadata": {},
|
45
|
+
"source": [
|
46
|
+
"Usage"
|
47
|
+
]
|
48
|
+
},
|
11
49
|
{
|
12
50
|
"cell_type": "markdown",
|
13
51
|
"metadata": {},
|
14
52
|
"source": [
|
15
|
-
"# This is an IPython notebook backed by a Ruby kernel\n",
|
16
|
-
"\n",
|
17
|
-
"I am developing a kernel in Ruby that adheres to the [IPython](http://ipython.org/) messaging protocol. It integrates nicely with different Ruby gems as will be shown later.\n",
|
18
|
-
"\n",
|
19
|
-
"## What does this give you?\n",
|
20
|
-
"\n",
|
21
|
-
"This gives us a very fancy web notebook interface for Ruby. It's a very good tool for programming presentations. It's basically an in-browser REPL loop, with some extra goodies.\n",
|
22
|
-
"\n",
|
23
|
-
"## Usage\n",
|
24
|
-
"\n",
|
25
53
|
"Install IRuby with:\n",
|
26
54
|
"\n",
|
27
55
|
"~~~\n",
|
@@ -32,10 +60,21 @@
|
|
32
60
|
"\n",
|
33
61
|
"~~~\n",
|
34
62
|
"iruby notebook\n",
|
35
|
-
"
|
36
|
-
|
37
|
-
|
38
|
-
|
63
|
+
"~~~"
|
64
|
+
]
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"cell_type": "heading",
|
68
|
+
"level": 2,
|
69
|
+
"metadata": {},
|
70
|
+
"source": [
|
71
|
+
"Example"
|
72
|
+
]
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"cell_type": "markdown",
|
76
|
+
"metadata": {},
|
77
|
+
"source": [
|
39
78
|
"`$stdout` and `$stderr` are redirected to the notebook"
|
40
79
|
]
|
41
80
|
},
|
@@ -1102,12 +1141,18 @@
|
|
1102
1141
|
],
|
1103
1142
|
"prompt_number": 5
|
1104
1143
|
},
|
1144
|
+
{
|
1145
|
+
"cell_type": "heading",
|
1146
|
+
"level": 2,
|
1147
|
+
"metadata": {},
|
1148
|
+
"source": [
|
1149
|
+
"Display"
|
1150
|
+
]
|
1151
|
+
},
|
1105
1152
|
{
|
1106
1153
|
"cell_type": "markdown",
|
1107
1154
|
"metadata": {},
|
1108
1155
|
"source": [
|
1109
|
-
"## Display\n",
|
1110
|
-
"\n",
|
1111
1156
|
"IRuby provides a method to display objects `IRuby.display` and methods to create $\\LaTeX$ and HTML representations."
|
1112
1157
|
]
|
1113
1158
|
},
|
@@ -1302,14 +1347,26 @@
|
|
1302
1347
|
],
|
1303
1348
|
"prompt_number": 9
|
1304
1349
|
},
|
1350
|
+
{
|
1351
|
+
"cell_type": "heading",
|
1352
|
+
"level": 2,
|
1353
|
+
"metadata": {},
|
1354
|
+
"source": [
|
1355
|
+
"Integration with Ruby gems"
|
1356
|
+
]
|
1357
|
+
},
|
1358
|
+
{
|
1359
|
+
"cell_type": "heading",
|
1360
|
+
"level": 3,
|
1361
|
+
"metadata": {},
|
1362
|
+
"source": [
|
1363
|
+
"Pry"
|
1364
|
+
]
|
1365
|
+
},
|
1305
1366
|
{
|
1306
1367
|
"cell_type": "markdown",
|
1307
1368
|
"metadata": {},
|
1308
1369
|
"source": [
|
1309
|
-
"## Integration with Ruby gems\n",
|
1310
|
-
"\n",
|
1311
|
-
"### Pry\n",
|
1312
|
-
"\n",
|
1313
1370
|
"[Pry](https://github.com/pry/pry) is an enhanced Ruby REPL. It will be automatically used by IRuby if available. You can use the code browsing utilities for example."
|
1314
1371
|
]
|
1315
1372
|
},
|
@@ -1353,12 +1410,18 @@
|
|
1353
1410
|
],
|
1354
1411
|
"prompt_number": 10
|
1355
1412
|
},
|
1413
|
+
{
|
1414
|
+
"cell_type": "heading",
|
1415
|
+
"level": 3,
|
1416
|
+
"metadata": {},
|
1417
|
+
"source": [
|
1418
|
+
"RMagick"
|
1419
|
+
]
|
1420
|
+
},
|
1356
1421
|
{
|
1357
1422
|
"cell_type": "markdown",
|
1358
1423
|
"metadata": {},
|
1359
1424
|
"source": [
|
1360
|
-
"### RMagick\n",
|
1361
|
-
"\n",
|
1362
1425
|
"`Magick::Image` objects are automatically displayed inline as PNG."
|
1363
1426
|
]
|
1364
1427
|
},
|
@@ -1398,12 +1461,18 @@
|
|
1398
1461
|
],
|
1399
1462
|
"prompt_number": 11
|
1400
1463
|
},
|
1464
|
+
{
|
1465
|
+
"cell_type": "heading",
|
1466
|
+
"level": 3,
|
1467
|
+
"metadata": {},
|
1468
|
+
"source": [
|
1469
|
+
"Gnuplot"
|
1470
|
+
]
|
1471
|
+
},
|
1401
1472
|
{
|
1402
1473
|
"cell_type": "markdown",
|
1403
1474
|
"metadata": {},
|
1404
1475
|
"source": [
|
1405
|
-
"### Gnuplot\n",
|
1406
|
-
"\n",
|
1407
1476
|
"`Gnuplot::Plot` objects are automatically displayed inline as SVG."
|
1408
1477
|
]
|
1409
1478
|
},
|
@@ -3113,12 +3182,18 @@
|
|
3113
3182
|
],
|
3114
3183
|
"prompt_number": 13
|
3115
3184
|
},
|
3185
|
+
{
|
3186
|
+
"cell_type": "heading",
|
3187
|
+
"level": 3,
|
3188
|
+
"metadata": {},
|
3189
|
+
"source": [
|
3190
|
+
"Rubyvis"
|
3191
|
+
]
|
3192
|
+
},
|
3116
3193
|
{
|
3117
3194
|
"cell_type": "markdown",
|
3118
3195
|
"metadata": {},
|
3119
3196
|
"source": [
|
3120
|
-
"### Rubyvis\n",
|
3121
|
-
"\n",
|
3122
3197
|
"`Rubyvis` objects are automatically displayed inline as SVG."
|
3123
3198
|
]
|
3124
3199
|
},
|
@@ -3157,13 +3232,19 @@
|
|
3157
3232
|
],
|
3158
3233
|
"prompt_number": 14
|
3159
3234
|
},
|
3235
|
+
{
|
3236
|
+
"cell_type": "heading",
|
3237
|
+
"level": 3,
|
3238
|
+
"metadata": {},
|
3239
|
+
"source": [
|
3240
|
+
"Gruff"
|
3241
|
+
]
|
3242
|
+
},
|
3160
3243
|
{
|
3161
3244
|
"cell_type": "markdown",
|
3162
3245
|
"metadata": {},
|
3163
3246
|
"source": [
|
3164
|
-
"
|
3165
|
-
"\n",
|
3166
|
-
"`Gruff::Base` objects are automatically displayed inline as PNG.\n"
|
3247
|
+
"`Gruff::Base` objects are automatically displayed inline as PNG."
|
3167
3248
|
]
|
3168
3249
|
},
|
3169
3250
|
{
|
@@ -3196,13 +3277,19 @@
|
|
3196
3277
|
],
|
3197
3278
|
"prompt_number": 15
|
3198
3279
|
},
|
3280
|
+
{
|
3281
|
+
"cell_type": "heading",
|
3282
|
+
"level": 3,
|
3283
|
+
"metadata": {},
|
3284
|
+
"source": [
|
3285
|
+
"Matrix & GSL"
|
3286
|
+
]
|
3287
|
+
},
|
3199
3288
|
{
|
3200
3289
|
"cell_type": "markdown",
|
3201
3290
|
"metadata": {},
|
3202
3291
|
"source": [
|
3203
|
-
"
|
3204
|
-
"\n",
|
3205
|
-
"`Matrix` and `GSL::Matrix` objects are automatically displayed as $\\LaTeX$.\n"
|
3292
|
+
"`Matrix` and `GSL::Matrix` objects are automatically displayed as $\\LaTeX$."
|
3206
3293
|
]
|
3207
3294
|
},
|
3208
3295
|
{
|
data/lib/iruby/command.rb
CHANGED
@@ -71,7 +71,7 @@ module IRuby
|
|
71
71
|
static_dir = File.join(profile_dir, 'static')
|
72
72
|
target_dir = File.join(File.dirname(__FILE__), 'static')
|
73
73
|
unless (File.readlink(static_dir) rescue nil) == target_dir
|
74
|
-
File.unlink(static_dir)
|
74
|
+
File.unlink(static_dir) rescue nil
|
75
75
|
File.symlink(target_dir, static_dir)
|
76
76
|
end
|
77
77
|
end
|
data/lib/iruby/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damián Silvani
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-10-
|
15
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -150,9 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.0.
|
153
|
+
rubygems_version: 2.0.3
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: A Ruby kernel for IPython frontends (notebook console, etc.)
|
157
157
|
test_files: []
|
158
|
-
has_rdoc:
|