thinner 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  gem.executables = "thinner"
14
14
  gem.require_paths = ['lib']
15
15
  gem.add_dependency "klarlack", "~> 0.0.6"
16
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
16
+ gem.add_development_dependency "shoulda", ">= 0"
17
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
18
  end
19
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -593,7 +593,7 @@ the process label with the first url in the list.
593
593
  </div>
594
594
 
595
595
  <div id="footer">
596
- Generated on Wed Nov 10 13:25:52 2010 by
596
+ Generated on Mon Nov 22 12:10:39 2010 by
597
597
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
598
598
  0.6.1 (ruby-1.8.7).
599
599
  </div>
@@ -201,14 +201,12 @@ urls and start the process
201
201
  22
202
202
  23
203
203
  24
204
- 25
205
- 26</pre>
204
+ 25</pre>
206
205
  </td>
207
206
  <td>
208
207
  <pre class="code"><span class="info file"># File 'lib/thinner/command_line.rb', line 21</span>
209
208
 
210
209
  <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span>
211
- <span class='@urls ivar id'>@urls</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
212
210
  <span class='options! fid id'>options!</span>
213
211
  <span class='@urls ivar id'>@urls</span> <span class='opasgn op'>||=</span> <span class='ARGV constant id'>ARGV</span>
214
212
  <span class='run! fid id'>run!</span>
@@ -251,17 +249,17 @@ to the races.
251
249
  <pre class="lines">
252
250
 
253
251
 
252
+ 29
254
253
  30
255
254
  31
256
255
  32
257
256
  33
258
257
  34
259
258
  35
260
- 36
261
- 37</pre>
259
+ 36</pre>
262
260
  </td>
263
261
  <td>
264
- <pre class="code"><span class="info file"># File 'lib/thinner/command_line.rb', line 30</span>
262
+ <pre class="code"><span class="info file"># File 'lib/thinner/command_line.rb', line 29</span>
265
263
 
266
264
  <span class='def def kw'>def</span> <span class='run! fid id'>run!</span>
267
265
  <span class='Thinner constant id'>Thinner</span><span class='dot token'>.</span><span class='configure identifier id'>configure</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='config identifier id'>config</span><span class='bitor op'>|</span>
@@ -282,7 +280,7 @@ to the races.
282
280
  </div>
283
281
 
284
282
  <div id="footer">
285
- Generated on Wed Nov 10 13:25:52 2010 by
283
+ Generated on Mon Nov 22 12:10:40 2010 by
286
284
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
287
285
  0.6.1 (ruby-1.8.7).
288
286
  </div>
@@ -583,7 +583,7 @@ Returns the value of attribute sleep_time
583
583
  </div>
584
584
 
585
585
  <div id="footer">
586
- Generated on Wed Nov 10 13:25:51 2010 by
586
+ Generated on Mon Nov 22 12:10:39 2010 by
587
587
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
588
588
  0.6.1 (ruby-1.8.7).
589
589
  </div>
@@ -340,15 +340,17 @@ killed process&#8217;s id is logged in the Thinner log file.
340
340
  39
341
341
  40
342
342
  41
343
- 42</pre>
343
+ 42
344
+ 43</pre>
344
345
  </td>
345
346
  <td>
346
347
  <pre class="code"><span class="info file"># File 'lib/thinner/purger.rb', line 34</span>
347
348
 
348
349
  <span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='stop! fid id'>stop!</span>
350
+ <span class='my_id identifier id'>my_id</span> <span class='assign token'>=</span> <span class='$$ gvar id'>$$</span>
349
351
  <span class='job_ids identifier id'>job_ids</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='pid identifier id'>pid</span><span class='bitor op'>|</span>
350
352
  <span class='begin begin kw'>begin</span>
351
- <span class='Process constant id'>Process</span><span class='dot token'>.</span><span class='kill identifier id'>kill</span><span class='lparen token'>(</span><span class='string val'>&quot;KILL&quot;</span><span class='comma token'>,</span> <span class='pid identifier id'>pid</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span><span class='rparen token'>)</span>
353
+ <span class='Process constant id'>Process</span><span class='dot token'>.</span><span class='kill identifier id'>kill</span><span class='lparen token'>(</span><span class='string val'>&quot;KILL&quot;</span><span class='comma token'>,</span> <span class='pid identifier id'>pid</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span><span class='rparen token'>)</span> <span class='unless unless_mod kw'>unless</span> <span class='pid identifier id'>pid</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span> <span class='eq op'>==</span> <span class='my_id identifier id'>my_id</span>
352
354
  <span class='puts identifier id'>puts</span> <span class='dstring node'>&quot;==== Killing process: #{pid}&quot;</span>
353
355
  <span class='rescue rescue kw'>rescue</span> <span class='Errno constant id'>Errno</span><span class='colon2 op'>::</span><span class='ESRCH constant id'>ESRCH</span>
354
356
  <span class='end end kw'>end</span>
