guard-jekyll 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/Gemfile +10 -1
- data/LICENSE.txt +22 -0
- data/Rakefile +9 -2
- data/guard-jekyll.gemspec +5 -3
- data/lib/guard/jekyll.rb +7 -8
- data/lib/guard/jekyll/templates/Guardfile +2 -1
- data/lib/guard/jekyll/version.rb +1 -1
- data/spec/lib/guard/jekyll_spec.rb +35 -0
- data/spec/spec_helper.rb +24 -0
- metadata +62 -20
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9fda4a537df96a4ec9d732dfcad2daa629ae75ba
|
4
|
+
data.tar.gz: 98a9549a84f524c19243984408e1d55b1079858b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: adb4e544a94fce8ae7b06964391a7797e4b05ac158abe1aee783a9d1a00ebfbde7880c3d797c39fbb128b48f5529a3eaeb0ec2511696e475e5e07c19dbb20eb5
|
7
|
+
data.tar.gz: f1a1a3120e86b141911818f9d141a334504ace52a6e7e93ae24899fd1b8e596d044c278df74c0f755dadc79e1bbfc915cd4d49107e78e20c845855b40e9e3c7c
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Brandon Mathis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
data/guard-jekyll.gemspec
CHANGED
@@ -12,10 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = "Guard gem for Jekyll."
|
13
13
|
s.description = "Guard::Jekyll automatically rebuilds websites with the Jekyll static site generator."
|
14
14
|
|
15
|
-
s.
|
16
|
-
|
17
|
-
s.add_dependency 'guard', '>= 1.1.0'
|
15
|
+
s.add_dependency 'guard', '~> 2.6'
|
16
|
+
s.add_dependency 'guard-compat', '~> 1.1'
|
18
17
|
s.add_dependency "jekyll"
|
18
|
+
s.add_dependency "nenv", '~> 0.1'
|
19
|
+
|
20
|
+
s.add_development_dependency 'bundler'
|
19
21
|
|
20
22
|
s.files = `git ls-files`.split("\n")
|
21
23
|
s.require_paths = ['lib']
|
data/lib/guard/jekyll.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
require 'guard'
|
2
|
-
require 'guard/guard'
|
1
|
+
require 'guard/compat/plugin'
|
3
2
|
|
4
3
|
require 'jekyll'
|
5
4
|
|
6
5
|
module Guard
|
7
|
-
class Jekyll <
|
6
|
+
class Jekyll < Plugin
|
8
7
|
def start
|
9
|
-
UI.info 'Guard::Jekyll is watching for file changes'
|
8
|
+
Compat::UI.info 'Guard::Jekyll is watching for file changes'
|
10
9
|
rebuild
|
11
10
|
end
|
12
11
|
|
@@ -14,7 +13,7 @@ module Guard
|
|
14
13
|
rebuild
|
15
14
|
end
|
16
15
|
|
17
|
-
def
|
16
|
+
def run_on_modifications(paths)
|
18
17
|
rebuild
|
19
18
|
end
|
20
19
|
|
@@ -23,14 +22,14 @@ module Guard
|
|
23
22
|
# rebuilds the entire jekyll site
|
24
23
|
#
|
25
24
|
def rebuild
|
26
|
-
UI.info 'Guard::Jekyll regenerating'
|
25
|
+
Compat::UI.info 'Guard::Jekyll regenerating'
|
27
26
|
|
28
27
|
site = ::Jekyll::Site.new(::Jekyll.configuration(options))
|
29
28
|
site.process
|
30
29
|
|
31
|
-
UI.info 'Guard::Jekyll done.'
|
30
|
+
Compat::UI.info 'Guard::Jekyll done.'
|
32
31
|
rescue Exception => e
|
33
|
-
UI.error "Guard::Jekyll failed: #{e}"
|
32
|
+
Compat::UI.error "Guard::Jekyll failed: #{e}"
|
34
33
|
throw :task_has_failed
|
35
34
|
end
|
36
35
|
end
|
data/lib/guard/jekyll/version.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'guard/compat/test/helper'
|
2
|
+
require 'guard/jekyll'
|
3
|
+
|
4
|
+
RSpec.describe Guard::Jekyll do
|
5
|
+
let(:site) { instance_double("::Jekyll::Site") }
|
6
|
+
|
7
|
+
before do
|
8
|
+
allow(Guard::Compat::UI).to receive(:info)
|
9
|
+
allow(Guard::Compat::UI).to receive(:error)
|
10
|
+
|
11
|
+
allow(::Jekyll::Site).to receive(:new).and_return(site)
|
12
|
+
allow(::Jekyll).to receive(:configuration).and_return({})
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#start' do
|
16
|
+
it 'processes the site' do
|
17
|
+
expect(site).to receive(:process)
|
18
|
+
subject.start
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#run_on_modifications' do
|
23
|
+
it 'processes the site' do
|
24
|
+
expect(site).to receive(:process)
|
25
|
+
subject.run_on_modifications(%w(foo))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#run_all' do
|
30
|
+
it 'processes the site' do
|
31
|
+
expect(site).to receive(:process)
|
32
|
+
subject.run_all
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.expect_with :rspec do |expectations|
|
3
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
4
|
+
end
|
5
|
+
|
6
|
+
config.mock_with :rspec do |mocks|
|
7
|
+
mocks.verify_partial_doubles = true
|
8
|
+
end
|
9
|
+
|
10
|
+
config.filter_run :focus
|
11
|
+
config.run_all_when_everything_filtered = true
|
12
|
+
|
13
|
+
config.disable_monkey_patching!
|
14
|
+
|
15
|
+
# config.warnings = true
|
16
|
+
|
17
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
18
|
+
|
19
|
+
# config.profile_examples = 10
|
20
|
+
|
21
|
+
config.order = :random
|
22
|
+
|
23
|
+
Kernel.srand config.seed
|
24
|
+
end
|
metadata
CHANGED
@@ -1,48 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Haslem
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-12-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: guard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
|
-
- -
|
17
|
+
- - "~>"
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
21
|
-
|
19
|
+
version: '2.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
|
26
|
+
version: '2.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard-compat
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
28
34
|
type: :runtime
|
29
35
|
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: jekyll
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
44
|
requirements:
|
34
|
-
- -
|
45
|
+
- - ">="
|
35
46
|
- !ruby/object:Gem::Version
|
36
47
|
version: '0'
|
37
|
-
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
38
50
|
version_requirements: !ruby/object:Gem::Requirement
|
39
51
|
requirements:
|
40
|
-
- -
|
52
|
+
- - ">="
|
41
53
|
- !ruby/object:Gem::Version
|
42
54
|
version: '0'
|
43
|
-
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nenv
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
44
62
|
type: :runtime
|
45
63
|
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
46
83
|
description: Guard::Jekyll automatically rebuilds websites with the Jekyll static
|
47
84
|
site generator.
|
48
85
|
email:
|
@@ -51,35 +88,40 @@ executables: []
|
|
51
88
|
extensions: []
|
52
89
|
extra_rdoc_files: []
|
53
90
|
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
93
|
+
- ".travis.yml"
|
54
94
|
- Gemfile
|
95
|
+
- LICENSE.txt
|
55
96
|
- README.markdown
|
56
97
|
- Rakefile
|
57
98
|
- guard-jekyll.gemspec
|
58
99
|
- lib/guard/jekyll.rb
|
59
100
|
- lib/guard/jekyll/templates/Guardfile
|
60
101
|
- lib/guard/jekyll/version.rb
|
102
|
+
- spec/lib/guard/jekyll_spec.rb
|
103
|
+
- spec/spec_helper.rb
|
61
104
|
homepage: http://davidhaslem.com
|
62
105
|
licenses: []
|
106
|
+
metadata: {}
|
63
107
|
post_install_message:
|
64
108
|
rdoc_options: []
|
65
109
|
require_paths:
|
66
110
|
- lib
|
67
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
112
|
requirements:
|
69
|
-
- -
|
113
|
+
- - ">="
|
70
114
|
- !ruby/object:Gem::Version
|
71
115
|
version: '0'
|
72
|
-
none: false
|
73
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
117
|
requirements:
|
75
|
-
- -
|
118
|
+
- - ">="
|
76
119
|
- !ruby/object:Gem::Version
|
77
120
|
version: '0'
|
78
|
-
none: false
|
79
121
|
requirements: []
|
80
|
-
rubyforge_project:
|
81
|
-
rubygems_version:
|
122
|
+
rubyforge_project:
|
123
|
+
rubygems_version: 2.4.3
|
82
124
|
signing_key:
|
83
|
-
specification_version:
|
125
|
+
specification_version: 4
|
84
126
|
summary: Guard gem for Jekyll.
|
85
127
|
test_files: []
|