visionmedia-bind 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ === 0.0.6 / 2009-03-03
3
+
4
+ * Fixed RefreshBrowsersHaml, forgot to add the file to the manifest :)
5
+
2
6
  === 0.0.3 / 2009-03-03
3
7
 
4
8
  * Added action RefreshBrowsersHaml for haml / sass support
data/Manifest CHANGED
@@ -6,6 +6,7 @@ examples/refresh_browsers.rb
6
6
  examples/style.css
7
7
  History.rdoc
8
8
  lib/bind/actions/refresh_browsers.rb
9
+ lib/bind/actions/refresh_browsers_haml.rb
9
10
  lib/bind/actions.rb
10
11
  lib/bind/command_helpers.rb
11
12
  lib/bind/listener.rb
@@ -19,5 +20,6 @@ spec/fixtures/style.css
19
20
  spec/spec_helper.rb
20
21
  tasks/docs.rake
21
22
  tasks/gemspec.rake
23
+ tasks/release.rake
22
24
  tasks/spec.rake
23
25
  Todo.rdoc
data/bind.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bind}
5
- s.version = "0.0.5"
5
+ s.version = "0.0.6"
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"]
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.description = %q{bind actions to filesystem events}
12
12
  s.email = %q{tj@vision-media.ca}
13
13
  s.executables = ["bind"]
14
- s.extra_rdoc_files = ["bin/bind", "bind.gemspec", "lib/bind/actions/refresh_browsers.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/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.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/spec.rake", "Todo.rdoc"]
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"]
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,42 @@
1
+
2
+ require 'rubygems'
3
+ require 'haml'
4
+ require 'haml/exec'
5
+
6
+ module Bind
7
+ module Actions
8
+ class RefreshBrowsersHaml
9
+
10
+ attr_accessor :browsers, :uri
11
+
12
+ def initialize uri, dest, *browsers
13
+ @uri, @dest, @browsers = uri, dest, browsers
14
+ end
15
+
16
+ def call file
17
+ build_haml file if haml? file
18
+ build_sass file if sass? file
19
+ @browsers.each { |browser| `open -g -a #{browser} #{uri}` }
20
+ end
21
+
22
+ def build_haml file
23
+ opts = Haml::Exec::Haml.new [file.path, File.join(@dest, file.path)]
24
+ opts.parse!
25
+ end
26
+
27
+ def build_sass file
28
+ opts = Haml::Exec::Sass.new [file.path, File.join(@dest, file.path)]
29
+ opts.parse!
30
+ end
31
+
32
+ def haml?
33
+ file.path.include? '.haml'
34
+ end
35
+
36
+ def sass?
37
+ file.path.include? '.sass'
38
+ end
39
+
40
+ end
41
+ end
42
+ end
data/lib/bind/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Bind
3
3
  module VERSION #:nodoc:
4
- MAJOR, MINOR, TINY = 0, 0, 5
4
+ MAJOR, MINOR, TINY = 0, 0, 6
5
5
  STRING = [MAJOR, MINOR, TINY].join '.'
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+
2
+ namespace :release do
3
+
4
+ desc 'Release VERSION. Commits, tags, and pushes.'
5
+ task :version do
6
+ abort 'specify the version x.x.x' unless ENV['VERSION'] and ENV['VERSION'].match(/^\d+\.\d+\.\d+$/)
7
+ `rake manifest`
8
+ `rake gemspec`
9
+ `git commit -a -m '- Release #{ENV['VERSION']}'`
10
+ `git tag #{ENV['VERSION']} && git push && git push --tags`
11
+ puts "Release of #{ENV['VERSION']} complete"
12
+ end
13
+
14
+ 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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -32,6 +32,7 @@ extra_rdoc_files:
32
32
  - bin/bind
33
33
  - bind.gemspec
34
34
  - lib/bind/actions/refresh_browsers.rb
35
+ - lib/bind/actions/refresh_browsers_haml.rb
35
36
  - lib/bind/actions.rb
36
37
  - lib/bind/command_helpers.rb
37
38
  - lib/bind/listener.rb
@@ -40,6 +41,7 @@ extra_rdoc_files:
40
41
  - README.rdoc
41
42
  - tasks/docs.rake
42
43
  - tasks/gemspec.rake
44
+ - tasks/release.rake
43
45
  - tasks/spec.rake
44
46
  files:
45
47
  - bin/bind
@@ -50,6 +52,7 @@ files:
50
52
  - examples/style.css
51
53
  - History.rdoc
52
54
  - lib/bind/actions/refresh_browsers.rb
55
+ - lib/bind/actions/refresh_browsers_haml.rb
53
56
  - lib/bind/actions.rb
54
57
  - lib/bind/command_helpers.rb
55
58
  - lib/bind/listener.rb
@@ -63,6 +66,7 @@ files:
63
66
  - spec/spec_helper.rb
64
67
  - tasks/docs.rake
65
68
  - tasks/gemspec.rake
69
+ - tasks/release.rake
66
70
  - tasks/spec.rake
67
71
  - Todo.rdoc
68
72
  has_rdoc: true