jekyll-watch 1.5.0 → 1.5.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
- SHA1:
3
- metadata.gz: d40afe7b1b23853d3d981f04b6f15f553e9f397f
4
- data.tar.gz: 0f109a29291aff9c8cca476feeeb0fab8249c0ce
2
+ SHA256:
3
+ metadata.gz: c8769b07f61da530d62944f469f8e3f8439e3e8c075ad70e3916d4af04974ddc
4
+ data.tar.gz: 6ca091b888b1aa7198d3464eec8af308b2c8ebb1fcf3b8dfbcdb446f883aab6a
5
5
  SHA512:
6
- metadata.gz: de8cab3cc818b39a9e0851ee81a0f0d83e4e4b0aab1f735a15f855ca46ea18ff602140a4373db029f89f5521998f213797469aa5d821a62d52be5cb72c9f0a07
7
- data.tar.gz: b7d193415b9e643a2935cda00f87d3d2de2af99973d2cff20161c3fb44879ca5c24c2c02672804929bae19387589f5e27ba89fb84afcd25f2a870e0e531ce067
6
+ metadata.gz: 0fa54e4e9b1ef2c9f9f57c047aa4124de778a26c315e816adc0757c9bb9c10bbe46d8c25babaf0bed8c89ac6a3b8b61479a694c978cb0cbaa496903b04dbaea1
7
+ data.tar.gz: e65f4b7ddf6d557b0d7d4f5ad8ef2c984ddb96da193c77492ab1bc563923f611d86633fcfaa9d3322727d5570ed9b37aa0240a6dd29108e0f2d5b280aa9c5139
@@ -1,2 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "jekyll-watch/version"
1
4
  require_relative "jekyll/watcher"
2
5
  require_relative "jekyll/commands/watch"
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Watch
5
+ VERSION = "1.5.1".freeze
6
+ end
7
+ end
@@ -1,16 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module Commands
3
5
  module Watch
4
6
  extend self
5
7
 
6
- def init_with_program(prog)
7
- end
8
+ def init_with_program(prog); end
8
9
 
9
10
  # Build your jekyll site
10
11
  # Continuously watch if `watch` is set to true in the config.
11
12
  def process(options)
12
- Jekyll.logger.log_level = :error if options['quiet']
13
- watch(site, options) if options['watch']
13
+ Jekyll.logger.log_level = :error if options["quiet"]
14
+ watch(site, options) if options["watch"]
14
15
  end
15
16
 
16
17
  # Watch for file changes and rebuild the site.
@@ -1,4 +1,6 @@
1
- require 'listen'
1
+ # frozen_string_literal: true
2
+
3
+ require "listen"
2
4
 
3
5
  module Jekyll
4
6
  module Watcher
@@ -17,7 +19,7 @@ module Jekyll
17
19
  #
18
20
  # Returns nothing.
19
21
  def watch(options, site = nil)
20
- ENV["LISTEN_GEM_DEBUGGING"] ||= "1" if options['verbose']
22
+ ENV["LISTEN_GEM_DEBUGGING"] ||= "1" if options["verbose"]
21
23
 
22
24
  site ||= Jekyll::Site.new(options)
23
25
  listener = build_listener(site, options)
@@ -25,7 +27,7 @@ module Jekyll
25
27
 
26
28
  Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'"
27
29
 
28
- unless options['serving']
30
+ unless options["serving"]
29
31
  trap("INT") do
30
32
  listener.stop
31
33
  puts " Halting auto-regeneration."
@@ -41,10 +43,10 @@ module Jekyll
41
43
  # TODO: shouldn't be public API
42
44
  def build_listener(site, options)
43
45
  Listen.to(
44
- options['source'],
45
- :ignore => listen_ignore_paths(options),
46
- :force_polling => options['force_polling'],
47
- &(listen_handler(site))
46
+ options["source"],
47
+ :ignore => listen_ignore_paths(options),
48
+ :force_polling => options["force_polling"],
49
+ &listen_handler(site)
48
50
  )
49
51
  end
50
52
 
@@ -67,20 +69,20 @@ module Jekyll
67
69
  end
68
70
 
69
71
  def custom_excludes(options)
