guard-shell 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bcb751a97c0a1a06cefbce6872259763d7f44bef
4
+ data.tar.gz: 7d84044172ed27e7242bfa3b1207d92088a27c00
5
+ SHA512:
6
+ metadata.gz: 8a5127b741d18ebdddae354aa42387633f484c90e19cc983b516f34c68391f52caa0b1dd7d0bbb9d66e159986568f04a3521930b03024d82ae810eb4c7403a19
7
+ data.tar.gz: 040d0f021e4aed27506c33e8e8c50995f8a590f67815ef09649c31e537fe4d8ffa412d2f7b9c148cc9babf01b580ec0e677be23ea59f81dbb58ad8829ea7707e
@@ -1,12 +1,11 @@
1
1
  require 'guard'
2
2
  require 'guard/guard'
3
3
  require 'guard/watcher'
4
+ require 'guard/shell/version'
4
5
 
5
6
  module Guard
6
7
  class Shell < Guard
7
8
 
8
- VERSION = '0.5.2'
9
-
10
9
  # Calls #run_all if the :all_on_start option is present.
11
10
  def start
12
11
  run_all if options[:all_on_start]
@@ -29,5 +28,25 @@ module Guard
29
28
  def n(msg, title='', image=nil)
30
29
  Notifier.notify(msg, :title => title, :image => image)
31
30
  end
31
+
32
+ # Eager prints the result for stdout and stderr as it would be written when
33
+ # running the command from the terminal. This is useful for long running
34
+ # tasks.
35
+ def eager(command)
36
+ require 'pty'
37
+
38
+ begin
39
+ PTY.spawn command do |r, w, pid|
40
+ begin
41
+ puts
42
+ r.each {|line| print line }
43
+ rescue Errno::EIO
44
+ # the process has finished
45
+ end
46
+ end
47
+ rescue PTY::ChildExited
48
+ puts "The child process exited!"
49
+ end
50
+ end
32
51
  end
33
52
  end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module ShellVersion
3
+ VERSION = '0.6.0'
4
+ end
5
+ end
metadata CHANGED
@@ -1,34 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joshua Hawxwell
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-16 00:00:00.000000000 Z
11
+ date: 2013-12-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: guard
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.1.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.1.0
30
- description: ! " Guard::Shell automatically runs shell commands when watched files
31
- are\n modified.\n"
27
+ description: |2
28
+ Guard::Shell automatically runs shell commands when watched files are
29
+ modified.
32
30
  email: m@hawx.me
33
31
  executables: []
34
32
  extensions: []
@@ -37,30 +35,30 @@ files:
37
35
  - Readme.md
38
36
  - LICENSE
39
37
  - lib/guard/shell/templates/Guardfile
38
+ - lib/guard/shell/version.rb
40
39
  - lib/guard/shell.rb
41
40
  homepage: http://github.com/hawx/guard-shell
42
- licenses: []
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
43
44
  post_install_message:
44
45
  rdoc_options: []
45
46
  require_paths:
46
47
  - lib
47
48
  required_ruby_version: !ruby/object:Gem::Requirement
48
- none: false
49
49
  requirements:
50
- - - ! '>='
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
- none: false
55
54
  requirements:
56
- - - ! '>='
55
+ - - '>='
57
56
  - !ruby/object:Gem::Version
58
57
  version: '0'
59
58
  requirements: []
60
59
  rubyforge_project:
61
- rubygems_version: 1.8.23
60
+ rubygems_version: 2.0.14
62
61
  signing_key:
63
- specification_version: 3
62
+ specification_version: 4
64
63
  summary: Guard gem for running shell commands
65
64
  test_files: []
66
- has_rdoc: