zbatery 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -5,3 +5,4 @@ NEWS
5
5
  README
6
6
  FAQ
7
7
  zbatery_1
8
+ LATEST
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ pkg/
16
16
  /.manifest
17
17
  /GIT-VERSION-FILE
18
18
  /man
19
+ /LATEST
data/.manifest CHANGED
@@ -1,6 +1,7 @@
1
1
  .document
2
2
  .gitignore
3
3
  .manifest
4
+ .wrongdoc.yml
4
5
  COPYING
5
6
  ChangeLog
6
7
  Documentation/.gitignore
@@ -10,6 +11,7 @@ FAQ
10
11
  GIT-VERSION-FILE
11
12
  GIT-VERSION-GEN
12
13
  GNUmakefile
14
+ LATEST
13
15
  LICENSE
14
16
  NEWS
15
17
  README
@@ -18,6 +20,7 @@ bin/zbatery
18
20
  lib/zbatery.rb
19
21
  local.mk.sample
20
22
  man/man1/zbatery.1
23
+ man/man1/zbatery.1
21
24
  setup.rb
22
25
  t/.gitignore
23
26
  t/GNUmakefile
data/.wrongdoc.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ cgit_url: http://git.bogomips.org/cgit/zbatery.git
3
+ git_url: git://git.bogomips.org/zbatery.git
4
+ rdoc_url: http://zbatery.bogomip.org/
5
+ changelog_start: v0.3.1
6
+ merge_html:
7
+ zbatery_1: Documentation/zbatery.1.html
data/ChangeLog CHANGED
@@ -1,36 +1,54 @@
1
- ChangeLog from git://git.bogomips.org/zbatery.git (v0.3.1..v0.5.0)
1
+ ChangeLog from http://git.bogomips.org/cgit/zbatery.git (v0.3.1..v0.6.0)
2
2
 
3
- commit 454417bf65dccd9b56e6c8d8272a4cbfd432f94b
4
- Author: Eric Wong <normalperson@yhbt.net>
5
- Date: Sat Nov 20 03:31:47 2010 +0000
6
-
7
- Zbatery 0.5.0 - Rainbows! 2.0.x sync
8
-
9
- This release syncs up with the latest from Rainbows! 2.0.x
10
- and Unicorn 3.0.x. See Rainbows! and Unicorn release notes
11
- and changelogs for relevant details.
12
-
13
- commit f3aa4b5c01c9ff7d72c6ce5bfde398d556e15d5a
14
- Author: Eric Wong <normalperson@yhbt.net>
15
- Date: Thu Oct 28 09:44:45 2010 +0000
16
-
17
- Zbatery 0.4.0 - Rainbows! 1.0.x sync
18
-
19
- This release syncs up with the latest from Rainbows! 1.0.x
20
- and Unicorn 2.0.x
21
-
22
- commit 7a01cae820a175c2f7fd85e43f2e06ec8174340d
23
- Author: Eric Wong <normalperson@yhbt.net>
24
- Date: Thu Oct 28 09:43:15 2010 +0000
25
-
26
- updates for Rainbows! 1.0.0
27
-
28
- There are some internal API changes here.
29
-
30
- commit c37172c8febcec7f8a491b6e229260ca607e14b0
31
- Author: Eric Wong <normalperson@yhbt.net>
32
- Date: Sat Aug 28 20:03:57 2010 +0000
33
-
34
- bump dependencies on Unicorn + Rainbows!
35
-
36
- Small fixes from both that are worth having to ease support.
3
+ commit 2549a23a1a6b18097292acf7dff8e40b6f59ed91
4
+ Author: Eric Wong <normalperson@yhbt.net>
5
+ Date: Wed Dec 29 09:18:59 2010 +0000
6
+
7
+ Zbatery 0.6.0 - Rainbows! 2.1.x resync
8
+
9
+ commit 4b72673e4614d0942c8ac9fab9caf7ac2c9f19f0
10
+ Author: Eric Wong <normalperson@yhbt.net>
11
+ Date: Wed Dec 29 09:18:14 2010 +0000
12
+
13
+ packaging updates (wrongdoc!)
14
+
15
+ commit 1e3d8e09d4fe7ad2eaa69200226ddc9931b89f7b
16
+ Author: Eric Wong <normalperson@yhbt.net>
17
+ Date: Wed Dec 29 09:00:36 2010 +0000
18
+
19
+ resync with Rainbows! 2.1.0
20
+
21
+ commit 454417bf65dccd9b56e6c8d8272a4cbfd432f94b
22
+ Author: Eric Wong <normalperson@yhbt.net>
23
+ Date: Sat Nov 20 03:31:47 2010 +0000
24
+
25
+ Zbatery 0.5.0 - Rainbows! 2.0.x sync
26
+
27
+ This release syncs up with the latest from Rainbows! 2.0.x
28
+ and Unicorn 3.0.x. See Rainbows! and Unicorn release notes
29
+ and changelogs for relevant details.
30
+
31
+ commit f3aa4b5c01c9ff7d72c6ce5bfde398d556e15d5a
32
+ Author: Eric Wong <normalperson@yhbt.net>
33
+ Date: Thu Oct 28 09:44:45 2010 +0000
34
+
35
+ Zbatery 0.4.0 - Rainbows! 1.0.x sync
36
+
37
+ This release syncs up with the latest from Rainbows! 1.0.x
38
+ and Unicorn 2.0.x
39
+
40
+ commit 7a01cae820a175c2f7fd85e43f2e06ec8174340d
41
+ Author: Eric Wong <normalperson@yhbt.net>
42
+ Date: Thu Oct 28 09:43:15 2010 +0000
43
+
44
+ updates for Rainbows! 1.0.0
45
+
46
+ There are some internal API changes here.
47
+
48
+ commit c37172c8febcec7f8a491b6e229260ca607e14b0
49
+ Author: Eric Wong <normalperson@yhbt.net>
50
+ Date: Sat Aug 28 20:03:57 2010 +0000
51
+
52
+ bump dependencies on Unicorn + Rainbows!
53
+
54
+ Small fixes from both that are worth having to ease support.
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 0.5.0
1
+ GIT_VERSION = 0.6.0
data/GIT-VERSION-GEN CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.5.0.GIT
4
+ DEF_VER=v0.6.0.GIT
5
5
 
