guard-yard 2.2.0 → 2.2.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: 8b5b502b0b0cff99bc620a14389e0000a20d8ea5
4
- data.tar.gz: b47ee07f81d04af0711cb4e639df0f402979dccf
3
+ metadata.gz: 84300751642a74daf00e5ef8054ef8ab5013e87c
4
+ data.tar.gz: a7c85efe3856be77b47fb379127be4f054fd5a85
5
5
  SHA512:
6
- metadata.gz: ba4ecd6680472a3720227a7e2f61a64bfc31371b2a78485085e8179c3240d36e931ceed622f66e9c3481cffd2cfed163d3d35ddd3379378e3f8af13d467facd5
7
- data.tar.gz: 66504d272dd6678586d60692c6470d59df3baaeb4169f8cad84d7c9a007dd84e411233edeeca343c2291b1b3c55b44677cdcd8df1d6461ab34cf69ee595ce950
6
+ metadata.gz: 96cc861724a527bce19b9eb855ea7d021c861f068cd0b1f838d6aea1d8e81d765e56eb5d2e4e48ed3937951534a728ac20365cf64cda5b829d2aa5637640fb16
7
+ data.tar.gz: 719409c4285074b754c2bf636e9d171c09e6cadb96f915352ac3fc97aca1e6aff2347a7c2b69f79f8158617554c228621cefbfbe57cc3e67be87f925aa2d2793
@@ -56,4 +56,4 @@ When booting guard, Guard::Yard will do this for you automatically if no .yardoc
56
56
 
57
57
  If you are running into issues, try re-creating your documentation using `rm -rf .yardoc && yard doc`. Once this operation is complete, restart guard. If you are still having problems, open a new issue in the GitHub issue tracker for this project.
58
58
 
59
- ## Build Status [![Build Status](https://secure.travis-ci.org/panthomakos/guard-yard.png?branch=master)](http://travis-ci.org/panthomakos/guard-yard)
59
+ ## Build Status [![Build Status](https://secure.travis-ci.org/panthomakos/guard-yard.svg?branch=master)](http://travis-ci.org/panthomakos/guard-yard)
@@ -61,7 +61,7 @@ module Guard
61
61
  options = yardoc.options
62
62
  objects = ::YARD::Registry.all(:root, :module, :class).reject do |object|
63
63
  (!options[:serializer] || options[:serializer].exists?(object)) \
64
- && !object.files.any? { |f, _line| files.include?(f) }
64
+ && object.files.none? { |f, _line| files.include?(f) }
65
65
  end
66
66
  ::YARD::Templates::Engine.generate(objects, options)
67
67
  save_registry
@@ -2,7 +2,7 @@ module Guard
2
2
  class Yard
3
3
  # NULL Server
4
4
  class NoServer
5
- [:kill, :spawn, :verify].each do |method|
5
+ %i[kill spawn verify].each do |method|
6
6
  define_method(method) { true }
7
7
  end
8
8
  end
@@ -27,16 +27,8 @@ module Guard
27
27
 
28
28
  def kill
29
29
  UI.info '[Guard::Yard] Stopping YARD Documentation Server.'
30
- begin
31
- if pid
32
- Process.kill('QUIT', pid)
33
- Process.wait2(pid)
34
- end
35
- rescue Errno::ESRCH, Errno::ECHILD
36
- # Process is already dead.
37
- true
38
- end
39
- true
30
+ return true unless pid
31
+ Gem.win_platform? ? windows_kill : posix_kill
40
32
  end
41
33
 
42
34
  def verify
@@ -58,6 +50,30 @@ module Guard
58
50
  )
59
51
  false
60
52
  end
53
+
54
+ private
55
+
56
+ def windows_kill
57
+ # /t includes child process
58
+ # /f forces (required else we'll fail)
59
+ if system("taskkill /f /t /pid #{pid}").nil?
60
+ raise "Cannot kill server: Windows' taskkill command not found"
61
+ end
62
+
63
+ # Process was killed or it didn't exist (something else..?).
64
+ true
65
+ end
66
+
67
+ def posix_kill
68
+ begin
69
+ Process.kill('QUIT', pid)
70
+ Process.wait2(pid)
71
+ # rubocop:disable Lint/HandleExceptions
72
+ rescue Errno::ESRCH, Errno::ECHILD
73
+ # Process is already dead.
74
+ end
75
+ true
76
+ end
61
77
  end
62
78
  end
63
79
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module YardVersion
3
- VERSION = '2.2.0'.freeze
3
+ VERSION = '2.2.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pan Thomakos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-28 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0.40'
61
+ version: '0.51'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0.40'
68
+ version: '0.51'
69
69
  description: Guard::Yard automatically monitors Yard Documentation.
70
70
  email:
71
71
  - pan.thomakos@gmail.com
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project: guard-yard
102
- rubygems_version: 2.5.1
102
+ rubygems_version: 2.5.2
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Guard gem for YARD