irust 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +1 -0
- data/lib/irust.rb +10 -0
- data/lib/irust/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: a9bfb0bc7d02ab895c1997bce90ae057e5b1d9a1
|
4
|
+
data.tar.gz: b2cd75e03c51dfb488e66b0b3b4675c8e06cd3d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a38e74bdc5b51192509ac5dd9351a9a5cb0f85fd43f86be395ad7de16aa5c6419aa9177917d8c19049bebdf9d38dd83c4330ddcf2f74a73e294d41da5aa9ab29
|
7
|
+
data.tar.gz: 5d0d7c5236e5a776a05dcf3e18b4c8e22e6a242e35c1704ef16526dac4248a430752ffc797967106d7add89032c382b508f37fc24c6867bc60bea353e0a7b77f
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
data/lib/irust.rb
CHANGED
@@ -7,6 +7,15 @@ require "irust/template_renderer"
|
|
7
7
|
module IRust
|
8
8
|
module_function
|
9
9
|
|
10
|
+
def detect_rust
|
11
|
+
rust_version = `rustc -v`
|
12
|
+
puts "Using #{rust_version.split("\n").first}"
|
13
|
+
rescue Errno::ENOENT
|
14
|
+
STDERR.puts "No rustc detected! Please install Rust first!"
|
15
|
+
STDERR.puts "See the Quick Start at: https://github.com/mozilla/rust/blob/master/README.md"
|
16
|
+
exit 1
|
17
|
+
end
|
18
|
+
|
10
19
|
def read
|
11
20
|
Readline.readline("irust> ", true)
|
12
21
|
end
|
@@ -45,6 +54,7 @@ module IRust
|
|
45
54
|
end
|
46
55
|
|
47
56
|
def run
|
57
|
+
detect_rust
|
48
58
|
history = ""
|
49
59
|
loop { history = eval read, history }
|
50
60
|
end
|
data/lib/irust/version.rb
CHANGED