@@ -424,7 +426,7 @@ double up on purge requests.
424
426
  </div>
425
427
 
426
428
  <div id="footer">
427
- Generated on Wed Nov 10 13:25:52 2010 by
429
+ Generated on Mon Nov 22 12:10:40 2010 by
428
430
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
429
431
  0.6.1 (ruby-1.8.7).
430
432
  </div>
data/doc/Thinner.html CHANGED
@@ -446,7 +446,7 @@ Halt any running instances of Thinner::Client
446
446
  </div>
447
447
 
448
448
  <div id="footer">
449
- Generated on Wed Nov 10 13:25:51 2010 by
449
+ Generated on Mon Nov 22 12:10:39 2010 by
450
450
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
451
451
  0.6.1 (ruby-1.8.7).
452
452
  </div>
data/doc/_index.html CHANGED
@@ -129,7 +129,7 @@
129
129
  </div></div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Wed Nov 10 13:25:51 2010 by
132
+ Generated on Mon Nov 22 12:10:39 2010 by
133
133
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
134
  0.6.1 (ruby-1.8.7).
135
135
  </div>
data/doc/file.README.html CHANGED
@@ -62,7 +62,7 @@
62
62
  </div></div>
63
63
 
64
64
  <div id="footer">
65
- Generated on Wed Nov 10 13:25:51 2010 by
65
+ Generated on Mon Nov 22 12:10:39 2010 by
66
66
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
67
67
  0.6.1 (ruby-1.8.7).
68
68
  </div>
data/doc/index.html CHANGED
@@ -62,7 +62,7 @@
62
62
  </div></div>
63
63
 
64
64
  <div id="footer">
65
- Generated on Wed Nov 10 13:25:51 2010 by
65
+ Generated on Mon Nov 22 12:10:39 2010 by
66
66
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
67
67
  0.6.1 (ruby-1.8.7).
68
68
  </div>
@@ -79,7 +79,7 @@
79
79
  </div>
80
80
 
81
81
  <div id="footer">
82
- Generated on Wed Nov 10 13:25:52 2010 by
82
+ Generated on Mon Nov 22 12:10:40 2010 by
83
83
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
84
84
  0.6.1 (ruby-1.8.7).
85
85
  </div>
data/index.html CHANGED
@@ -3,14 +3,14 @@
3
3
  <html>
4
4
  <head>
5
5
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
6
- <title>Thinner -- Version 0.1.1
6
+ <title>Thinner -- Version 0.1.2
7
7
  </title>
8
8
  <link rel="stylesheet" type="text/css" href="documentation/css/styles.css" />
9
9
  <link rel="stylesheet" type="text/css" href="documentation/css/dawn.css" />
10
10
  </head>
11
11
  <body>
12
12
  <a href="http://www.propublica.org" class="propublica">&nbsp;</a>
13
- <h1>Thinner &ndash; Version 0.1.1
13
+ <h1>Thinner &ndash; Version 0.1.2
14
14
  </h1>
15
15
  <p><a href="https://github.com/propublica/thinner">Thinner</a> is a utility
16
16
  for purging urls from a Varnish server.</p>
@@ -32,9 +32,10 @@ module Thinner
32
32
  # Before we spin up a new client each running process is killed by pid. Each
33
33
  # killed process's id is logged in the Thinner log file.
34
34
  def self.stop!
35
+ my_id = $$
35
36
  job_ids.each do |pid|
36
37
  begin
37
- Process.kill("KILL", pid.to_i)
38
+ Process.kill("KILL", pid.to_i) unless pid.to_i == my_id
38
39
  puts "==== Killing process: #{pid}"
39
40
  rescue Errno::ESRCH
40
41
  end
data/thinner.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{thinner}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Larson"]
12
- s.date = %q{2010-11-19}
12
+ s.date = %q{2010-11-22}
13
13
  s.default_executable = %q{thinner}
14
14
  s.description = %q{Thinner takes a list of urls or newline seperated stdin and purges them from Varnish.}
15
15
  s.email = %q{thejefflarson@gmail.com}
@@ -77,14 +77,14 @@ Gem::Specification.new do |s|
77
77
 
78
78
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
79
79
  s.add_runtime_dependency(%q<klarlack>, ["~> 0.0.6"])
80
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
80
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
81
81
  else
82
82
  s.add_dependency(%q<klarlack>, ["~> 0.0.6"])
83
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
83
+ s.add_dependency(%q<shoulda>, [">= 0"])
84
84
  end
85
85
  else
86
86
  s.add_dependency(%q<klarlack>, ["~> 0.0.6"])
87
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
87
+ s.add_dependency(%q<shoulda>, [">= 0"])
88
88
  end
89
89
  end
90
90
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Larson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-19 00:00:00 -05:00
18
+ date: 2010-11-22 00:00:00 -05:00
19
19
  default_executable: thinner
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -35,7 +35,7 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: thoughtbot-shoulda
38
+ name: shoulda
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false