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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5aa72cf029b53169fa955bba66735424b1947fbd
4
- data.tar.gz: 78c1a1d13b7215826210ea6218a08c33f8d70714
3
+ metadata.gz: 70c296f73caebfc4f2f4ab9905e5fd026ab0901c
4
+ data.tar.gz: b6b08da8925d1aff26b44d0efa02c629a080ded9
5
5
  SHA512:
6
- metadata.gz: 9bf4c8fea3956f86d9f78d2142fb77d7e5763d20abe0f7674b1ce15a54f81aca07c9be017ea6c0681c0a349b0620e5b84caf0d9fc0faf129893151daac8ef523
7
- data.tar.gz: 88ced4ce2d2be7272c735f83747ff033221b0034a41f3b44746ec3a41791a5d08776320eb6b322bd8a6df1c0f1af0542ffa38e7423120292b37398a43263415d
6
+ metadata.gz: f0df7b2ceaeb41f7cb134c7878d5b06a14db34c58612139bf8191bd2a31d0cac85be95ddc7864b69aaafc413f7e9e23ba5cd9570fea5ea3e843742f91c68fb80
7
+ data.tar.gz: 0aab39d00f27e5625118698bf0f69fe21bc4df20f4f956743b356708d39ff74201fb19e4eaaed5b2fe3fa843ebc72f902309d2fcad710484f43fc71f3f8c1f04
data/Spookfile CHANGED
@@ -1,11 +1,45 @@
1
- -- How much output do we want?
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 "lib", "spec", ->
7
- on_changed "^(spec)/(spec_helper%.rb)", -> rspec "spec"
8
- on_changed "^spec/(.*)_spec%.rb", (a) -> rspec "spec/#{a}_spec.rb"
9
- on_changed "^lib/sambal%.rb", (a) -> rspec "spec/sambal/client_spec.rb"
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
- notifier "#{os.getenv('HOME')}/.spook/notifiers"
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 Exception => e
64
- raise RuntimeError.exception("Unknown Process Failed!! (#{$!.to_s}): #{e.message.inspect}\n"+e.backtrace.join("\n"))
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 Exception.new, "Failed to do #{cmd}"
245
+ raise "Failed to do #{cmd}"
246
246
  else
247
247
  response
248
248
  end
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Sambal
4
- VERSION = "0.1.9"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.9
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-08-15 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec