guard-nanoc 2.1.7 → 2.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63b4e13d1627f430ef6774ee933a056e4593f8ceedf4746193496f0ff9c3aeae
4
- data.tar.gz: e79fb40f05dff6b3707fb8b7797c8da7223c79d5e9252e86fdca0acfadbf66e1
3
+ metadata.gz: a6679df87e78b79d78396ad0c002b41b882625a4a83415d37b114783e2ea98c4
4
+ data.tar.gz: 96120c4ef6548b7f3b0efa7a3899a6c9dcaa2fa165cb3450cdcfc678bcb89522
5
5
  SHA512:
6
- metadata.gz: d3073b4c344cd7710af4416a559876d14e8afb133e22a9889aac7f3fb19d1c4945e864e5932e6e0ef8c2c3e8fd9040b082df934c1bc93e6274f2499014bec76a
7
- data.tar.gz: a3ea5d577fbbf0c1989fbca574811d21584cb49bc259595ea11191da876d048e95d5e723bd063cfa8f9846858a415741589184abe4b0193f36e5abaa6e9b01eb
6
+ metadata.gz: ad13e7ec7bc29796e34c330472a09f1ac35d7bd90076c8b48de8796866e0fdc2c26affe39847ac1dfca35fea771e07ade9e36e2785b636cd400e61e001b9f92c
7
+ data.tar.gz: 13674f766409963d3a59348fbb98aa16361caa7e95d341959503d3932eed33e47db00088434abf11c9081f9ae56c7691ac5900ff3a04917792f2f269e6528e57
data/NEWS.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # guard-nanoc Release Notes
2
2
 
3
+ ## 2.1.8 (2020-03-07)
4
+
5
+ * Fixed an incompatibility with Nanoc 4.11.14.
6
+
3
7
  ## 2.1.7 (2019-11-16)
4
8
 
5
9
  * Fixed an incompatibility with Nanoc 4.11.13.
data/guard-nanoc.gemspec CHANGED
@@ -15,7 +15,8 @@ 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.11.13', '< 5.0'
18
+ s.add_dependency 'nanoc-cli', '~> 4.11', '>= 4.11.14'
19
+ s.add_dependency 'nanoc-core', '~> 4.11', '>= 4.11.14'
19
20
 
20
21
  s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['guard-nanoc.gemspec']
21
22
  s.require_paths = ['lib']
data/lib/guard/nanoc.rb CHANGED
@@ -9,7 +9,7 @@ module Guard
9
9
  class Nanoc < Plugin
10
10
  def self.live_cmd
11
11
  @_live_cmd ||= begin
12
- path = File.join(File.dirname(__FILE__), '..', 'nanoc', 'orig_cli', 'commands', 'live.rb')
12
+ path = File.join(File.dirname(__FILE__), 'nanoc', 'live_command.rb')
13
13
  Cri::Command.load_file(path, infer_name: true)
14
14
  end
15
15
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ usage 'live [options]'
4
+ summary 'start the web server, and recompile the site when changed'
5
+ description <<~EOS
6
+ Start the static web server (like `nanoc view` would), and watch for changes
7
+ in the background (like `guard start` would). See the documentation of those
8
+ two commands for details. The options are forwarded to `nanoc view` only.
9
+ EOS
10
+
11
+ required :H, :handler, 'specify the handler to use (webrick/mongrel/...)'
12
+ required :o, :host, 'specify the host to listen on (default: 0.0.0.0)', default: '127.0.0.1'
13
+ required :p, :port, 'specify the port to listen on (default: 3000)', transform: Nanoc::CLI::Transform::Port, default: 3000
14
+ flag :L, :'live-reload', 'reload on changes'
15
+
16
+ module Guard
17
+ class Nanoc
18
+ class LiveCommand < ::Nanoc::CLI::CommandRunner
19
+ def run
20
+ require 'guard'
21
+ require 'guard/commander'
22
+
23
+ if defined?(Nanoc::Live)
24
+ $stderr.puts '-' * 40
25
+ $stderr.puts 'NOTE:'
26
+ $stderr.puts 'You are using the `nanoc live` command provided by `guard-nanoc`, but the `nanoc-live` gem is also installed, which also provides a `nanoc live` command.'
27
+ if defined?(Bundler)
28
+ $stderr.puts 'Recommendation: Remove `guard-nanoc` from your Gemfile.'
29
+ else
30
+ $stderr.puts 'Recommendation: Uninstall `guard-nanoc`.'
31
+ end
32
+ $stderr.puts '-' * 40
33
+ end
34
+
35
+ Thread.new do
36
+ # Crash the entire process if the viewer dies for some reason (e.g.
37
+ # the port is already bound).
38
+ Thread.current.abort_on_exception = true
39
+ Nanoc::CLI::Commands::View.new(options, arguments, command).run
40
+ end
41
+
42
+ Guard.start(no_interactions: true)
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ runner Guard::Nanoc::LiveCommand
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Guard
4
- GUARD_NANOC_VERSION = '2.1.7'
4
+ GUARD_NANOC_VERSION = '2.1.8'
5
5
  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.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-16 00:00:00.000000000 Z
