visionmedia-bind 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,16 @@
1
1
 
2
+ === 0.2.4 / 2009-03-22
3
+
4
+ * Removed options_to_hash, using Options#__hash__ now
5
+ * visionmedia-commander >=3.1.5
6
+ * Removed loadpath
7
+
8
+ === 0.2.3 / 2009-03-20
9
+
10
+ * Added more specs for listener
11
+ * Added specs for command helpers
12
+ * Removed loadpath unshift
13
+
2
14
  === 0.2.2 / 2009-03-13
3
15
 
4
16
  * Updated dependency visionmedia-commander >= 3.1.1
data/Manifest CHANGED
@@ -15,21 +15,17 @@ lib/bind.rb
15
15
  Manifest
16
16
  Rakefile
17
17
  README.rdoc
18
- spec/bind_listener_spec.rb
18
+ spec/command_helper_spec.rb
19
19
  spec/fixtures/assets/bar.css
20
20
  spec/fixtures/assets/foo.css
21
21
  spec/fixtures/assets/jquery.js
22
22
  spec/fixtures/assets/js/app.js
23
23
  spec/fixtures/assets/js/test.js
24
24
  spec/fixtures/style.css
25
+ spec/listener_spec.rb
25
26
  spec/spec_helper.rb
26
27
  tasks/docs.rake
27
28
  tasks/gemspec.rake
28
29
  tasks/release.rake
29
30
  tasks/spec.rake
30
- test/assets/javascripts/app/foo.js
31
- test/assets/javascripts/jquery.js
32
- test/assets/stylesheets/foo.css
33
- test/assets/stylesheets/style.css
34
- test/stylesheets/style.sass
35
31
  Todo.rdoc
data/Rakefile CHANGED
@@ -1,16 +1,17 @@
1
1
 
2
+ $:.unshift 'lib'
3
+ require 'bind'
2
4
  require 'rubygems'
3
5
  require 'rake'
4
6
  require 'echoe'
5
- require './lib/bind.rb'
6
7
 
7
- Echoe.new("bind", Bind::VERSION) do |p|
8
+ Echoe.new "bind", Bind::VERSION do |p|
8
9
  p.author = "TJ Holowaychuk"
9
10
  p.email = "tj@vision-media.ca"
10
11
  p.summary = "bind actions to filesystem events"
11
12
  p.url = "http://github.com/visionmedia/bind"
12
13
  p.runtime_dependencies = []
13
- p.runtime_dependencies << 'visionmedia-commander >=3.1.1'
14
+ p.runtime_dependencies << 'visionmedia-commander >=3.1.5'
14
15
  end
15
16
 
16
17
  Dir['tasks/**/*.rake'].sort.each { |lib| load lib }
data/Todo.rdoc CHANGED
@@ -1,6 +1,9 @@
1
1
 
2
2
  == Major:
3
3
 
4
+ * Allow --paths to have globs ... and dirs test this
5
+ * Autotest-like functionality for specs / refactoring
6
+ * rbind rake ext:build spec --paths foo,foobar,w/e
4
7
  * Test refresh eval
5
8
  * Increase readability / Documentation
6
9
  * Better specs
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bind}
5
- s.version = "0.2.2"
5
+ s.version = "0.2.4"
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"]
9
- s.date = %q{2009-03-13}
9
+ s.date = %q{2009-03-22}
10
10
  s.default_executable = %q{rbind}
11
11
  s.description = %q{bind actions to filesystem events}
12
12
  s.email = %q{tj@vision-media.ca}
13
13
  s.executables = ["rbind"]
14
14
  s.extra_rdoc_files = ["bin/rbind", "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/release.rake", "tasks/spec.rake"]
