guard-shell 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +35 -7
  2. data/lib/guard/shell.rb +1 -1
  3. metadata +7 -6
data/README.md CHANGED
@@ -1,8 +1,29 @@
1
1
  # Guard-Shell
2
2
 
3
3
  This little addition (1 proper line of code!) to guard allows you to run shell
4
- commands when certain files are altered. It is very simple to setup so here is
5
- a very quick guide.
4
+ commands when certain files are altered.
5
+
6
+
7
+ ## Install
8
+
9
+ Make sure you have [guard](http://github.com/guard/guard) installed.
10
+
11
+ Install the gem with:
12
+
13
+ gem install guard-shell
14
+
15
+ Add it to your Gemfile:
16
+
17
+ guard 'guard-shell'
18
+
19
+ And then add a basic setup to your Guardfile:
20
+
21
+ guard init shell
22
+
23
+
24
+ ## Usage
25
+
26
+ If you can do something in your shell, it is probably very easy to setup with guard-shell, here are a few examples.
6
27
 
7
28
 
8
29
  #### Creating Backups of Files On Change
@@ -13,11 +34,21 @@ a very quick guide.
13
34
  end
14
35
 
15
36
 
16
- #### Rebuilding a Latex File
37
+ #### Showing git st
38
+
39
+ guard 'shell' do
40
+ watch('.*') { `git st` }
41
+ end
42
+
43
+
44
+ #### Rebuilding a LaTeX File
17
45
 
18
46
  guard 'shell' do
19
47
  # builds latex file to pdf and hides output
20
- watch('(.*).tex') {|m| `pdflatex -shell-escape #{m[0]} 1>/dev/null` }
48
+ watch('(.*).tex') do |m|
49
+ `pdflatex -shell-escape #{m[0]} 1>/dev/null`
50
+ puts "built #{m[1]}.pdf"
51
+ end
21
52
  end
22
53
 
23
54
 
@@ -26,6 +57,3 @@ a very quick guide.
26
57
  guard 'shell' do
27
58
  watch('(.*)') {|m| `say #{m[0]}` }
28
59
  end
29
-
30
-
31
- And pretty much anything else you can think of!
data/lib/guard/shell.rb CHANGED
@@ -4,7 +4,7 @@ require 'guard/guard'
4
4
  module Guard
5
5
  class Shell < Guard
6
6
 
7
- VERSION = '0.1'
7
+ VERSION = '0.1.1'
8
8
 
9
9
  # Print the result of the command, if there is a result
10
10
  # to be printed. (see README.md)
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- version: "0.1"
8
+ - 1
9
+ version: 0.1.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Joshua Hawxwell
@@ -13,7 +14,7 @@ autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2010-10-17 00:00:00 +01:00
17
+ date: 2010-10-27 00:00:00 +01:00
17
18
  default_executable:
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
@@ -21,13 +22,13 @@ dependencies:
21
22
  requirement: &id001 !ruby/object:Gem::Requirement
22
23
  none: false
23
24
  requirements:
24
- - - ~>
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
27
  segments:
27
28
  - 0
28
- - 1
29
+ - 2
29
30
  - 0
30
- version: 0.1.0
31
+ version: 0.2.0
31
32
  type: :runtime
32
33
  prerelease: false
33
34
  version_requirements: *id001
@@ -62,7 +63,7 @@ dependencies:
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: *id003
65
- description: Guard::Shell automatically run shell commands when watched files are modified.
66
+ description: Guard::Shell automatically runs shell commands when watched files are modified.
66
67
  email:
67
68
  - m@hawx.me
68
69
  executables: []