visionmedia-bind 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,10 @@
1
1
 
2
+ === 0.0.9 / 2009-03-03
3
+
4
+ * Added RefreshBrowsersHaml example
5
+ * Fixed RefreshBrowsersHaml.. ruby library for haml's exec was not working
6
+ just using shell for now.
7
+
2
8
  === 0.0.8 / 2009-03-03
3
9
 
4
10
  * Fixed typo in RefreshBrowsersHaml
data/Manifest CHANGED
@@ -3,7 +3,9 @@ bind.gemspec
3
3
  examples/demo.html
4
4
  examples/log_changes.rb
5
5
  examples/refresh_browsers.rb
6
+ examples/refresh_browsers_haml.rb
6
7
  examples/style.css
8
+ examples/style.sass
7
9
  History.rdoc
8
10
  lib/bind/actions/refresh_browsers.rb
9
11
  lib/bind/actions/refresh_browsers_haml.rb
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bind}
5
- s.version = "0.0.8"
5
+ s.version = "0.0.9"
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"]
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = %q{tj@vision-media.ca}
13
13
  s.executables = ["bind"]
14
14
  s.extra_rdoc_files = ["bin/bind", "bind.gemspec", "lib/bind/actions/refresh_browsers.rb", "lib/bind/actions/refresh_browsers_haml.rb", "lib/bind/actions.rb", "lib/bind/command_helpers.rb", "lib/bind/listener.rb", "lib/bind/version.rb", "lib/bind.rb", "README.rdoc", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/release.rake", "tasks/spec.rake"]
15
- s.files = ["bin/bind", "bind.gemspec", "examples/demo.html", "examples/log_changes.rb", "examples/refresh_browsers.rb", "examples/style.css", "History.rdoc", "lib/bind/actions/refresh_browsers.rb", "lib/bind/actions/refresh_browsers_haml.rb", "lib/bind/actions.rb", "lib/bind/command_helpers.rb", "lib/bind/listener.rb", "lib/bind/version.rb", "lib/bind.rb", "Manifest", "Rakefile", "README.rdoc", "spec/bind_listener_spec.rb", "spec/fixtures/style.css", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/release.rake", "tasks/spec.rake", "Todo.rdoc"]
15
+ s.files = ["bin/bind", "bind.gemspec", "examples/demo.html", "examples/log_changes.rb", "examples/refresh_browsers.rb", "examples/refresh_browsers_haml.rb", "examples/style.css", "examples/style.sass", "History.rdoc", "lib/bind/actions/refresh_browsers.rb", "lib/bind/actions/refresh_browsers_haml.rb", "lib/bind/actions.rb", "lib/bind/command_helpers.rb", "lib/bind/listener.rb", "lib/bind/version.rb", "lib/bind.rb", "Manifest", "Rakefile", "README.rdoc", "spec/bind_listener_spec.rb", "spec/fixtures/style.css", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/release.rake", "tasks/spec.rake", "Todo.rdoc"]
16
16
  s.has_rdoc = true
17
17
  s.homepage = %q{http://github.com/visionmedia/bind}
18
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Bind", "--main", "README.rdoc"]
@@ -0,0 +1,10 @@
1
+
2
+ require File.dirname(__FILE__) + '/../lib/bind'
3
+
4
+ # Execute this file to start the listener, then alter style.css a few times
5
+
6
+ html = File.expand_path(File.dirname(__FILE__) + '/demo.html')
7
+ style = File.dirname(__FILE__) + '/style.sass'
8
+ action = Bind::Actions::RefreshBrowsersHaml.new html, '.', 'Safari'
9
+ listener = Bind::Listener.new :event => :change, :files => [style], :interval => 2, :action => action, :debug => $stdout
10
+ listener.run!
@@ -1,3 +1,2 @@
1
1
  h1 {
2
- color: blue;
3
- }
2
+ color: red; }
@@ -0,0 +1,2 @@
1
+ h1
2
+ :color red
@@ -10,7 +10,7 @@ module Bind
10
10
  attr_accessor :browsers, :uri
11
11
 
12
12
  def initialize uri, dest, *browsers
13
- @uri, @dest, @browsers = uri, dest, browsers
13
+ @uri, @dest, @browsers = uri, File.expand_path(dest), browsers
14
14
  end
15
15
 
16
16
  def call file
@@ -20,13 +20,11 @@ module Bind
20
20
  end
21
21
 
22
22
  def build_haml file
23
- opts = Haml::Exec::Haml.new [file.path, File.join(@dest, file.path)]
24
- opts.parse!
23
+ `haml #{ file.path } #{ File.join(@dest, file.path.sub('.haml', '.html')) }`
25
24
  end
26
25
 
27
26
  def build_sass file
28
- opts = Haml::Exec::Sass.new [file.path, File.join(@dest, file.path)]
29
- opts.parse!
27
+ `sass #{ file.path } #{ File.join(@dest, file.path.sub('.sass', '.css')) }`
30
28
  end
31
29
 
32
30
  def haml? file
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Bind
3
3
  module VERSION #:nodoc:
4
- MAJOR, MINOR, TINY = 0, 0, 8
4
+ MAJOR, MINOR, TINY = 0, 0, 9
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -49,7 +49,9 @@ files:
49
49
  - examples/demo.html
50
50
  - examples/log_changes.rb
51
51
  - examples/refresh_browsers.rb
52
+ - examples/refresh_browsers_haml.rb
52
53
  - examples/style.css
54
+ - examples/style.sass
53
55
  - History.rdoc
54
56
  - lib/bind/actions/refresh_browsers.rb
55
57
  - lib/bind/actions/refresh_browsers_haml.rb