thinner 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -446,7 +446,7 @@ Halt any running instances of Thinner::Client
446
446
  </div>
447
447
 
448
448
  <div id="footer">
449
- Generated on Tue Nov 2 14:25:50 2010 by
449
+ Generated on Wed Nov 10 13:25:51 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>
@@ -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 Tue Nov 2 14:25:50 2010 by
596
+ Generated on Wed Nov 10 13:25:52 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>
@@ -282,7 +282,7 @@ to the races.
282
282
  </div>
283
283
 
284
284
  <div id="footer">
285
- Generated on Tue Nov 2 14:25:50 2010 by
285
+ Generated on Wed Nov 10 13:25:52 2010 by
286
286
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
287
287
  0.6.1 (ruby-1.8.7).
288
288
  </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 Tue Nov 2 14:25:50 2010 by
586
+ Generated on Wed Nov 10 13:25:51 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>
@@ -424,7 +424,7 @@ double up on purge requests.
424
424
  </div>
425
425
 
426
426
  <div id="footer">
427
- Generated on Tue Nov 2 14:25:51 2010 by
427
+ Generated on Wed Nov 10 13:25:52 2010 by
428
428
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
429
429
  0.6.1 (ruby-1.8.7).
430
430
  </div>
@@ -129,7 +129,7 @@
129
129
  </div></div>
130
130
 
131
131
  <div id="footer">
132
- Generated on Tue Nov 2 14:25:50 2010 by
132
+ Generated on Wed Nov 10 13:25:51 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>
@@ -62,7 +62,7 @@
62
62
  </div></div>
63
63
 
64
64
  <div id="footer">
65
- Generated on Tue Nov 2 14:25:50 2010 by
65
+ Generated on Wed Nov 10 13:25:51 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>
@@ -62,7 +62,7 @@
62
62
  </div></div>
63
63
 
64
64
  <div id="footer">
65
- Generated on Tue Nov 2 14:25:50 2010 by
65
+ Generated on Wed Nov 10 13:25:51 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>
@@ -69,9 +69,9 @@
69
69
 
70
70
 
71
71
  <li class="r2 ">
72
- <span class='object_link'><a href="Thinner/Client.html#initialize-instance_method" title="Thinner::Client#initialize (method)">#initialize</a></span>
72
+ <span class='object_link'><a href="Thinner/Purger.html#initialize-instance_method" title="Thinner::Purger#initialize (method)">#initialize</a></span>
73
73
 
74
- <small>Thinner::Client</small>
74
+ <small>Thinner::Purger</small>
75
75
 
76
76
  </li>
77
77
 
@@ -85,9 +85,9 @@
85
85
 
86
86
 
87
87
  <li class="r2 ">
88
- <span class='object_link'><a href="Thinner/Purger.html#initialize-instance_method" title="Thinner::Purger#initialize (method)">#initialize</a></span>
88
+ <span class='object_link'><a href="Thinner/Client.html#initialize-instance_method" title="Thinner::Client#initialize (method)">#initialize</a></span>
89
89
 
90
- <small>Thinner::Purger</small>
90
+ <small>Thinner::Client</small>
91
91
 
92
92
  </li>
93
93
 
@@ -133,17 +133,17 @@
133
133
 
134
134
 
135
135
  <li class="r2 ">
136
- <span class='object_link'><a href="Thinner/Purger.html#purge%21-instance_method" title="Thinner::Purger#purge! (method)">#purge!</a></span>
136
+ <span class='object_link'><a href="Thinner.html#purge%21-class_method" title="Thinner.purge! (method)">purge!</a></span>
137
137
 
138
- <small>Thinner::Purger</small>
138
+ <small>Thinner</small>
139
139
 
140
140
  </li>
141
141
 
142
142
 
143
143
  <li class="r1 ">
144
- <span class='object_link'><a href="Thinner.html#purge%21-class_method" title="Thinner.purge! (method)">purge!</a></span>
144
+ <span class='object_link'><a href="Thinner/Purger.html#purge%21-instance_method" title="Thinner::Purger#purge! (method)">#purge!</a></span>
145
145
 
146
- <small>Thinner</small>
146
+ <small>Thinner::Purger</small>
147
147
 
148
148
  </li>
149
149
 
@@ -189,17 +189,17 @@
189
189
 
190
190
 
191
191
  <li class="r1 ">
192
- <span class='object_link'><a href="Thinner.html#stop%21-class_method" title="Thinner.stop! (method)">stop!</a></span>
192
+ <span class='object_link'><a href="Thinner/Purger.html#stop%21-class_method" title="Thinner::Purger.stop! (method)">stop!</a></span>
193
193
 
194
- <small>Thinner</small>
194
+ <small>Thinner::Purger</small>
195
195
 
196
196
  </li>
197
197
 
198
198
 
199
199
  <li class="r2 ">
200
- <span class='object_link'><a href="Thinner/Purger.html#stop%21-class_method" title="Thinner::Purger.stop! (method)">stop!</a></span>
200
+ <span class='object_link'><a href="Thinner.html#stop%21-class_method" title="Thinner.stop! (method)">stop!</a></span>
201
201
 
202
- <small>Thinner::Purger</small>
202
+ <small>Thinner</small>
203
203
 
204
204
  </li>
205
205
 
@@ -79,7 +79,7 @@
79
79
  </div>
80
80
 
81
81
  <div id="footer">
82
- Generated on Tue Nov 2 14:25:51 2010 by
82
+ Generated on Wed Nov 10 13:25:52 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>
@@ -1,5 +1,5 @@
1
1
  # The urls in this array are purged in order, so you'll want to structure it
2
2
  # according to usage.
