guard-nanoc 2.1.3 → 2.1.4

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: 1700f4953605169e5117c3e5778ba964ed98335d03607f2a47c397819e8df27c
4
- data.tar.gz: 9d39a305c667bca2b9d94c6239222a0fcd12642ec33e5111ec546256327d3e79
3
+ metadata.gz: 3c321c9e9cc34ed667d509ac02ecdce2b9fdc28312a8cf67cad862f94cec8bc2
4
+ data.tar.gz: 4798536e319a6f9d0f13366a08f6866011e49f6af5782adda8171c2fe9163fc8
5
5
  SHA512:
6
- metadata.gz: e57cd0f405bf39c11199674c43c951280349f63a56b83790b7757a29069a9a822b962b382a367d8742659c0d66da65fcbf3e4c348c49d48b1501fd3e4215f7ea
7
- data.tar.gz: 23827d41bcbba41b41101b9877990f34cafed69a5732d5af5738ded6411f76f7ada1a724fa7b98563bd9ff333b3bf6d674aee8e880b1d1f02299c527fa2272c1
6
+ metadata.gz: 68396146a2cf597e93b548063d8240381b2be3709e3609bd8b34a88593d8dd5e09175b26b2f3660d25b9b7dc17e9145871a1606009b6aee38628256063fd9a29
7
+ data.tar.gz: df08ab3f62c348f5935453d1569413dd63348f5d111e5265d00d4bdf8c098a0c4b652f256beaa28478f7683249cf861218dab32f87d2c9f1d43c571527dd8e26
data/NEWS.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # guard-nanoc Release Notes
2
2
 
3
+ ## 2.1.4 (2018-09-15)
4
+
5
+ * Fixed issue which caused `--host` and `--port` options to be mandatory.
6
+
3
7
  ## 2.1.3 (2018-07-28)
4
8
 