15
- s.files = ["bin/rbind", "bind.gemspec", "examples/demo.html", "examples/globbing.rb", "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/assets/bar.css", "spec/fixtures/assets/foo.css", "spec/fixtures/assets/jquery.js", "spec/fixtures/assets/js/app.js", "spec/fixtures/assets/js/test.js", "spec/fixtures/style.css", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/release.rake", "tasks/spec.rake", "test/assets/javascripts/app/foo.js", "test/assets/javascripts/jquery.js", "test/assets/stylesheets/foo.css", "test/assets/stylesheets/style.css", "test/stylesheets/style.sass", "Todo.rdoc"]
15
+ s.files = ["bin/rbind", "bind.gemspec", "examples/demo.html", "examples/globbing.rb", "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/command_helper_spec.rb", "spec/fixtures/assets/bar.css", "spec/fixtures/assets/foo.css", "spec/fixtures/assets/jquery.js", "spec/fixtures/assets/js/app.js", "spec/fixtures/assets/js/test.js", "spec/fixtures/style.css", "spec/listener_spec.rb", "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"]
@@ -26,11 +26,11 @@ Gem::Specification.new do |s|
26
26
  s.specification_version = 2
27
27
 
28
28
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
- s.add_runtime_dependency(%q<visionmedia-commander>, [">= 3.1.1"])
29
+ s.add_runtime_dependency(%q<visionmedia-commander>, [">= 3.1.5"])
30
30
  else
31
- s.add_dependency(%q<visionmedia-commander>, [">= 3.1.1"])
31
+ s.add_dependency(%q<visionmedia-commander>, [">= 3.1.5"])
32
32
  end
33
33
  else
34
- s.add_dependency(%q<visionmedia-commander>, [">= 3.1.1"])
34
+ s.add_dependency(%q<visionmedia-commander>, [">= 3.1.5"])
35
35
  end
36
36
  end
@@ -21,8 +21,6 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #++
23
23
 
24
- $:.unshift File.dirname(__FILE__)
25
-
26
24
  require 'bind/version'
27
25
  require 'bind/listener'
28
26
  require 'bind/actions'
@@ -8,7 +8,7 @@ def set_common_options c
8
8
  end
9
9
 
10
10
  def listener options
11
- Bind::Listener.new options_to_hash(options)
11
+ Bind::Listener.new options.__hash__
12
12
  end
13
13
 
14
14
  def common_options options
@@ -20,11 +20,4 @@ end
20
20
 
21
21
  def expand_path path
22
22
  path.include?('://') ? path : File.expand_path(path)
23
- end
24
-
25
- def options_to_hash options
26
- options.singleton_methods.inject({}) do |hash, meth|
27
- hash[meth.to_sym] = options.send meth unless meth =~ /=$/
28
- hash
29
- end
30
23
  end
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  module Bind
4
3
  class Listener
5
4
 
@@ -40,7 +39,7 @@ module Bind
40
39
  end
41
40
 
42
41
  ##
43
- # Expand directories into file paths.
42
+ # Expand directories into file paths, returns array.
44
43
 
45
44
  def expand_dirs paths
46
45
  paths.inject [] do |files, path|
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Bind
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.4'
4
4
  end
@@ -0,0 +1,19 @@
1
+
2
+ require 'bind/command_helpers'
3
+ require 'ostruct'
4
+
5
+ describe Bind do
6
+ describe "Helpers" do
7
+
8
+ describe "#expand_path" do
9
+ it "should expand local files to an asolute path" do
10
+ expand_path('History.rdoc').should include('bind/History.rdoc')
11
+ end
12
+
13
+ it "should leave uris as they are" do
14
+ expand_path('http://foo.com').should == 'http://foo.com'
15
+ end
16
+ end
17
+
18
+ end
19
+ end
@@ -17,6 +17,11 @@ describe Bind::Listener do
17
17
  l.expand_dirs(fixture_path('assets')).should == files
18
18
  end
19
19
 
20
+ it "should expand paths to a single file" do
21
+ l = listener {}
22
+ l.expand_dirs(fixture_path('style.css')).should == ['./spec/fixtures/style.css']
23
+ end
24
+
20
25
  it "should expand directories using globbing" do
21
26
  files = %w(
22
27
  ./spec/fixtures/assets/jquery.js
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.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-13 00:00:00 -07:00
12
+ date: 2009-03-22 00:00:00 -07:00
13
13
  default_executable: rbind
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 3.1.1
23
+ version: 3.1.5
24
24
  version:
25
25
  description: bind actions to filesystem events
26
26
  email: tj@vision-media.ca
@@ -60,23 +60,19 @@ files:
60
60
  - Manifest
61
61
  - Rakefile
62
62
  - README.rdoc
63
- - spec/bind_listener_spec.rb
63
+ - spec/command_helper_spec.rb
64
64
  - spec/fixtures/assets/bar.css
65
65
  - spec/fixtures/assets/foo.css
66
66
  - spec/fixtures/assets/jquery.js
67
67
  - spec/fixtures/assets/js/app.js
68
68
  - spec/fixtures/assets/js/test.js
69
69
  - spec/fixtures/style.css
70
+ - spec/listener_spec.rb
70
71
  - spec/spec_helper.rb
71
72
  - tasks/docs.rake
72
73
  - tasks/gemspec.rake
73
74
  - tasks/release.rake
74
75
  - tasks/spec.rake
75
- - test/assets/javascripts/app/foo.js
76
- - test/assets/javascripts/jquery.js
77
- - test/assets/stylesheets/foo.css
78
- - test/assets/stylesheets/style.css
79
- - test/stylesheets/style.sass
80
76
  - Todo.rdoc
81
77
  has_rdoc: true
82
78
  homepage: http://github.com/visionmedia/bind