sambal 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Spookfile +40 -6
- data/lib/sambal/client.rb +3 -3
- data/lib/sambal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70c296f73caebfc4f2f4ab9905e5fd026ab0901c
|
4
|
+
data.tar.gz: b6b08da8925d1aff26b44d0efa02c629a080ded9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0df7b2ceaeb41f7cb134c7878d5b06a14db34c58612139bf8191bd2a31d0cac85be95ddc7864b69aaafc413f7e9e23ba5cd9570fea5ea3e843742f91c68fb80
|
7
|
+
data.tar.gz: 0aab39d00f27e5625118698bf0f69fe21bc4df20f4f956743b356708d39ff74201fb19e4eaaed5b2fe3fa843ebc72f902309d2fcad710484f43fc71f3f8c1f04
|
data/Spookfile
CHANGED
@@ -1,11 +1,45 @@
|
|
1
|
-
--
|
1
|
+
-- vim: syntax=moon
|
2
|
+
-- see: https//github.com/johnae/spook
|
2
3
|
log_level "INFO"
|
4
|
+
fs = require 'fs'
|
5
|
+
execute = require('process').execute
|
6
|
+
-- Adds the built-in terminal_notifier
|
7
|
+
notify.add 'terminal_notifier'
|
8
|
+
-- Add "notifier" in path if any, otherwise
|
9
|
+
-- fail silently.
|
10
|
+
pcall notify.add, 'notifier'
|
3
11
|
|
12
|
+
{
|
13
|
+
:until_success
|
14
|
+
:command
|
15
|
+
:task_filter
|
16
|
+
:notifies
|
17
|
+
} = require 'spookfile_helpers'
|
18
|
+
|
19
|
+
test = (event, tasks) ->
|
20
|
+
until_success ->
|
21
|
+
notifies event.path, event, tasks
|
22
|
+
|
23
|
+
task_list = task_filter fs.is_present
|
4
24
|
rspec = command "bundle exec rspec -f d"
|
5
25
|
|
6
|
-
watch
|
7
|
-
|
8
|
-
on_changed "^spec/(
|
9
|
-
|
26
|
+
watch '.', ->
|
27
|
+
|
28
|
+
on_changed "^(spec)/(spec_helper%.rb)", (event) ->
|
29
|
+
test event, task_list(
|
30
|
+
rspec, "spec"
|
31
|
+
)
|
32
|
+
|
33
|
+
on_changed "^spec/(.*)_spec%.rb", (event, name) ->
|
34
|
+
test event, task_list(
|
35
|
+
rspec, "spec/#{name}_spec.rb"
|
36
|
+
)
|
37
|
+
|
38
|
+
on_changed "^lib/.*%.rb", (event) ->
|
39
|
+
test event, task_list(
|
40
|
+
rspec, "spec/sambal/client_spec.rb"
|
41
|
+
)
|
10
42
|
|
11
|
-
|
43
|
+
on_changed '^Spookfile$', ->
|
44
|
+
notify.info 'Re-executing spook...'
|
45
|
+
reload_spook!
|
data/lib/sambal/client.rb
CHANGED
@@ -60,8 +60,8 @@ module Sambal
|
|
60
60
|
close if @pid
|
61
61
|
exit(1)
|
62
62
|
end
|
63
|
-
rescue
|
64
|
-
raise RuntimeError
|
63
|
+
rescue => e
|
64
|
+
raise RuntimeError, "Unknown Process Failed!! (#{$!.to_s}): #{e.message.inspect}\n"+e.backtrace.join("\n")
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -242,7 +242,7 @@ module Sambal
|
|
242
242
|
response = @output.expect(/^smb:.*\\>/,@timeout)[0] rescue nil
|
243
243
|
if response.nil?
|
244
244
|
$stderr.puts "Failed to do #{cmd}"
|
245
|
-
raise
|
245
|
+
raise "Failed to do #{cmd}"
|
246
246
|
else
|
247
247
|
response
|
248
248
|
end
|
data/lib/sambal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Axel Eriksson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|