3
- arr << ["/some_route", "/"]
3
+ arr << ["/some_route", "/some_route/with.*", "/"]
4
4
 
5
5
  Thinner.purge! arr
@@ -19,7 +19,7 @@ end
19
19
  <body>
20
20
  <a href="http://www.propublica.org" class="propublica">&nbsp;</a>
21
21
  <h1>Thinner &ndash; Version <%= File.read('VERSION') %></h1>
22
- <p><a href="https://github.com/propublica/Thinner">Thinner</a> is a utility
22
+ <p><a href="https://github.com/propublica/thinner">Thinner</a> is a utility
23
23
  for purging urls from a Varnish server.</p>
24
24
  <p>When you are deploying code changes to a server under load, the uncached
25
25
  load can quickly bring down your backend server even with Varnish's grace
@@ -28,8 +28,9 @@ end
28
28
  <p>Thinner gives you fine-grained control over wildcard purging, and rolls
29
29
  purges out slowly. Your users will see stale pages from the previous deploy
30
30
  until Thinner has finished invalidating the stale cache at a rate that you set.
31
- If you have a bunch of pages you need to invalidate en masse, but don't
32
- want to risk overloading your server, Thinner is for you.</p>
31
+ If you have a bunch of pages you need to invalidate en masse and at infrequent
32
+ intervals (e.g. deploys, timed remote api updates), but don't want to
33
+ risk overloading your server, Thinner is for you.</p>
33
34
  <p>All that being said, Thinner isn't really a solution for observing
34
35
  model changes and purging associated urls. If you have a highly dynamic
35
36
  application, it's worlds better to handle purging via a
@@ -58,6 +59,8 @@ end
58
59
  the command like so:</p>
59
60
  <pre>cat urls_to_purge.txt | bin/thinner -e</pre>
60
61
  <h2>Change Log</h2>
62
+ <h3>0.1.1</h3>
63
+ <p>Fixed bug in command line argument parsing.</p>
61
64
  <h3>0.1.0</h3>
62
65
  <p>Initial release.</p>
63
66
  </body>
data/index.html CHANGED
@@ -3,16 +3,16 @@
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.0
6
+ <title>Thinner -- Version 0.1.1
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.0
13
+ <h1>Thinner &ndash; Version 0.1.1
14
14
  </h1>
15
- <p><a href="https://github.com/propublica/Thinner">Thinner</a> is a utility
15
+ <p><a href="https://github.com/propublica/thinner">Thinner</a> is a utility
16
16
  for purging urls from a Varnish server.</p>
17
17
  <p>When you are deploying code changes to a server under load, the uncached
18
18
  load can quickly bring down your backend server even with Varnish's grace
@@ -21,8 +21,9 @@
21
21
  <p>Thinner gives you fine-grained control over wildcard purging, and rolls
22
22
  purges out slowly. Your users will see stale pages from the previous deploy
23
23
  until Thinner has finished invalidating the stale cache at a rate that you set.
24
- If you have a bunch of pages you need to invalidate en masse, but don't
25
- want to risk overloading your server, Thinner is for you.</p>
24
+ If you have a bunch of pages you need to invalidate en masse and at infrequent
25
+ intervals (e.g. deploys, timed remote api updates), but don't want to
26
+ risk overloading your server, Thinner is for you.</p>
26
27
  <p>All that being said, Thinner isn't really a solution for observing
27
28
  model changes and purging associated urls. If you have a highly dynamic
28
29
  application, it's worlds better to handle purging via a
@@ -66,7 +67,7 @@
66
67
  an array of urls:</p>
67
68
  <pre class="dawn"><span class="Comment"><span class="Comment">#</span> The urls in this array are purged in order, so you'll want to structure it</span>
68
69
  <span class="Comment"><span class="Comment">#</span> according to usage.</span>
69
- arr <span class="Keyword">&lt;&lt;</span> [&quot;/some_route&quot;<span class="PunctuationSeparator">,</span> &quot;/&quot;]
70
+ arr <span class="Keyword">&lt;&lt;</span> [&quot;/some_route&quot;<span class="PunctuationSeparator">,</span> &quot;/some_route/with.*&quot;<span class="PunctuationSeparator">,</span> &quot;/&quot;]
70
71
 
71
72
  <span class="Support">Thinner</span><span class="PunctuationSeparator">.</span><span class="Entity">purge!</span> arr
72
73
  </pre>
@@ -81,6 +82,8 @@ arr <span class="Keyword">&lt;&lt;</span> [&quot;/some_route&quot;<span class="P
81
82
  the command like so:</p>
82
83
  <pre>cat urls_to_purge.txt | bin/thinner -e</pre>
83
84
  <h2>Change Log</h2>
85
+ <h3>0.1.1</h3>
86
+ <p>Fixed bug in command line argument parsing.</p>
84
87
  <h3>0.1.0</h3>
85
88
  <p>Initial release.</p>
86
89
  </body>
@@ -18,7 +18,6 @@ EOF
18
18
  # Create a Thinner::CommandLine, parse any associated options, grab a list
19
19
  # of urls and start the process
20
20
  def initialize
21
- @urls = []
22
21
  options!
23
22
  @urls ||= ARGV
24
23
  run!
@@ -48,6 +47,7 @@ EOF
48
47
  @options[:sleep_time] = t.to_i
49
48
  end
50
49
  opts.on("-e", "--stdin", "Use stdin for urls") do
50
+ @urls = []
51
51
  ARGF.each_line do |url|
52
52
  @urls << url.chomp
53
53
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{thinner}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
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-02}
12
+ s.date = %q{2010-11-19}
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}
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
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-02 00:00:00 -04:00
18
+ date: 2010-11-19 00:00:00 -05:00
19
19
  default_executable: thinner
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency