guard-jekyll-plus 1.4.6 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZTc2OTc3NGYyNzI1ZDkwYjZlMGMwNGJlMDE1YjE1OTVjYjg5MTcyMw==
5
+ data.tar.gz: !binary |-
6
+ NmE2YjExYjgyNTFjM2YzMGU4ZGMzZjJmYTljNmQ5ZGUzYmY2YzFlOA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ N2MxNjNmZTg2MzJmYzA3NWVlMWNmODU1ZjNhNTM2ZjU4ZWU5NWZkNjBmY2Iw
10
+ ZmUxY2ZiZmUyN2Q2NDNiNzIzNjA5YWVmNzEzM2IxNTkzNmE4YzhiNDc4Y2Nh
11
+ ZWZhNTJmYWI3Y2I2NzE2ODZmMjJlZTYzOTE2MjU5YjU0NDExZGY=
12
+ data.tar.gz: !binary |-
13
+ NmUxZGZmNzI4ZWIwN2IyNTliYmM3ZWU0M2E2YjZkNDQ4Y2NmNGE1MDY3OTU0
14
+ ZTNhMzBjOWUxZWVlZDRjNWNlOGFiYTViNzZiMDUxOGRlOGZlMzIwMzVmNzgz
15
+ Y2U5NWY4NTA3ZTc5MzJmNjFkOTNkZDdiZjI3OTE3ZWM2OWQxOWY=
data/CHANGELOG.md CHANGED
@@ -68,7 +68,10 @@ New config options
68
68
 
69
69
  - Rack process is now succesfully killed on Guard stop
70
70
 
71
- ### 1.4.5
71
+ ### 1.4.6
72
72
 
73
73
  - Rack is now actually optional (oops).
74
74
 
75
+ ### 1.4.7
76
+
77
+ - Double checks that there are files to remove before proceeding and printing remove message.
@@ -164,34 +164,37 @@ module Guard
164
164
  # Remove deleted source file/directories from destination
165
165
  #
166
166
  def remove(files=[])
167
- begin
168
- message = 'removed file'
169
- message += 's' if files.size > 1
170
- UI.info "#{@msg_prefix} #{message.red}" unless @config[:silent]
171
- puts '| ' #spacing
172
-
173
- files.each do |file|
174
- path = destination_path file
175
- if File.exist? path
176
- FileUtils.rm path
177
- puts '|' + " x ".red + path
167
+ # Ensure at least one file still exists (other scripts may clean up too)
168
+ if files.select {|f| File.exist? f }.size > 0
169
+ begin
170
+ message = 'removed file'
171
+ message += 's' if files.size > 1
172
+ UI.info "#{@msg_prefix} #{message.red}" unless @config[:silent]
173
+ puts '| ' #spacing
174
+
175
+ files.each do |file|
176
+ path = destination_path file
177
+ if File.exist? path
178
+ FileUtils.rm path
179
+ puts '|' + " x ".red + path
180
+ end
181
+
182
+ dir = File.dirname path
183
+ if Dir[dir+'/*'].empty?
184
+ FileUtils.rm_r(dir)
185
+ puts '|' + " x ".red + dir
186
+ end
178
187
  end
188
+ puts '| ' #spacing
179
189
 
180
- dir = File.dirname path
181
- if Dir[dir+'/*'].empty?
182
- FileUtils.rm_r(dir)
183
- puts '|' + " x ".red + dir
184
- end
190
+ rescue Exception => e
191
+ UI.error "#{@msg_prefix} remove has failed" unless @config[:silent]
192
+ UI.error e
193
+ stop_server
194
+ throw :task_has_failed
185
195
  end
186
- puts '| ' #spacing
187
-
188
- rescue Exception => e
189
- UI.error "#{@msg_prefix} remove has failed" unless @config[:silent]
190
- UI.error e
191
- stop_server
192
- throw :task_has_failed
196
+ true
193
197
  end
194
- true
195
198
  end
196
199
 
197
200
  def jekyll_matches(paths)
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class JekyllPlusVersion
3
- VERSION = "1.4.6"
3
+ VERSION = "1.4.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-jekyll-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
5
- prerelease:
4
+ version: 1.4.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brandon Mathis
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-10 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: guard
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: jekyll
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -83,27 +78,26 @@ files:
83
78
  homepage: http://github.com/imathis/guard-jekyll-plus
84
79
  licenses:
85
80
  - MIT
81
+ metadata: {}
86
82
  post_install_message:
87
83
  rdoc_options: []
88
84
  require_paths:
89
85
  - lib
90
86
  required_ruby_version: !ruby/object:Gem::Requirement
91
- none: false
92
87
  requirements:
93
88
  - - ! '>='
94
89
  - !ruby/object:Gem::Version
95
90
  version: '0'
96
91
  required_rubygems_version: !ruby/object:Gem::Requirement
97
- none: false
98
92
  requirements:
99
93
  - - ! '>='
100
94
  - !ruby/object:Gem::Version
101
95
  version: '0'
102
96
  requirements: []
103
97
  rubyforge_project:
104
- rubygems_version: 1.8.23
98
+ rubygems_version: 2.0.7
105
99
  signing_key:
106
- specification_version: 3
100
+ specification_version: 4
107
101
  summary: A Guard plugin for Jekyll which intelligently handles changes to static and
108
102
  template files, only running a Jekyll build when necessary.
109
103
  test_files: []