6
6
  LF='
7
7
  '
data/GNUmakefile CHANGED
@@ -4,15 +4,11 @@ MRI = ruby
4
4
  RUBY = ruby
5
5
  RAKE = rake
6
6
  RSYNC = rsync
7
- GIT_URL = git://git.bogomips.org/zbatery.git
8
7
 
9
8
  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
10
9
  @./GIT-VERSION-GEN
11
10
  -include GIT-VERSION-FILE
12
11
  -include local.mk
13
- ifeq ($(DLEXT),) # "so" for Linux
14
- DLEXT := $(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["DLEXT"]')
15
- endif
16
12
  ifeq ($(RUBY_VERSION),)
17
13
  RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION')
18
14
  endif
@@ -43,77 +39,40 @@ clean:
43
39
  -$(MAKE) -C Documentation clean
44
40
  $(RM) $(setup_rb_files) $(t_log)
45
41
 
46
- man:
47
- $(MAKE) -C Documentation install-man
42
+ man html:
43
+ $(MAKE) -C Documentation install-$@
48
44
 
49
- pkg_extra := GIT-VERSION-FILE NEWS ChangeLog
45
+ pkg_extra := GIT-VERSION-FILE ChangeLog LATEST NEWS $(man1_paths)
50
46
  manifest: $(pkg_extra) man
51
47
  $(RM) .manifest
52
48
  $(MAKE) .manifest
53
49
 
54
50
  .manifest:
55
- (git ls-files && \
56
- for i in $@ $(pkg_extra) $(man1_paths); \
51
+ (git ls-files && for i in $@ $(pkg_extra) $(man1_paths); \
57
52
  do echo $$i; done) | LC_ALL=C sort > $@+
58
53
  cmp $@+ $@ || mv $@+ $@
59
54
  $(RM) $@+
60
55
 
61
- NEWS: GIT-VERSION-FILE
62
- $(RAKE) -s news_rdoc > $@+
63
- mv $@+ $@
64
-
65
- SINCE = 0.3.1
66
- ChangeLog: LOG_VERSION = \
67
- $(shell git rev-parse -q "$(GIT_VERSION)" >/dev/null 2>&1 && \
68
- echo $(GIT_VERSION) || git describe)
69
- ifneq ($(SINCE),)
70
- ChangeLog: log_range = v$(SINCE)..$(LOG_VERSION)
71
- endif
72
- ChangeLog: GIT-VERSION-FILE
73
- @echo "ChangeLog from $(GIT_URL) ($(log_range))" > $@+
74
- @echo >> $@+
75
- git log $(log_range) | sed -e 's/^/ /' >> $@+
76
- mv $@+ $@
77
-
78
- news_atom := http://zbatery.bogomip.org/NEWS.atom.xml
79
- cgit_atom := http://git.bogomips.org/cgit/zbatery.git/atom/?h=master
80
- atom = <link rel="alternate" title="Atom feed" href="$(1)" \
81
- type="application/atom+xml"/>
56
+ ChangeLog: GIT-VERSION-FILE .wrongdoc.yml
57
+ wrongdoc prepare
82
58
 
83
- # using rdoc 2.5.x+
84
- doc: .document NEWS ChangeLog
59
+ doc: .document ChangeLog GIT-VERSION-FILE
85
60
  for i in $(man1_rdoc); do echo > $$i; done
86
61
  find bin lib -type f -name '*.rbc' -exec rm -f '{}' ';'
87
- rdoc -t "$(shell sed -ne '1s/^= //p' README)"
62
+ $(RM) -r doc
63
+ wrongdoc all
88
64
  install -m644 COPYING doc/COPYING
89
- install -m644 $(shell grep '^[A-Z]' .document) doc/
90
- $(MAKE) -C Documentation install-html install-man
65
+ install -m644 $(shell grep '^[A-Z]' .document) doc/
91
66
  install -m644 $(man1_paths) doc/
92
- cd doc && for i in $(base_bins); do \
93
- $(RM) 1.html $${i}.1.html; \
94
- sed -e '/"documentation">/r man1/'$$i'.1.html' \
95
- < $${i}_1.html > tmp && mv tmp $${i}_1.html; \
96
- ln $${i}_1.html $${i}.1.html; \
97
- done
98
- $(MRI) -i -p -e \
99
- '$$_.gsub!("</title>",%q{\&$(call atom,$(cgit_atom))})' \
100
- doc/ChangeLog.html
101
- $(MRI) -i -p -e \
102
- '$$_.gsub!("</title>",%q{\&$(call atom,$(news_atom))})' \
103
- doc/NEWS.html doc/README.html
104
- $(RAKE) -s news_atom > doc/NEWS.atom.xml
105
- cd doc && ln README.html tmp && mv tmp index.html
106
67
  $(RM) $(man1_rdoc)
107
68
 
108
69
  # publishes docs to http://zbatery.bogomip.org/
109
70
  publish_doc:
110
71
  -git set-file-times
111
- $(RM) -r doc ChangeLog NEWS
112
- $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
113
- awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' \
114
- < NEWS > doc/LATEST
115
- find doc/images doc/js -type f | \
116
- TZ=UTC xargs touch -d '1970-01-01 00:00:01' doc/rdoc.css
72
+ $(RM) -r doc
73
+ $(MAKE) doc
74
+ find doc/images -type f | \
75
+ TZ=UTC xargs touch -d '1970-01-01 00:00:03' doc/rdoc.css
117
76
  $(MAKE) doc_gz
118
77
  chmod 644 $$(find doc -type f)
119
78
  $(RSYNC) -av doc/ zbatery.bogomip.org:/srv/zbatery/
@@ -123,7 +82,6 @@ publish_doc:
123
82
  # "gzip_static on" can serve the gzipped versions directly.
124
83
  doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
125
84
  doc_gz:
126
- touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
127
85
  for i in $(docs); do \
128
86
  gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
129
87
 
@@ -138,10 +96,10 @@ release_changes := release_changes-$(VERSION)
138
96
  release-notes: $(release_notes)
139
97
  release-changes: $(release_changes)
140
98
  $(release_changes):
141
- $(RAKE) -s release_changes > $@+
99
+ wrongdoc release_changes > $@+
142
100
  $(VISUAL) $@+ && test -s $@+ && mv $@+ $@
143
101
  $(release_notes):
144
- GIT_URL=$(GIT_URL) $(RAKE) -s release_notes > $@+
102
+ wrongdoc release_notes > $@+
145
103
  $(VISUAL) $@+ && test -s $@+ && mv $@+ $@
146
104
 
147
105
  # ensures we're actually on the tagged $(VERSION), only used for release
@@ -172,8 +130,8 @@ $(pkgtgz): manifest fix-perms
172
130
  @test -n "$(distdir)"
173
131
  $(RM) -r $(distdir)
174
132
  mkdir -p $(distdir)
175
- tar c `cat .manifest` | (cd $(distdir) && tar x)
176
- cd pkg && tar c $(basename $(@F)) | gzip -9 > $(@F)+
133
+ tar cf - $$(cat .manifest) | (cd $(distdir) && tar xf -)
134
+ cd pkg && tar cf - $(basename $(@F)) | gzip -9 > $(@F)+
177
135
  mv $@+ $@
178
136
 
179
137
  package: $(pkgtgz) $(pkggem)
data/LATEST ADDED
@@ -0,0 +1,5 @@
1
+ === Zbatery 0.6.0 - Rainbows! 2.1.x resync /
2
+
3
+ All the latest and greatest changes from Rainbows! 2.1.0:
4
+ http://git.bogomips.org/cgit/rainbows.git/tag/?id=v2.1.0
5
+
data/NEWS CHANGED
@@ -1,27 +1,32 @@
1
- === 0.5.0 / 2010-11-20 03:32 UTC
1
+ === Zbatery 0.6.0 - Rainbows! 2.1.x resync / 2010-12-29 09:20 UTC
2
+
3
+ All the latest and greatest changes from Rainbows! 2.1.0:
4
+ http://git.bogomips.org/cgit/rainbows.git/tag/?id=v2.1.0
5
+
6
+ === Zbatery 0.5.0 - Rainbows! 2.0.x sync / 2010-11-20 03:32 UTC
2
7
 
3
8
  This release syncs up with the latest from Rainbows! 2.0.x
4
9
  and Unicorn 3.0.x. See Rainbows! and Unicorn release notes
5
10
  and changelogs for relevant details.
6
11
 
7
- === 0.4.0 / 2010-10-28 09:45 UTC
12
+ === Zbatery 0.4.0 - Rainbows! 1.0.x sync / 2010-10-28 09:45 UTC
8
13
 
9
14
  This release syncs up with the latest from Rainbows! 1.0.x
10
15
  and Unicorn 2.0.x and includes minor bugfixes from both.
11
16
 
12
- === 0.3.1 / 2010-07-11 02:58 UTC
17
+ === Zbatery v0.3.1 - quiet EOF errors from clients / 2010-07-11 02:58 UTC
13
18
 
14
19
  Eric Wong (3):
15
20
  update local.mk.sample for 0.3.0
16
21
  Fix documentation generation
17
22
  bump Rainbows! (and Unicorn) dependencies
18
23
 
19
- === 0.3.0 / 2010-07-10 09:58 UTC
24
+ === Zbatery v0.3.0 - for newer Rainbows! / 2010-07-10 09:58 UTC
20
25
 
21
26
  Rainbows! v0.95.0 is more awesome than v0.94.0, so we've updated
22
27
  ourselves to use it and be more awesome as well!
23
28
 
24
- === 0.2.1 / 2010-04-19 21:16 UTC
29
+ === Zbatery 0.2.1 - use a less-broken parser from Unicorn / 2010-04-19 21:16 UTC
25
30
 
26
31
  This release fixes a denial-of-service vector for deployments
27
32
  exposed directly to untrusted clients.
@@ -48,7 +53,7 @@
48
53
  This bug affects all previously released versions of Rainbows!
49
54
  and Zbatery.
50
55
 
51
- === 0.2.0 / 2010-03-01 10:42 UTC
56
+ === Zbatery 0.2.0 - Unicorn/Rainbows! resync / 2010-03-01 10:42 UTC
52
57
 
53
58
  This release resyncs against the latest features/cleanups
54
59
  in Unicorn 0.97.0 and Rainbows! 0.91.0
@@ -62,7 +67,7 @@
62
67
  disable more Unicorn methods
63
68
  support Unicorn 0.96.0+ ready_pipe daemonization
64
69
 
65
- === 0.1.1 / 2010-02-13 09:26 UTC
70
+ === Zbatery 0.1.1 / 2010-02-13 09:26 UTC
66
71
 
67
72
  Unicorn had a memory that didn't affect Unicorn, but only
68
73
  Rainbows!, so we bumped the dependency on Rainbows!
@@ -70,13 +75,9 @@
70
75
 
71
76
  Also some minor documentation updates.
72
77
 
73
- === 0.1.0 / 2009-12-22 22:59 UTC
78
+ === Zbatery 0.1.0 / 2009-12-22 22:59 UTC
74
79
 
75
80
  This gem release allows compatibility with newer versions of
76
81
  Rainbows! This also fixes a bug when $stdout is not redirected
77
82
  to a file.
78
83
 
79
- === 0.0.0 / 2009-12-10 08:49 UTC
80
-
81
- Initial release of Rainbows! without fork()
82
-
data/Rakefile CHANGED
@@ -1,112 +1,27 @@
1
1
  # -*- encoding: binary -*-
2
2
  autoload :Gem, 'rubygems'
3
3
 
4
- # most tasks are in the GNUmakefile which offers better parallelism
5
-
6
- def tags
7
- timefmt = '%Y-%m-%dT%H:%M:%SZ'
8
- @tags ||= `git tag -l`.split(/\n/).map do |tag|
9
- if %r{\Av[\d\.]+\z} =~ tag
10
- header, subject, body = `git cat-file tag #{tag}`.split(/\n\n/, 3)
11
- header = header.split(/\n/)
12
- tagger = header.grep(/\Atagger /).first
13
- body ||= "initial"
14
- {
15
- :time => Time.at(tagger.split(/ /)[-2].to_i).utc.strftime(timefmt),
16
- :tagger_name => %r{^tagger ([^<]+)}.match(tagger)[1].strip,
17
- :tagger_email => %r{<([^>]+)>}.match(tagger)[1].strip,
18
- :id => `git rev-parse refs/tags/#{tag}`.chomp!,
19
- :tag => tag,
20
- :subject => subject,
21
- :body => body,
22
- }
23
- end
24
- end.compact.sort { |a,b| b[:time] <=> a[:time] }
25
- end
26
-
27
- cgit_url = "http://git.bogomips.org/cgit/zbatery.git"
28
- git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/zbatery.git'
29
-
30
- desc 'prints news as an Atom feed'
31
- task :news_atom do
32
- require 'nokogiri'
33
- new_tags = tags[0,10]
34
- puts(Nokogiri::XML::Builder.new do
35
- feed :xmlns => "http://www.w3.org/2005/Atom" do
36
- id! "http://zbatery.bogomip.org/NEWS.atom.xml"
37
- title "Zbatery news"
38
- subtitle "HTTP server without a fork stuck in it"
39
- link! :rel => 'alternate', :type => 'text/html',
40
- :href => 'http://zbatery.bogomip.org/NEWS.html'
41
- updated(new_tags.empty? ? "1970-01-01T00:00:00Z" : new_tags.first[:time])
42
- new_tags.each do |tag|
43
- entry do
44
- title tag[:subject]
45
- updated tag[:time]
46
- published tag[:time]
47
- author {
48
- name tag[:tagger_name]
49
- email tag[:tagger_email]
50
- }
51
- url = "#{cgit_url}/tag/?id=#{tag[:tag]}"
52
- link! :rel => "alternate", :type => "text/html", :href =>url
53
- id! url
54
- message_only = tag[:body].split(/\n.+\(\d+\):\n {6}/s).first.strip
55
- content({:type =>:text}, message_only)
56
- content(:type =>:xhtml) { pre tag[:body] }
57
- end
58
- end
59
- end
60
- end.to_xml)
61
- end
62
-
63
- desc 'prints RDoc-formatted news'
64
- task :news_rdoc do
65
- tags.each do |tag|
66
- time = tag[:time].tr!('T', ' ').gsub!(/:\d\dZ/, ' UTC')
67
- puts "=== #{tag[:tag].sub(/^v/, '')} / #{time}"
68
- puts ""
69
-
70
- body = tag[:body]
71
- puts tag[:body].gsub(/^/sm, " ").gsub(/[ \t]+$/sm, "")
72
- puts ""
73
- end
74
- end
75
-
76
- desc "print release changelog for Rubyforge"
77
- task :release_changes do
78
- version = ENV['VERSION'] or abort "VERSION= needed"
79
- version = "v#{version}"
80
- vtags = tags.map { |tag| tag[:tag] =~ /\Av/ and tag[:tag] }.sort
81
- prev = vtags[vtags.index(version) - 1]
82
- if prev
83
- system('git', 'diff', '--stat', prev, version) or abort $?
84
- puts ""
85
- system('git', 'log', "#{prev}..#{version}") or abort $?
86
- else
87
- system('git', 'log', version) or abort $?
88
- end
89
- end
90
-
91
- desc "print release notes for Rubyforge"
92
- task :release_notes do
93
- spec = Gem::Specification.load('zbatery.gemspec')
94
- puts spec.description.strip
95
- puts ""
96
- puts "* #{spec.homepage}"
97
- puts "* #{spec.email}"
98
- puts "* #{git_url}"
99
-
100
- _, _, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
101
- print "\nChanges:\n\n"
102
- puts body
103
- end
4
+ cgit_url = "http://git.bogomips.org/cgit/rainbows.git"
5
+ git_url = 'git://git.bogomips.org/rainbows.git'
104
6
 
105
7
  desc "read news article from STDIN and post to rubyforge"
106
8
  task :publish_news do
107
9
  require 'rubyforge'
108
- IO.select([STDIN], nil, nil, 1) or abort "E: news must be read from stdin"
109
- msg = STDIN.readlines
10
+ spec = Gem::Specification.load('zbatery.gemspec')
11
+ tmp = Tempfile.new('rf-news')
12
+ _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
13
+ tmp.puts subject
14
+ tmp.puts
15
+ tmp.puts spec.description.strip
16
+ tmp.puts ""
17
+ tmp.puts "* #{spec.homepage}"
18
+ tmp.puts "* #{spec.email}"
19
+ tmp.puts "* #{git_url}"
20
+ tmp.print "\nChanges:\n\n"
21
+ tmp.puts body
22
+ tmp.flush
23
+ system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
24
+ msg = File.readlines(tmp.path)
110
25
  subject = msg.shift
111
26
  blank = msg.shift
112
27
  blank == "\n" or abort "no newline after subject!"
@@ -165,9 +80,8 @@ task :fm_update do
165
80
  uri = URI.parse('http://freshmeat.net/projects/zbatery/releases.json')
166
81
  rc = Net::Netrc.locate('zbatery-fm') or abort "~/.netrc not found"
167
82
  api_token = rc.password
168
- changelog = tags.find { |t| t[:tag] == "v#{version}" }[:body]
83
+ _, subject, body = `git cat-file tag v#{version}`.split(/\n\n/, 3)
169
84
  tmp = Tempfile.new('fm-changelog')
170
- tmp.syswrite(changelog)
171
85
  system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
172
86
  changelog = File.read(tmp.path).strip
173
87
 
data/lib/zbatery.rb CHANGED
@@ -4,8 +4,8 @@ require 'rainbows'
4
4
 
5
5
  module Zbatery
6
6
 
7
- # version of Zbatery, currently 0.5.0
8
- VERSION = "0.5.0"
7
+ # version of Zbatery, currently 0.6.0
8
+ VERSION = "0.6.0"
9
9
 
10
10
  class << self
11
11
 
@@ -36,6 +36,7 @@ module Rainbows
36
36
  build_app! unless preload_app
37
37
  Rainbows::Response.setup(self.class)
38
38
  Rainbows::MaxBody.setup
39
+ Rainbows::RackInput.setup
39
40
  Rainbows::ProcessClient.const_set(:APP, @app)
40
41
 
41
42
  logger.info "Zbatery #@use worker_connections=#@worker_connections"
data/t/GNUmakefile CHANGED
@@ -23,11 +23,9 @@ models += WriterThreadPool
23
23
  models += WriterThreadSpawn
24
24
  models += ThreadPool
25
25
  models += ThreadSpawn
26
- models += Rev
26
+ models += Coolio
27
27
  models += EventMachine
28
28
  models += NeverBlock
29
- models += RevThreadSpawn
30
- models += RevThreadPool
31
29
 
32
30
  ifeq ($(RUBY_ENGINE),ruby)
33
31
  rp := )
@@ -35,8 +33,10 @@ ifeq ($(RUBY_ENGINE),ruby)
35
33
  ifeq ($(ONENINE),true)
36
34
  models += Revactor
37
35
  models += FiberSpawn
38
- models += RevFiberSpawn
36
+ models += CoolioFiberSpawn
39
37
  models += FiberPool
38
+ models += CoolioThreadSpawn
39
+ models += CoolioThreadPool
40
40
  endif
41
41
  endif
42
42
 
data/t/test-lib.sh CHANGED
@@ -126,7 +126,7 @@ EOF
126
126
  if test $# -ge 1
127
127
  then
128
128
  echo " use :$1"
129
- test $# -eq 2 && echo " worker_connections $2"
129
+ test $# -ge 2 && echo " worker_connections $2"
130
130
  if test $# -eq 3
131
131
  then
132
132
  echo " keepalive_timeout $3"
@@ -175,6 +175,7 @@ req_curl_chunked_upload_err_check () {
175
175
 
176
176
  case $model in
177
177
  Rev) require_check rev Rev::VERSION ;;
178
+ Coolio) require_check coolio Coolio::VERSION ;;
178
179
  Revactor) require_check revactor Revactor::VERSION ;;
