guard-gulp 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3ff23354d4d9347461db4bd99592a740390a24fe
4
+ data.tar.gz: eb9b2723f47693d98dd2988e1dd105e9aac630b1
5
+ SHA512:
6
+ metadata.gz: 917e211c0d12259fc76eb8bd66c2038681f623aa34f42d3c122f807edec65a9052883b1147e5f4022cf7f601c074c0dbeb2d1134ffe79e0692a21e2ca3a35fc7
7
+ data.tar.gz: 9fc53596ace2cdcd77d92328e2e9716c1eb6e308fd541476fb4922a4fa30317d8fa235fe5846fbb86198d6ac8aa47e27c198de5d57b18c61831b51923f329048
@@ -0,0 +1 @@
1
+ 2.1.2
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "guard/gulp/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "guard-gulp"
7
+ s.version = Guard::GulpVersion::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['Nathan Fixler']
10
+ s.email = ['nathan@fixler.org']
11
+ s.homepage = 'http://rubygems.org/gems/guard-gulp'
12
+ s.summary = %q{guard gem for gulp}
13
+ s.description = %q{Guard::Gulp automatically starts/stops/restarts gulp}
14
+
15
+ s.required_rubygems_version = '>= 1.3.6'
16
+
17
+ s.add_dependency 'guard', '>= 1.1'
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- spec/*`.split("\n")
21
+ s.require_paths = ["lib"]
22
+ end
@@ -0,0 +1 @@
1
+ require 'guard/gulp'
@@ -0,0 +1,75 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+
4
+ module Guard
5
+ class Gulp < Guard
6
+ DEFAULT_SIGNAL = :QUIT
7
+
8
+ def initialize(watchers = [], options = {})
9
+ @options = options
10
+ @pid = nil
11
+ super
12
+ end
13
+
14
+ def start
15
+ stop
16
+ UI.info 'Starting gulp...'
17
+ UI.info cmd
18
+
19
+ @pid = spawn(env, cmd)
20
+ end
21
+
22
+ def stop
23
+ if @pid
24
+ UI.info 'Stopping gulp...'
25
+ UI.info 'Stopped process gulp'
26
+ ::Process.kill DEFAULT_SIGNAL, @pid
27
+ begin
28
+ Timeout.timeout(15) do
29
+ ::Process.wait @pid
30
+ end
31
+ rescue Timeout::Error
32
+ UI.info 'Sending SIGKILL to gulp, as it\'s taking too long to shutdown.'
33
+ ::Process.kill :KILL, @pid
34
+ ::Process.wait @pid
35
+ end
36
+ UI.info 'Stopped process guard'
37
+ end
38
+ rescue Errno::ESRCH
39
+ UI.info 'Guard::Gulp lost the Gulp subprocess!'
40
+ ensure
41
+ @pid = nil
42
+ end
43
+
44
+ # Called on Ctrl-Z signal
45
+ def reload
46
+ UI.info 'Restarting gulp...'
47
+ restart
48
+ end
49
+
50
+ # Called on Ctrl-/ signal
51
+ def run_all
52
+ true
53
+ end
54
+
55
+ # Called on file(s) modifications
56
+ def run_on_changes(paths)
57
+ restart
58
+ end
59
+
60
+ def restart
61
+ stop
62
+ start
63
+ end
64
+
65
+ private
66
+
67
+ def cmd
68
+ 'gulp watch'
69
+ end
70
+
71
+ def env
72
+ {}
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,4 @@
1
+ ### Guard::Gulp
2
+ guard 'gulp' do
3
+ watch(%r{^gulpfile.js$})
4
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module GulpVersion
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-gulp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nathan Fixler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: guard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
27
+ description: Guard::Gulp automatically starts/stops/restarts gulp
28
+ email:
29
+ - nathan@fixler.org
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".ruby-version"
35
+ - Gemfile
36
+ - guard-gulp.gemspec
37
+ - lib/guard-gulp.rb
38
+ - lib/guard/gulp.rb
39
+ - lib/guard/gulp/templates/Guardfile
40
+ - lib/guard/gulp/version.rb
41
+ homepage: http://rubygems.org/gems/guard-gulp
42
+ licenses: []
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 1.3.6
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.4.1
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: guard gem for gulp
64
+ test_files: []