5
9
  * Added missing --live-reload option, passed through to `nanoc view` (#38, #39)
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Guard::Nanoc
2
2
 
3
+ :warning: Experimental; please use [the guard-nanoc repository](https://github.com/guard/guard-nanoc) for the time being.
4
+
3
5
  This is a guard for [nanoc](http://nanoc.ws/).
4
6
 
5
7
  `Guard` is a framework for listening to filesystem changes and acting upon them. `Guard::Nanoc` is a plugin for Guard that recompiles Nanoc sites on changes.
data/Rakefile CHANGED
@@ -1,8 +1,18 @@
1
- require 'bundler/gem_tasks'
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'rspec/core/rake_task'
4
+ require 'rubocop/rake_task'
5
+
6
+ RuboCop::RakeTask.new(:rubocop)
7
+
4
8
  RSpec::Core::RakeTask.new(:spec) do |t|
5
- t.verbose = false unless ENV['CI'] == 'true'
9
+ t.verbose = false
10
+ end
11
+
12
+ task test: :spec
13
+
14
+ task :gem do
15
+ sh('gem build *.gemspec')
6
16
  end
7
17
 
8
- task default: :spec
18
+ task default: %i[test rubocop]
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require_relative './lib/guard/nanoc/version'
4
4
 
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency 'guard-compat', '~> 1.0'
18
18
  s.add_dependency 'nanoc', '>= 4.3.8', '< 5.0'
19
19
 
20
- s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + [ 'guard-nanoc.gemspec' ]
21
- s.require_paths = [ 'lib' ]
20
+ s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['guard-nanoc.gemspec']
21
+ s.require_paths = ['lib']
22
22
  end
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'guard/nanoc'
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'guard/compat/plugin'
4
4
 
@@ -14,29 +14,29 @@ module Guard
14
14
  end
15
15
  end
16
16
 
17
- def initialize(options={})
17
+ def initialize(options = {})
18
18
  @dir = options[:dir] || '.'
19
19
  super
20
20
  end
21
21
 
22
22
  def start
23
- self.setup_listeners
24
- self.recompile_in_subprocess
23
+ setup_listeners
24
+ recompile_in_subprocess
25
25
  end
26
26
 
27
27
  def run_all
28
- self.recompile_in_subprocess
28
+ recompile_in_subprocess
29
29
  end
30
30
 
31
- def run_on_changes(paths)
32
- self.recompile_in_subprocess
31
+ def run_on_changes(_paths)
32
+ recompile_in_subprocess
33
33
  end
34
34
 
35
- def run_on_removals(paths)
36
- self.recompile_in_subprocess
35
+ def run_on_removals(_paths)
36
+ recompile_in_subprocess
37
37
  end
38
38
 
39
- protected
39
+ protected
40
40
 
41
41
  def setup_listeners
42
42
  ::Nanoc::CLI.setup
@@ -48,10 +48,10 @@ module Guard
48
48
 
49
49
  def recompile_in_subprocess
50
50
  if Process.respond_to?(:fork)
51
- pid = Process.fork { self.recompile }
51
+ pid = Process.fork { recompile }
52
52
  Process.waitpid(pid)
53
53
  else
54
- self.recompile
54
+ recompile
55
55
  end
56
56
  end
57
57
 
@@ -60,19 +60,19 @@ module Guard
60
60
  site = ::Nanoc::Int::SiteLoader.new.new_from_cwd
61
61
  site.compile
62
62
  end
63
- self.notify_success
63
+ notify_success
64
64
  rescue => e
65
- self.notify_failure
65
+ notify_failure
66
66
  ::Nanoc::CLI::ErrorHandler.print_error(e)
67
67
  end
68
68
 
69
69
  def notify_success
70
- Compat::UI.notify('Compilation succeeded', :title => 'nanoc', :image => :success)
70
+ Compat::UI.notify('Compilation succeeded', title: 'nanoc', image: :success)
71
71
  Compat::UI.info 'Compilation succeeded.'
72
72
  end
73
73
 
74
74
  def notify_failure
75
- Compat::UI.notify('Compilation FAILED', :title => 'nanoc', :image => :failed)
75
+ Compat::UI.notify('Compilation FAILED', title: 'nanoc', image: :failed)
76
76
  Compat::UI.error 'Compilation failed!'
77
77
  end
78
78
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  guard 'nanoc' do
2
4
  watch('nanoc.yaml') # Change this to config.yaml if you use the old config file name
3
5
  watch('Rules')
@@ -1,5 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Guard
4
- GUARD_NANOC_VERSION = '2.1.3'
4
+ GUARD_NANOC_VERSION = '2.1.4'
5
5
  end
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  usage 'live [options]'
2
4
  summary 'start the web server, and recompile the site when changed'
3
- description <<-EOS
4
- Start the static web server (like `nanoc view` would), and watch for changes
5
- in the background (like `guard start` would). See the documentation of those
6
- two commands for details. The options are forwarded to `nanoc view` only.
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.
7
9
  EOS
8
10
 
9
11
  required :H, :handler, 'specify the handler to use (webrick/mongrel/...)'
10
- required :o, :host, 'specify the host to listen on (default: 0.0.0.0)'
11
- required :p, :port, 'specify the port to listen on (default: 3000)'
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
12
14
  flag :L, :'live-reload', 'reload on changes'
13
15
 
14
16
  module Nanoc::CLI::Commands
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.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-28 00:00:00.000000000 Z
11
+ date: 2018-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -64,8 +64,6 @@ executables: []
64
64
  extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
- - Gemfile
68
- - Gemfile.lock
69
67
  - LICENSE
70
68
  - NEWS.md
71
69
  - README.md
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'nanoc', github: 'nanoc/nanoc'
6
-
7
- group :test do
8
- gem 'rake'
9
- gem 'rspec', '~> 3.1'
10
- end
@@ -1,104 +0,0 @@
1
- GIT
2
- remote: git://github.com/nanoc/nanoc.git
3
- revision: b122d9d7e21bb48af1ea91354717c01d6c45445a
4
- specs:
5
- nanoc (4.9.3)
6
- addressable (~> 2.5)
7
- cri (~> 2.8)
8
- ddmemoize (~> 1.0)
9
- ddmetrics (~> 1.0)
10
- ddplugin (~> 1.0)
11
- hamster (~> 3.0)
12
- parallel (~> 1.12)
13
- ref (~> 2.0)
14
- slow_enumerator_tools (~> 1.0)
15
- tomlrb (~> 1.2)
16
-
17
- PATH
18
- remote: .
19
- specs:
20
- guard-nanoc (2.1.2)
21
- guard (~> 2.8)
22
- guard-compat (~> 1.0)
23
- nanoc (>= 4.3.8, < 5.0)
24
-
25
- GEM
26
- remote: https://rubygems.org/
27
- specs:
28
- addressable (2.5.2)
29
- public_suffix (>= 2.0.2, < 4.0)
30
- coderay (1.1.2)
31
- colored (1.2)
32
- concurrent-ruby (1.0.5)
33
- cri (2.10.1)
34
- colored (~> 1.2)
35
- ddmemoize (1.0.0)
36
- ddmetrics (~> 1.0)
37
- ref (~> 2.0)
38
- ddmetrics (1.0.1)
39
- ddplugin (1.0.2)
40
- diff-lcs (1.3)
41
- ffi (1.9.25)
42
- formatador (0.2.5)
43
- guard (2.14.2)
44
- formatador (>= 0.2.4)
45
- listen (>= 2.7, < 4.0)
46
- lumberjack (>= 1.0.12, < 2.0)
47
- nenv (~> 0.1)
48
- notiffany (~> 0.0)
49
- pry (>= 0.9.12)
50
- shellany (~> 0.0)
51
- thor (>= 0.18.1)
52
- guard-compat (1.2.1)
53
- hamster (3.0.0)
54
- concurrent-ruby (~> 1.0)
55
- listen (3.1.5)
56
- rb-fsevent (~> 0.9, >= 0.9.4)
57
- rb-inotify (~> 0.9, >= 0.9.7)
58
- ruby_dep (~> 1.2)
59
- lumberjack (1.0.13)
60
- method_source (0.9.0)
61
- nenv (0.3.0)
62
- notiffany (0.1.1)
63
- nenv (~> 0.1)
64
- shellany (~> 0.0)
65
- parallel (1.12.1)
66
- pry (0.11.3)
67
- coderay (~> 1.1.0)
68
- method_source (~> 0.9.0)
69
- public_suffix (3.0.2)
70
- rake (12.3.1)
71
- rb-fsevent (0.10.3)
72
- rb-inotify (0.9.10)
73
- ffi (>= 0.5.0, < 2)
74
- ref (2.0.0)
75
- rspec (3.7.0)
76
- rspec-core (~> 3.7.0)
77
- rspec-expectations (~> 3.7.0)
78
- rspec-mocks (~> 3.7.0)
79
- rspec-core (3.7.1)
80
- rspec-support (~> 3.7.0)
81
- rspec-expectations (3.7.0)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.7.0)
84
- rspec-mocks (3.7.0)
85
- diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.7.0)
87
- rspec-support (3.7.1)
88
- ruby_dep (1.5.0)
89
- shellany (0.0.1)
90
- slow_enumerator_tools (1.1.0)
91
- thor (0.20.0)
92
- tomlrb (1.2.7)
93
-
94
- PLATFORMS
95
- ruby
96
-
97
- DEPENDENCIES
98
- guard-nanoc!
99
- nanoc!
100
- rake
101
- rspec (~> 3.1)
102
-
103
- BUNDLED WITH
104
- 1.16.3