superscript 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/superscript +12 -3
- data/lib/superscript/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da0938c14b75842785ca944b6eba56a8cd6fcc3fc8115ebadc83214b4ec1680d
|
4
|
+
data.tar.gz: d1a5292fe31e969c292cbb918052353bae36bddab88854920ab1fac1c1b45e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e69ed11b7c8ef043e071afbe91046fd6300dc150730abbcf36ee21d9b91d2eba3d61b8a3f115848383316bcba475cf43f47d683ce4ce3b9102b2466c3a9f88f9
|
7
|
+
data.tar.gz: def954e7c30ee3ace175f207e52cbb078cd5e33f5cb31124e7cd344ab275f08001d4e7dd93d2a1fe538c6ff4c48ee2f2dde01dd0e1984250cc6e83021d47947e
|
data/Gemfile.lock
CHANGED
data/exe/superscript
CHANGED
@@ -1,13 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
$stdout.sync = true
|
4
|
+
|
3
5
|
require "bundler/setup"
|
4
6
|
require "superscript"
|
5
7
|
|
6
|
-
unless ARGV.length <
|
8
|
+
unless ARGV.length < 2
|
7
9
|
puts "USAGE: superscript dsl.rb script.rb"
|
8
10
|
exit 1
|
9
11
|
end
|
10
|
-
|
12
|
+
|
13
|
+
best_guess_path = if ARGV[0].start_with? "/"
|
14
|
+
ARGV[0]
|
15
|
+
else
|
16
|
+
File.join(".", ARGV[0])
|
17
|
+
end
|
18
|
+
|
19
|
+
require best_guess_path
|
11
20
|
|
12
21
|
ctx_classname = File.basename(ARGV[0]).split(".").first.capitalize
|
13
22
|
ctx = (eval "#{ctx_classname}").new
|
@@ -19,7 +28,7 @@ else
|
|
19
28
|
runner = Superscript::Runner.new
|
20
29
|
loop do
|
21
30
|
print "> "
|
22
|
-
contents = gets
|
31
|
+
contents = STDIN.gets
|
23
32
|
value = runner.run! ctx, contents: contents
|
24
33
|
puts " => #{value.inspect}"
|
25
34
|
end
|
data/lib/superscript/version.rb
CHANGED