guard-nanoc 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c22e34cd6176b6a69c72d384a85820fd7098f44e
4
- data.tar.gz: fb31749a5ec8eb5cb63c2814695b59fc993f20c3
3
+ metadata.gz: fff47ff5d9595eacde533cda03abaaa36ba4e139
4
+ data.tar.gz: 54585047267e1306f8a3283d8352481c554418ed
5
5
  SHA512:
6
- metadata.gz: 8e407b627a021beb105a0fc8b9e2544e5d16849a12fa99452d6fb6b531758b050d221073afac9e2683f900450c6598e9a8acf844fc7ffe26ab214e88135447de
7
- data.tar.gz: 0ba2544d2313791615bd773e004ac34ab1fc4ceedc7bf36f97a5153a23a63d938e186a6c691b644ab1a96ad70268140700e6d4cdadb406c60f674f749cae684e
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: 43fd2911c5d41310ca0bd44e5e185788617c851e
3
+ revision: 14f662e9f1a58c3d49195c16511146a6289a8a1f
4
4
  specs:
5
- nanoc (4.3.0)
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 (~> 4.0)
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.7)
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.4.0)
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.12.5
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 these lines to your application's Gemfile:
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', '~> 4.0'
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' ]
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Guard
4
- GUARD_NANOC_VERSION = '2.1.0'
4
+ GUARD_NANOC_VERSION = '2.1.1'
5
5
  end
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.setup_nanoc_notifications
16
+ self.setup_listeners
19
17
  self.recompile_in_subprocess
20
18
  end
21
19
 
22
20
  def run_all
23
- self.recompile
21
+ self.recompile_in_subprocess
24
22
  end
25
23
 
26
24
  def run_on_changes(paths)
27
- self.recompile
25
+ self.recompile_in_subprocess
28
26
  end
29
27
 
30
28
  def run_on_removals(paths)
31
- self.recompile
29
+ self.recompile_in_subprocess
32
30
  end
33
31
 
34
32
  protected
35
33
 
36
- def setup_nanoc_notifications
37
- @rep_times = {}
38
- ::Nanoc::Int::NotificationCenter.on(:compilation_started) do |rep|
39
- @rep_times[rep.raw_path] = Time.now
40
- end
41
- ::Nanoc::Int::NotificationCenter.on(:compilation_ended) do |rep|
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.0
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-08-21 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
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.6
99
+ rubygems_version: 2.6.8
94
100
  signing_key:
95
101
  specification_version: 4
96
102
  summary: guard gem for nanoc