guard-rake 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -47,6 +47,7 @@ the watched files change.
47
47
  ``` ruby
48
48
  :task => 'doit' # name of the task to be executed, required
49
49
  :run_on_all => false # runs when the 'run_all' signal is received from Guard (enter is pressed), default: true
50
+ :run_on_start => true # runs when guard is started, default: true
50
51
  ```
51
52
 
52
53
  ## Development
@@ -1,10 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require 'guard/version'
3
+ require 'guard/rake/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'guard-rake'
7
- s.version = Guard::RakeVersion::VERSION
7
+ s.version = Guard::Rake::RakeVersion::VERSION
8
8
  s.authors = ['Scott Barron']
9
9
  s.email = ['scott@elitists.net']
10
10
  s.homepage = 'http://github.com/rubyist/guard-rake'
@@ -4,19 +4,20 @@ require 'rake'
4
4
 
5
5
  module Guard
6
6
  class Rake < Guard
7
- include ::Rake::DSL
8
-
9
7
  def initialize(watchers=[], options={})
10
8
  super
11
9
  @options = {
12
- run_on_all: true
10
+ :run_on_start => true,
11
+ :run_on_all => true
13
12
  }.update(options)
14
13
  @task = @options[:task]
15
14
  end
16
15
 
17
16
  def start
18
17
  UI.info "Starting guard-rake #{@task}"
19
- load 'Rakefile'
18
+ ::Rake.application.init
19
+ ::Rake.application.load_rakefile
20
+ run_all if @options[:run_on_start]
20
21
  true
21
22
  end
22
23
 
@@ -0,0 +1,7 @@
1
+ module Guard
2
+ module Rake
3
+ module RakeVersion
4
+ VERSION = "0.0.5"
5
+ end
6
+ end
7
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-rake
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Barron
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-24 00:00:00 Z
13
+ date: 2012-03-20 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: guard
@@ -53,7 +53,7 @@ files:
53
53
  - guard-rake.gemspec
54
54
  - lib/guard/rake.rb
55
55
  - lib/guard/rake/templates/Guardfile
56
- - lib/guard/version.rb
56
+ - lib/guard/rake/version.rb
57
57
  homepage: http://github.com/rubyist/guard-rake
58
58
  licenses: []
59
59
 
@@ -1,5 +0,0 @@
1
- module Guard
2
- module RakeVersion
3
- VERSION = "0.0.4"
4
- end
5
- end