guard-jekyll2 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "guard/guard-jekyll2/version"
3
+ require "guard/jekyll2/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "guard-jekyll2"
7
- s.version = Guard::GuardJekyll2::VERSION
7
+ s.version = Guard::Jekyll2Version::VERSION
8
8
  s.authors = ["Alexey Vakhov"]
9
9
  s.email = ["vakhov@gmail.com"]
10
10
  s.homepage = ""
@@ -17,4 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
+
21
+ s.add_dependency 'guard'
20
22
  end
@@ -0,0 +1,33 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'guard/watcher'
4
+
5
+ module Guard
6
+ class Jekyll2 < Guard
7
+ def initialize(watchers = [], options = {})
8
+ super
9
+ end
10
+
11
+ def start
12
+ UI.info "Jekyll2: waiting for file changes..."
13
+ end
14
+
15
+ def run_all
16
+ generate!
17
+ end
18
+
19
+ def run_on_change(paths)
20
+ unless paths.reject{|path| path =~ /^_site/}.empty?
21
+ UI.info "paths: #{paths.inspect}"
22
+ generate!
23
+ end
24
+ end
25
+
26
+ private
27
+ def generate!
28
+ UI.info "Jekyll2: running..."
29
+ `jekyll`
30
+ UI.info "Jekyll2: complete."
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,3 @@
1
+ guard 'jekyll2' do
2
+ watch /.*/
3
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ class Jekyll2Version
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-jekyll2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexey Vakhov
@@ -17,8 +17,21 @@ cert_chain: []
17
17
 
18
18
  date: 2012-02-14 00:00:00 +04:00
19
19
  default_executable:
20
- dependencies: []
21
-
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: guard
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
22
35
  description: Guard jekyll support
23
36
  email:
24
37
  - vakhov@gmail.com
@@ -34,9 +47,9 @@ files:
34
47
  - README.md
35
48
  - Rakefile
36
49
  - guard-jekyll2.gemspec
37
- - lib/guard-jekyll2.rb
38
- - lib/guard/guard-jekyll2/templates/Guardfile
39
- - lib/guard/guard-jekyll2/version.rb
50
+ - lib/guard/jekyll2.rb
51
+ - lib/guard/jekyll2/templates/Guardfile
52
+ - lib/guard/jekyll2/version.rb
40
53
  has_rdoc: true
41
54
  homepage: ""
42
55
  licenses: []
@@ -1,30 +0,0 @@
1
- require 'guard/guard-jekyll2/version'
2
- require 'guard'
3
- require 'guard/guard'
4
-
5
- module Guard
6
- class GuardJekyll2 < Guard
7
- def initialize(watchers = [], options = {})
8
- super
9
- end
10
-
11
- def start
12
- UI.info "waiting for file changes..."
13
- end
14
-
15
- def run_all
16
- generate!
17
- end
18
-
19
- def run_on_change(paths)
20
- generate!
21
- end
22
-
23
- private
24
- def generate!
25
- UI.info "running."
26
- `jekyll`
27
- UI.info "complete."
28
- end
29
- end
30
- end
@@ -1,3 +0,0 @@
1
- guard 'jekyll' do
2
- watch /.*/
3
- end
@@ -1,5 +0,0 @@
1
- module Guard
2
- module GuardJekyll2
3
- VERSION = "0.0.1"
4
- end
5
- end