visionmedia-bind 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,9 +5,35 @@ Bind actions to various file system events, helping aid in
5
5
  automation of tasks such as refreshing browser(s) when you
6
6
  update a css / sass / js file.
7
7
 
8
- == Features
8
+ == Executable
9
9
 
10
- * Coming soon
10
+ The 'bind' executable allows you to perform arbitrary actions
11
+ based on several events. Currently only the change (mtime) event
12
+ is supported.
13
+
14
+ Bind to a single file, outputting its path when changed
15
+ $ bind to style.css -e 'puts file.path'
16
+
17
+ Refresh Safari, and Firefox in the background to the uri specified when
18
+ style.css or reset.css are modified.
19
+ $ bind refresh http://localhost/page --files style.css,reset.css --browsers Safari,Firefox
20
+
21
+ Refresh local static html when the style you are working on is modified.
22
+ $ bind refresh examples/demo.html -f style.css -b Safari
23
+
24
+ == Library
25
+
26
+ Bind of course supplies a Ruby library as well, which provides the same
27
+ functionality as the executable above.
28
+
29
+
30
+ Refresh Safari and Firefox, using the RefreshBrowsersHaml action, whenever a haml or
31
+ sass file is modified, it will be compiled to '..' (up a directory) preceding the refresh.
32
+
33
+ path = 'http://localhost'
34
+ action = Bind::Actions::RefreshBrowsersHaml.new path, '..', 'Safari', 'Firefox'
35
+ listener = Bind::Listener.new :interval => 1, :debug => $stdout, :action => action, :files => Dir['*.haml'] + Dir['*.sass']
36
+ listener.run!
11
37
 
12
38
  == License:
13
39
 
data/Todo.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  == Major:
3
3
 
4
- * Add support for an eval BEFORE actions, such as building SASS / HAML
4
+ * Add sass / haml support in exec
5
5
 
6
6
  == Minor:
7
7
 
data/bin/bind CHANGED
@@ -14,7 +14,7 @@ command :to do |c|
14
14
  c.syntax = 'bind to <file> [file ...] [options] '
15
15
  c.summary = 'Bind to modification of a file'
16
16
  c.description = 'Bind to modification of a file or all files within a directory.'
17
- c.example 'Bind to a single file, logging its path when changed', "bind change style.css -e 'puts file'"
17
+ c.example 'Bind to a single file, logging its path when changed', "bind to style.css -e 'puts file'"
18
18
  c.option '-e', '--eval STRING', String, 'Evaluate a string of Ruby in context of Bind, so the file local variable is available.'
19
19
  c.when_called do |args, options|
20
20
  populate_common_options options
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bind}
5
- s.version = "0.0.6"
5
+ s.version = "0.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Bind
3
3
  module VERSION #:nodoc:
4
- MAJOR, MINOR, TINY = 0, 0, 6
4
+ MAJOR, MINOR, TINY = 0, 0, 7
5
5
  STRING = [MAJOR, MINOR, TINY].join '.'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visionmedia-bind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk