mumuki-haskell-runner 1.3.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/haskell_file_hook.rb +1 -6
- data/lib/query_hook.rb +18 -2
- data/lib/test_hook.rb +4 -0
- data/lib/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a50767a14e1032fc83d6b6a224e81ab3ef6fca7d27a3569cd2cf9519fc5d2543
|
4
|
+
data.tar.gz: 98f6efc72583d13f723f5e3edf10ff3de226a1a39f4872b2c44e6b99e120cd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39c1ab8b24c5c6582029c4f53b6667443183ea86e2d03dc9543dd76fdec37452bd40870c36fa1f9c4a96e1298316484dab15a66dbe605b0d46d6147c130bbd4f
|
7
|
+
data.tar.gz: b6d41b31b6b085db546515daa9f6aa842b8c3e58a0d79695f180e712e2dbdcf9b21fc47eb610011c164dd58ff466d3993d984acdf84382aede00e9b8ede06c4d
|
data/lib/haskell_file_hook.rb
CHANGED
data/lib/query_hook.rb
CHANGED
@@ -6,8 +6,24 @@ import Text.Show.Functions
|
|
6
6
|
import Data.List
|
7
7
|
#{req.content}
|
8
8
|
#{req.extra}
|
9
|
-
main :: IO ()
|
10
|
-
main = putStrLn.show $ #{req.query}
|
11
9
|
EOF
|
12
10
|
end
|
11
|
+
|
12
|
+
def command_line(filename)
|
13
|
+
['bash', '-c', "ghci #{filename} <<< $0", request.query]
|
14
|
+
end
|
15
|
+
|
16
|
+
def post_process_file(_file, result, status)
|
17
|
+
result = result.split("\n")[3..-2].join("\n")
|
18
|
+
|
19
|
+
if passed_query_regex =~ result
|
20
|
+
[$1, status]
|
21
|
+
else
|
22
|
+
[result, :failed]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def passed_query_regex
|
27
|
+
/(?:\*Main|Prelude)> (.*)/
|
28
|
+
end
|
13
29
|
end
|
data/lib/test_hook.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-haskell-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.31'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.31'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.0.
|
132
|
+
rubygems_version: 3.0.3
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Haskell Runner for Mumuki
|