guard-rake 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rake'
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,21 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ guard-rake (0.0.1)
5
+ guard
6
+ rake
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ guard (0.5.1)
12
+ thor (~> 0.14.6)
13
+ rake (0.9.2)
14
+ thor (0.14.6)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ guard-rake!
21
+ rake
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require 'guard/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'guard-rake'
7
+ s.version = Guard::Rake::VERSION
8
+ s.authors = ['Scott Barron']
9
+ s.email = ['scott@elitists.net']
10
+ s.homepage = 'http://github.com/rubyist/guard-rake'
11
+ s.summary = %q{Guard for running rake tasks}
12
+ s.description = %q{guard-rake automatically runs Rake tasks from your Rakefile}
13
+
14
+ s.add_dependency 'guard'
15
+ s.add_dependency 'rake'
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) }
20
+ s.require_paths = ['lib']
21
+ end
22
+
@@ -0,0 +1,3 @@
1
+ guard 'rake', :task => 'build' do
2
+ watch(%r{^my_file.rb})
3
+ end
data/lib/guard/rake.rb ADDED
@@ -0,0 +1,43 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'rake'
4
+
5
+ module Guard
6
+ class Rake < Guard
7
+ include ::Rake::DSL
8
+
9
+ def initialize(watchers=[], options={})
10
+ @task = options[:task]
11
+ super
12
+ end
13
+
14
+ def start
15
+ UI.info "Starting guard-rake #{@task}"
16
+ load 'Rakefile'
17
+ true
18
+ end
19
+
20
+ def stop
21
+ UI.info "Stopping guard-rake #{@task}"
22
+ true
23
+ end
24
+
25
+ def reload
26
+ stop
27
+ start
28
+ end
29
+
30
+ def run_all
31
+ run_rake_task
32
+ end
33
+
34
+ def run_on_change(paths)
35
+ run_rake_task
36
+ end
37
+
38
+ def run_rake_task
39
+ UI.info "running #{@task}"
40
+ ::Rake::Task[@task].execute
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module Rake
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-rake
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Scott Barron
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-08-01 00:00:00 -04:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: guard
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ description: guard-rake automatically runs Rake tasks from your Rakefile
39
+ email:
40
+ - scott@elitists.net
41
+ executables: []
42
+
43
+ extensions: []
44
+
45
+ extra_rdoc_files: []
46
+
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - Rakefile
52
+ - guard-rake.gemspec
53
+ - lib/guard/rake.rb
54
+ - lib/guard/rake/templates/Guardfile
55
+ - lib/guard/version.rb
56
+ has_rdoc: true
57
+ homepage: http://github.com/rubyist/guard-rake
58
+ licenses: []
59
+
60
+ post_install_message:
61
+ rdoc_options: []
62
+
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.6.2
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Guard for running rake tasks
84
+ test_files: []
85
+