watch-me-now 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/watch-me-now +11 -1
  3. data/watch-me-now.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.5.2
@@ -1,3 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
  # This doesnt work - use 'watchr watch-me-now.rb'
3
- system("watchr watch-me-now.rb")
3
+ # require 'rubygems'
4
+ require 'watchr'
5
+ # gem 'watch-me-now'
6
+
7
+ def find_in_load_path(path)
8
+ dir = (['.'] + $LOAD_PATH).uniq.detect {|p| Pathname(p).join(path).exist? }
9
+ dir ? path.expand_path(dir) : nil
10
+ end
11
+
12
+ absolute_path = find_in_load_path(Pathname("watch-me-now.rb")) or abort("no script found in load path: watch-me-now.rb")
13
+ Watchr::Controller.new(Watchr::Script.new(absolute_path), Watchr.handler.new).run
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{watch-me-now}
8
- s.version = "1.5.1"
8
+ s.version = "1.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rob Sanheim"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watch-me-now
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Sanheim