70
- Array(options['exclude']).map { |e| Jekyll.sanitized_path(options['source'], e) }
72
+ Array(options["exclude"]).map { |e| Jekyll.sanitized_path(options["source"], e) }
71
73
  end
72
74
 
73
75
  def config_files(options)
74
76
  %w(yml yaml toml).map do |ext|
75
- Jekyll.sanitized_path(options['source'], "_config.#{ext}")
77
+ Jekyll.sanitized_path(options["source"], "_config.#{ext}")
76
78
  end
77
79
  end
78
80
 
79
81
  def to_exclude(options)
80
82
  [
81
83
  config_files(options),
82
- options['destination'],
83
- custom_excludes(options)
84
+ options["destination"],
85
+ custom_excludes(options),
84
86
  ].flatten
85
87
  end
86
88
 
@@ -90,7 +92,7 @@ module Jekyll
90
92
  #
91
93
  # Returns a list of relative paths from source that should be ignored
92
94
  def listen_ignore_paths(options)
93
- source = Pathname.new(options['source']).expand_path
95
+ source = Pathname.new(options["source"]).expand_path
94
96
  paths = to_exclude(options)
95
97
 
96
98
  paths.map do |p|
@@ -98,7 +100,7 @@ module Jekyll
98
100
  next unless absolute_path.exist?
99
101
  begin
100
102
  relative_path = absolute_path.relative_path_from(source).to_s
101
- unless relative_path.start_with?('../')
103
+ unless relative_path.start_with?("../")
102
104
  path_to_ignore = Regexp.new(Regexp.escape(relative_path))
103
105
  Jekyll.logger.debug "Watcher:", "Ignoring #{path_to_ignore}"
104
106
  path_to_ignore
@@ -106,7 +108,7 @@ module Jekyll
106
108
  rescue ArgumentError
107
109
  # Could not find a relative path
108
110
  end
109
- end.compact + [/\.jekyll\-metadata/]
111
+ end.compact + [%r!\.jekyll\-metadata!]
110
112
  end
111
113
 
112
114
  def sleep_forever
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parker Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2017-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '3.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,37 +24,34 @@ dependencies:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.0'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '3.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: bundler
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '1.6'
33
+ version: '1.15'
40
34
  type: :development
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '1.6'
40
+ version: '1.15'
47
41
  - !ruby/object:Gem::Dependency
48
- name: rubocop
42
+ name: jekyll
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: 0.35.1
47
+ version: '3.6'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: 0.35.1
54
+ version: '3.6'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: rake
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -87,19 +81,19 @@ dependencies:
87
81
  - !ruby/object:Gem::Version
88
82
  version: '3.0'
89
83
  - !ruby/object:Gem::Dependency
90
- name: jekyll
84
+ name: rubocop
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
- - - ">="
87
+ - - "~>"
94
88
  - !ruby/object:Gem::Version
95
- version: '2.0'
89
+ version: '0.51'
96
90
  type: :development
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
- - - ">="
94
+ - - "~>"
101
95
  - !ruby/object:Gem::Version
102
- version: '2.0'
96
+ version: '0.51'
103
97
  description:
104
98
  email:
105
99
  - parkrmoore@gmail.com
@@ -108,6 +102,7 @@ extensions: []
108
102
  extra_rdoc_files: []
109
103
  files:
110
104
  - lib/jekyll-watch.rb
105
+ - lib/jekyll-watch/version.rb
111
106
  - lib/jekyll/commands/watch.rb
112
107
  - lib/jekyll/watcher.rb
113
108
  homepage: https://github.com/jekyll/jekyll-watch
@@ -122,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
117
  requirements:
123
118
  - - ">="
124
119
  - !ruby/object:Gem::Version
125
- version: '0'
120
+ version: 2.1.0
126
121
  required_rubygems_version: !ruby/object:Gem::Requirement
127
122
  requirements:
128
123
  - - ">="
@@ -130,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
125
  version: '0'
131
126
  requirements: []
132
127
  rubyforge_project:
133
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.7.1
134
129
  signing_key:
135
130
  specification_version: 4
136
131
  summary: Rebuild your Jekyll site when a file changes with the `--watch` switch.