179
180
  EventMachine) require_check eventmachine EventMachine::VERSION ;;
180
181
  esac
data/t/test_isolate.rb CHANGED
@@ -15,14 +15,14 @@ $stdout.reopen($stderr)
15
15
 
16
16
  Isolate.now!(opts) do
17
17
  gem 'rack', '1.2.1'
18
- gem 'unicorn', '3.0.0'
19
- gem 'rainbows', '2.0.0'
18
+ gem 'unicorn', '3.2.1'
19
+ gem 'rainbows', '2.1.0'
20
20
 
21
21
  if engine == "ruby"
22
22
  gem 'sendfile', '1.0.0' # next Rubinius should support this
23
23
 
24
24
  gem 'iobuffer', '0.1.3'
25
- gem 'rev', '0.3.2'
25
+ gem 'cool.io', '1.0.0'
26
26
 
27
27
  gem 'eventmachine', '0.12.10'
28
28
  gem 'sinatra', '1.0.0'
@@ -39,4 +39,8 @@ Isolate.now!(opts) do
39
39
  end
40
40
 
41
41
  $stdout.reopen(old_out)
42
- puts Dir["#{path}/gems/*-*/lib"].map { |x| File.expand_path(x) }.join(':')
42
+ # don't load the old Rev if it exists, Cool.io 1.0.0 is compatible with it,
43
+ # even for everything Revactor uses.
44
+ dirs = Dir["#{path}/gems/*-*/lib"]
45
+ dirs.delete_if { |x| x =~ %r{/rev-[\d\.]+/lib} }
46
+ puts dirs.map { |x| File.expand_path(x) }.join(':')
data/zbatery.gemspec CHANGED
@@ -1,45 +1,27 @@
1
1
  # -*- encoding: binary -*-
