guard-haskell 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +7 -0
- data/README.md +3 -1
- data/lib/guard/haskell.rb +2 -2
- data/lib/guard/haskell/repl.rb +7 -0
- data/lib/guard/haskell/templates/Guardfile +1 -0
- data/lib/guard/haskell/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjAyNGMwYTUxMDQ4NzQ0ZmUyYTZjODQ4MDVjMzhiMTdmMWM1ZmRlZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2QyMDM3OGJhMWMzNDllZjk5OGY5NDNiZWFjY2NiNTZlYmVhNjMxZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzI3MDVlZmZiM2Y0ZDFjYzMxYjAyMTY0ZjY0YTczMjgyOTE5MTcyNzYzMjFh
|
10
|
+
OTVjNjU0ZjNiZDU4ODRiMTQ1NzBhMDIyMzhhMDc2OTczNThlODg3OTM5ZDk3
|
11
|
+
ZTQ0ZTBmYzM5MmYwN2I2MTM2ZDEzNmJkNDg1NWVkMzJkZTFmNzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzNkMjE1ZGQ4Y2M4ZjZmNTE1OTExN2JmNTkzNGMyZjg0YjczZjU3ZWIyNmM3
|
14
|
+
ZWNiOGZiNDQ0ODI5OTRlYjJlNTIzNDcxNWUxYTA3Mzg4MWQ2MjAxZTI0OWU4
|
15
|
+
MzEwN2M3ODNjYmNhYjI0NjY3YmQ4ZmYwZGIzOWZmMmE2Yzc4YTE=
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,6 @@ guard-haskell
|
|
4
4
|
[![Build Status](https://secure.travis-ci.org/supki/guard-haskell.png?branch=master)](http://travis-ci.org/supki/guard-haskell)
|
5
5
|
[![Dependencies Status](https://gemnasium.com/supki/guard-haskell.png)](https://gemnasium.com/supki/guard-haskell)
|
6
6
|
|
7
|
-
|
8
7
|
`Guard::Haskell` automatically runs your specs
|
9
8
|
|
10
9
|
Install
|
@@ -46,6 +45,7 @@ A typical haskell project:
|
|
46
45
|
guard :haskell do
|
47
46
|
watch(%r{test/.+Spec\.l?hs$})
|
48
47
|
watch(%r{src/.+\.l?hs$})
|
48
|
+
watch(%r{\.cabal$})
|
49
49
|
end
|
50
50
|
```
|
51
51
|
|
@@ -58,6 +58,7 @@ guard :haskell, all_on_start: true, repl_options: options do
|
|
58
58
|
watch(%r{test/.+Spec\.l?hs$})
|
59
59
|
watch(%r{lib/.+\.l?hs$})
|
60
60
|
watch(%r{bin/.+\.l?hs$})
|
61
|
+
watch(%r{\.cabal$})
|
61
62
|
end
|
62
63
|
```
|
63
64
|
|
@@ -68,6 +69,7 @@ guard :haskell, all_on_start: true, all_on_pass: true, cabal_target: "not-spec"
|
|
68
69
|
watch(%r{test/.+Spec\.l?hs$})
|
69
70
|
watch(%r{lib/.+\.l?hs$})
|
70
71
|
watch(%r{bin/.+\.l?hs$})
|
72
|
+
watch(%r{\.cabal$})
|
71
73
|
end
|
72
74
|
```
|
73
75
|
|
data/lib/guard/haskell.rb
CHANGED
@@ -107,8 +107,8 @@ module ::Guard
|
|
107
107
|
|
108
108
|
def run_on_modifications(paths)
|
109
109
|
case paths.first
|
110
|
-
when /(.+)Spec\.l?hs$/, /(.+)\.l?hs$/
|
111
|
-
|
110
|
+
when /(.+)Spec\.l?hs$/, /(.+)\.l?hs$/ then run($1.to_module_name)
|
111
|
+
when /\.cabal$/ then reload
|
112
112
|
end
|
113
113
|
end
|
114
114
|
end
|
data/lib/guard/haskell/repl.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'open3'
|
2
2
|
|
3
3
|
class ::Guard::Haskell::Repl
|
4
|
+
class NoCabalFile < ::StandardError
|
5
|
+
def initialize(msg = "No cabal file found. Please create a package description file <pkgname>.cabal")
|
6
|
+
super
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
4
10
|
attr_reader :stdin, :listener, :inferior, :status
|
5
11
|
|
6
12
|
def self.finished_with(str)
|
@@ -26,6 +32,7 @@ class ::Guard::Haskell::Repl
|
|
26
32
|
def initialize(cabal_target, repl_options)
|
27
33
|
@listening = false
|
28
34
|
@status = :success
|
35
|
+
raise NoCabalFile if Dir.glob('*.cabal').empty?
|
29
36
|
start("cabal", "repl", cabal_target, *repl_options)
|
30
37
|
end
|
31
38
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-haskell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matvey Aksenov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|