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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9785b79812712c5a7f9478e388e76fcaee847b85d1bfa0705ed10853d19b7ea5
4
- data.tar.gz: a192f6af6724218a0a55247775842d6c73fb7aa061001c5438bcafc5b6672712
3
+ metadata.gz: a50767a14e1032fc83d6b6a224e81ab3ef6fca7d27a3569cd2cf9519fc5d2543
4
+ data.tar.gz: 98f6efc72583d13f723f5e3edf10ff3de226a1a39f4872b2c44e6b99e120cd5b
5
5
  SHA512:
6
- metadata.gz: 17bb91b50d39b6bf132c4a2d91bf6bc28cc6d7af4ffc693154c6f4bf98eae35ff079ab71720ec77c3a8baff4663f7ce7e4da0f62f550e083cb1d996da657e737
7
- data.tar.gz: 6858f505a3bd1dd6ba780d5f5442f4e59fca60b1613c283a7373fc59084b36e9ce7ea637ce2659d13bba6828efa9b71b52bed6f5517054e254283f90e6455493
6
+ metadata.gz: 39c1ab8b24c5c6582029c4f53b6667443183ea86e2d03dc9543dd76fdec37452bd40870c36fa1f9c4a96e1298316484dab15a66dbe605b0d46d6147c130bbd4f
7
+ data.tar.gz: b6d41b31b6b085db546515daa9f6aa842b8c3e58a0d79695f180e712e2dbdcf9b21fc47eb610011c164dd58ff466d3993d984acdf84382aede00e9b8ede06c4d
@@ -8,9 +8,4 @@ class HaskellFileHook < Mumukit::Templates::FileHook
8
8
  def tempfile_extension
9
9
  '.hs'
10
10
  end
11
-
12
- def command_line(filename)
13
- "runhaskell #{filename}"
14
- end
15
-
16
- end
11
+ end
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
@@ -38,4 +38,8 @@ main = hspecWith defaultConfig {configFormatter = Just structured} $ do
38
38
  #{req.test.lines.map {|it| ' ' + it}.join}
39
39
  EOF
40
40
  end
41
+
42
+ def command_line(filename)
43
+ "runhaskell #{filename}"
44
+ end
41
45
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module HaskellVersionHook
2
- VERSION = '1.3.3'
2
+ VERSION = '1.4.0'
3
3
  end
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.3.3
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-01-17 00:00:00.000000000 Z
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.17'
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.17'
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.2
132
+ rubygems_version: 3.0.3
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Haskell Runner for Mumuki