2
-
3
2
  ENV["VERSION"] or abort "VERSION= must be specified"
4
3
  manifest = File.readlines('.manifest').map! { |x| x.chomp! }
5
-
6
- # don't bother with tests that fork, not worth our time to get working
7
- # with `gem check -t` ... (of course we care for them when testing with
8
- # GNU make when they can run in parallel)
9
- test_files = manifest.grep(%r{\Atest/unit/test_.*\.rb\z}).map do |f|
10
- File.readlines(f).grep(/\bfork\b/).empty? ? f : nil
11
- end.compact
4
+ require 'wrongdoc'
5
+ extend Wrongdoc::Gemspec
6
+ name, summary, title = readme_metadata
12
7
 
13
8
  Gem::Specification.new do |s|
14
9
  s.name = %q{zbatery}
15
- s.version = ENV["VERSION"]
10
+ s.version = ENV["VERSION"].dup
16
11
 
17
12
  s.authors = ["Zbatery hackers"]
18
13
  s.date = Time.now.utc.strftime('%Y-%m-%d')
19
- s.description = File.read("README").split(/\n\n/)[1]
14
+ s.description = readme_description
20
15
  s.email = %q{rainbows-talk@rubyforge.org}
21
16
  s.executables = %w(zbatery)
22
-
23
- s.extra_rdoc_files = File.readlines('.document').map! do |x|
24
- x.chomp!
25
- if File.directory?(x)
26
- manifest.grep(%r{\A#{x}/})
27
- elsif File.file?(x)
28
- x
29
- else
30
- nil
31
- end
32
- end.flatten.compact
33
-
17
+ s.extra_rdoc_files = extra_rdoc_files(manifest)
34
18
  s.files = manifest
35
- s.homepage = %q{http://zbatery.bogomip.org/}
36
- s.summary = %q{Rack HTTP server without a fork stuck in it}
37
- s.rdoc_options = [ "-t", "Zbatery - #{s.summary}" ]
19
+ s.homepage = Wrongdoc.config[:rdoc_url]
20
+ s.summary = summary
21
+ s.rdoc_options = rdoc_options
38
22
  s.require_paths = %w(lib)
39
23
  s.rubyforge_project = %q{rainbows}
40
24
 
41
- s.test_files = test_files
42
-
43
25
  # rainbows has a boatload of optional dependencies
44
26
  # required:
45
27
  # unicorn + rack
@@ -50,7 +32,8 @@ Gem::Specification.new do |s|
50
32
  # espace-neverblock + eventmachine
51
33
  # async_sinatra + sinatra + eventmachine
52
34
  #
53
- s.add_dependency(%q<rainbows>, ["~> 2.0.0"])
35
+ s.add_dependency(%q<rainbows>, ["~> 2.1.0"])
36
+ s.add_development_dependency(%q<wrongdoc>, "~> 1.1")
54
37
  s.add_development_dependency(%q<isolate>, "~> 3.0.0")
55
38
 
56
39
  # s.licenses = %w(GPLv2 Ruby) # accessor not compatible with older RubyGems
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zbatery
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Zbatery hackers
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-20 00:00:00 +00:00
18
+ date: 2010-12-29 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,18 +26,33 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 15
29
+ hash: 11
30
30
  segments:
31
31
  - 2
32
+ - 1
32
33
  - 0
33
- - 0
34
- version: 2.0.0
34
+ version: 2.1.0
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: isolate
38
+ name: wrongdoc
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 13
46
+ segments:
47
+ - 1
48
+ - 1
49
+ version: "1.1"
50
+ type: :development
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: isolate
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
41
56
  none: false
42
57
  requirements:
43
58
  - - ~>
@@ -49,7 +64,7 @@ dependencies:
49
64
  - 0
50
65
  version: 3.0.0
51
66
  type: :development
52
- version_requirements: *id002
67
+ version_requirements: *id003
53
68
  description: |-
54
69
  Zbatery is an HTTP server for Rack applications on systems that either
55
70
  do not support fork(), or have no memory (nor need) to run the
@@ -70,10 +85,12 @@ extra_rdoc_files:
70
85
  - NEWS
71
86
  - README
72
87
  - FAQ
88
+ - LATEST
73
89
  files:
74
90
  - .document
75
91
  - .gitignore
76
92
  - .manifest
93
+ - .wrongdoc.yml
77
94
  - COPYING
78
95
  - ChangeLog
79
96
  - Documentation/.gitignore
@@ -83,6 +100,7 @@ files:
83
100
  - GIT-VERSION-FILE
84
101
  - GIT-VERSION-GEN
85
102
  - GNUmakefile
103
+ - LATEST
86
104
  - LICENSE
87
105
  - NEWS
88
106
  - README
@@ -116,7 +134,9 @@ licenses: []
116
134
  post_install_message:
117
135
  rdoc_options:
118
136
  - -t
119
- - Zbatery - Rack HTTP server without a fork stuck in it
137
+ - "Zbatery: Rack HTTP server without a fork stuck in it"
138
+ - -W
139
+ - http://git.bogomips.org/cgit/zbatery.git/tree/%s
120
140
  require_paths:
121
141
  - lib
122
142
  required_ruby_version: !ruby/object:Gem::Requirement