guard-nanoc 2.1.0 → 2.1.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -6
- data/NEWS.md +5 -0
- data/README.md +5 -1
- data/guard-nanoc.gemspec +1 -1
- data/lib/guard/nanoc/version.rb +1 -1
- data/lib/guard/nanoc.rb +10 -32
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fff47ff5d9595eacde533cda03abaaa36ba4e139
|
4
|
+
data.tar.gz: 54585047267e1306f8a3283d8352481c554418ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e399310c51f91d72032167b7d7ef297dcea6d2057cdf54d92017edcd6167f753afd95d0d1098367327f39ba01e77b9e01c385bc92b04c1d47508faa132109e46
|
7
|
+
data.tar.gz: c65be4f560cf146e7da775f4897984a9b547feb4fd3fc108e8706a84081ad10cde584b86ab920a46c214cafba93d250a683d3a770c20e7059df409da4a752146
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/nanoc/nanoc.git
|
3
|
-
revision:
|
3
|
+
revision: 14f662e9f1a58c3d49195c16511146a6289a8a1f
|
4
4
|
specs:
|
5
|
-
nanoc (4.3.
|
5
|
+
nanoc (4.3.8)
|
6
6
|
cri (~> 2.3)
|
7
7
|
hamster (~> 3.0)
|
8
|
+
parallel (~> 1.9)
|
8
9
|
ref (~> 2.0)
|
9
10
|
|
10
11
|
PATH
|
@@ -13,7 +14,7 @@ PATH
|
|
13
14
|
guard-nanoc (2.1.0)
|
14
15
|
guard (~> 2.8)
|
15
16
|
guard-compat (~> 1.0)
|
16
|
-
nanoc (
|
17
|
+
nanoc (>= 4.3.8, < 5.0)
|
17
18
|
|
18
19
|
GEM
|
19
20
|
remote: https://rubygems.org/
|
@@ -48,12 +49,13 @@ GEM
|
|
48
49
|
notiffany (0.1.1)
|
49
50
|
nenv (~> 0.1)
|
50
51
|
shellany (~> 0.0)
|
52
|
+
parallel (1.9.0)
|
51
53
|
pry (0.10.4)
|
52
54
|
coderay (~> 1.1.0)
|
53
55
|
method_source (~> 0.8.1)
|
54
56
|
slop (~> 3.4)
|
55
57
|
rake (11.2.2)
|
56
|
-
rb-fsevent (0.9.
|
58
|
+
rb-fsevent (0.9.8)
|
57
59
|
rb-inotify (0.9.7)
|
58
60
|
ffi (>= 0.5.0)
|
59
61
|
ref (2.0.0)
|
@@ -70,7 +72,7 @@ GEM
|
|
70
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
73
|
rspec-support (~> 3.5.0)
|
72
74
|
rspec-support (3.5.0)
|
73
|
-
ruby_dep (1.
|
75
|
+
ruby_dep (1.5.0)
|
74
76
|
shellany (0.0.1)
|
75
77
|
slop (3.6.0)
|
76
78
|
thor (0.19.1)
|
@@ -85,4 +87,4 @@ DEPENDENCIES
|
|
85
87
|
rspec (~> 3.1)
|
86
88
|
|
87
89
|
BUNDLED WITH
|
88
|
-
1.
|
90
|
+
1.13.6
|
data/NEWS.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# guard-nanoc Release Notes
|
2
2
|
|
3
|
+
## 2.1.1 (2016-11-18)
|
4
|
+
|
5
|
+
* Fixed compatibility with Nanoc 4.3.8 (#32)
|
6
|
+
* Fixed issue which would cause “constants redefined” warnings to be printed (#26, #34)
|
7
|
+
|
3
8
|
## 2.1.0 (2016-08-21)
|
4
9
|
|
5
10
|
* Add `nanoc live` command, combining guard-nanoc with `nanoc view` [whitequark]
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ This is a guard for [nanoc](http://nanoc.ws/).
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add
|
9
|
+
Add the `guard-nanoc` gem inside the `nanoc` group to your application's Gemfile:
|
10
10
|
|
11
11
|
group :nanoc do
|
12
12
|
gem 'guard-nanoc'
|
@@ -16,6 +16,10 @@ Unless your Gemfile already specifies a web server, you'll need one as well:
|
|
16
16
|
|
17
17
|
gem 'adsf'
|
18
18
|
|
19
|
+
Lastly, ensure that Nanoc is at least version 4.3:
|
20
|
+
|
21
|
+
gem 'nanoc', '~> 4.3'
|
22
|
+
|
19
23
|
And then execute:
|
20
24
|
|
21
25
|
$ bundle
|
data/guard-nanoc.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency 'guard', '~> 2.8'
|
17
17
|
s.add_dependency 'guard-compat', '~> 1.0'
|
18
|
-
s.add_dependency 'nanoc', '
|
18
|
+
s.add_dependency 'nanoc', '>= 4.3.8', '< 5.0'
|
19
19
|
|
20
20
|
s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + [ 'guard-nanoc.gemspec' ]
|
21
21
|
s.require_paths = [ 'lib' ]
|
data/lib/guard/nanoc/version.rb
CHANGED
data/lib/guard/nanoc.rb
CHANGED
@@ -6,47 +6,37 @@ require 'nanoc'
|
|
6
6
|
require 'nanoc/cli'
|
7
7
|
|
8
8
|
module Guard
|
9
|
-
|
10
9
|
class Nanoc < Plugin
|
11
|
-
|
12
10
|
def initialize(options={})
|
13
11
|
@dir = options[:dir] || '.'
|
14
12
|
super
|
15
13
|
end
|
16
14
|
|
17
15
|
def start
|
18
|
-
self.
|
16
|
+
self.setup_listeners
|
19
17
|
self.recompile_in_subprocess
|
20
18
|
end
|
21
19
|
|
22
20
|
def run_all
|
23
|
-
self.
|
21
|
+
self.recompile_in_subprocess
|
24
22
|
end
|
25
23
|
|
26
24
|
def run_on_changes(paths)
|
27
|
-
self.
|
25
|
+
self.recompile_in_subprocess
|
28
26
|
end
|
29
27
|
|
30
28
|
def run_on_removals(paths)
|
31
|
-
self.
|
29
|
+
self.recompile_in_subprocess
|
32
30
|
end
|
33
31
|
|
34
32
|
protected
|
35
33
|
|
36
|
-
def
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
@rep_times[rep.raw_path] = Time.now - @rep_times[rep.raw_path]
|
43
|
-
end
|
44
|
-
::Nanoc::Int::NotificationCenter.on(:rep_written) do |rep, path, is_created, is_modified|
|
45
|
-
action = (is_created ? :create : (is_modified ? :update : :identical))
|
46
|
-
level = (is_created ? :high : (is_modified ? :high : :low))
|
47
|
-
duration = Time.now - @rep_times[rep.raw_path] if @rep_times[rep.raw_path]
|
48
|
-
::Nanoc::CLI::Logger.instance.file(level, action, path, duration)
|
49
|
-
end
|
34
|
+
def setup_listeners
|
35
|
+
::Nanoc::CLI.setup
|
36
|
+
|
37
|
+
::Nanoc::CLI::Commands::Compile::FileActionPrinter
|
38
|
+
.new(reps: [])
|
39
|
+
.start
|
50
40
|
end
|
51
41
|
|
52
42
|
def recompile_in_subprocess
|
@@ -62,7 +52,6 @@ module Guard
|
|
62
52
|
Dir.chdir(@dir) do
|
63
53
|
site = ::Nanoc::Int::SiteLoader.new.new_from_cwd
|
64
54
|
site.compile
|
65
|
-
self.prune(site)
|
66
55
|
end
|
67
56
|
self.notify_success
|
68
57
|
rescue => e
|
@@ -70,15 +59,6 @@ module Guard
|
|
70
59
|
::Nanoc::CLI::ErrorHandler.print_error(e)
|
71
60
|
end
|
72
61
|
|
73
|
-
def prune(site)
|
74
|
-
prune_config = site.config.fetch(:prune, {})
|
75
|
-
auto_prune_enabled = prune_config.fetch(:auto_prune, false)
|
76
|
-
if auto_prune_enabled
|
77
|
-
exclude = prune_config.fetch(:exclude, [])
|
78
|
-
::Nanoc::Extra::Pruner.new(site, :exclude => exclude).run
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
62
|
def notify_success
|
83
63
|
Compat::UI.notify('Compilation succeeded', :title => 'nanoc', :image => :success)
|
84
64
|
Compat::UI.info 'Compilation succeeded.'
|
@@ -88,7 +68,5 @@ module Guard
|
|
88
68
|
Compat::UI.notify('Compilation FAILED', :title => 'nanoc', :image => :failed)
|
89
69
|
Compat::UI.error 'Compilation failed!'
|
90
70
|
end
|
91
|
-
|
92
71
|
end
|
93
|
-
|
94
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: nanoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.3.8
|
48
|
+
- - "<"
|
46
49
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
50
|
+
version: '5.0'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 4.3.8
|
58
|
+
- - "<"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '5.0'
|
55
61
|
description: Automatically rebuilds nanoc sites
|
56
62
|
email: denis.defreyne@stoneship.org
|
57
63
|
executables: []
|
@@ -90,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
96
|
version: '0'
|
91
97
|
requirements: []
|
92
98
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6.
|
99
|
+
rubygems_version: 2.6.8
|
94
100
|
signing_key:
|
95
101
|
specification_version: 4
|
96
102
|
summary: guard gem for nanoc
|