11
+ date: 2020-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -39,25 +39,45 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: nanoc
42
+ name: nanoc-cli
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 4.11.13
48
- - - "<"
47
+ version: '4.11'
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: '5.0'
50
+ version: 4.11.14
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '4.11'
55
58
  - - ">="
56
59
  - !ruby/object:Gem::Version
57
- version: 4.11.13
58
- - - "<"
60
+ version: 4.11.14
61
+ - !ruby/object:Gem::Dependency
62
+ name: nanoc-core
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '4.11'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 4.11.14
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '4.11'
78
+ - - ">="
59
79
  - !ruby/object:Gem::Version
60
- version: '5.0'
80
+ version: 4.11.14
61
81
  description: Automatically rebuilds Nanoc sites
62
82
  email: denis.defreyne@stoneship.org
63
83
  executables: []
@@ -71,9 +91,9 @@ files:
71
91
  - guard-nanoc.gemspec
72
92
  - lib/guard-nanoc.rb
73
93
  - lib/guard/nanoc.rb
94
+ - lib/guard/nanoc/live_command.rb
74
95
  - lib/guard/nanoc/templates/Guardfile
75
96
  - lib/guard/nanoc/version.rb
76
- - lib/nanoc/orig_cli/commands/live.rb
77
97
  homepage: https://nanoc.ws/
78
98
  licenses:
79
99
  - MIT
@@ -93,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
113
  - !ruby/object:Gem::Version
94
114
  version: '0'
95
115
  requirements: []
96
- rubygems_version: 3.0.6
116
+ rubygems_version: 3.1.2
97
117
  signing_key:
98
118
  specification_version: 4
99
119
  summary: guard gem for Nanoc
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- usage 'live [options]'
4
- summary 'start the web server, and recompile the site when changed'
5
- description <<~EOS
6
- Start the static web server (like `nanoc view` would), and watch for changes
7
- in the background (like `guard start` would). See the documentation of those
8
- two commands for details. The options are forwarded to `nanoc view` only.
9
- EOS
10
-
11
- required :H, :handler, 'specify the handler to use (webrick/mongrel/...)'
12
- required :o, :host, 'specify the host to listen on (default: 0.0.0.0)', default: '127.0.0.1'
13
- required :p, :port, 'specify the port to listen on (default: 3000)', transform: Nanoc::CLI::Transform::Port, default: 3000
14
- flag :L, :'live-reload', 'reload on changes'
15
-
16
- module Nanoc::CLI::Commands
17
- class Live < ::Nanoc::CLI::CommandRunner
18
- def run
19
- require 'guard'
20
- require 'guard/commander'
21
-
22
- Thread.new do
23
- # Crash the entire process if the viewer dies for some reason (e.g.
24
- # the port is already bound).
25
- Thread.current.abort_on_exception = true
26
- Nanoc::CLI::Commands::View.new(options, arguments, command).run
27
- end
28
-
29
- Guard.start(no_interactions: true)
30
- end
31
- end
32
- end
33
-
34
- runner Nanoc::CLI::Commands::Live