kcar 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 15df74e16d5b40e07ee166b1d108f015c7a3ea41
4
+ data.tar.gz: 82d3d3dc591371892d3c9ca0a8c773ff3c2f26aa
5
+ SHA512:
6
+ metadata.gz: 39bf8594ae9d5b66c54a2869385ddb0470e255226b10a7162d0ae025ee2f85b45ccb7d22f3296248560b1cfd1778f9d1b1524cfff886681c042f9f2ed8000826
7
+ data.tar.gz: b60f2c1974fa587993a3bf43000933ff1f0633d0966f5413a577aacfbad888b88292fae7e9fc29e6357609d09957b94ff72984b7e3b971a97a332bac84ddbc75
data/.document CHANGED
@@ -1,7 +1,5 @@
1
1
  LICENSE
2
2
  README
3
- TODO
4
3
  NEWS
5
- ChangeLog
6
4
  lib
7
5
  ext/kcar/kcar.c
data/.gitignore CHANGED
@@ -11,10 +11,10 @@ ext/kcar/Makefile
11
11
  ext/kcar/kcar.c
12
12
  log/
13
13
  pkg/
14
- /NEWS
15
- /ChangeLog
14
+ /NEWS*
16
15
  /.manifest
17
16
  /GIT-VERSION-FILE
17
+ /lib/kcar/version.rb
18
18
  /man
19
19
  tags
20
20
  TAGS
@@ -2,3 +2,6 @@
2
2
  cgit_url: http://bogomips.org/kcar.git
3
3
  git_url: git://bogomips.org/kcar.git
4
4
  rdoc_url: http://bogomips.org/kcar/
5
+ ml_url: http://bogomips.org/kcar-public/
6
+ private_email: kcar@bogomips.org
7
+ public_email: kcar-public@bogomips.org
@@ -1,40 +1,28 @@
1
- #!/bin/sh
2
-
3
- GVF=GIT-VERSION-FILE
4
- DEF_VER=v0.4.0.GIT
5
-
6
- LF='
7
- '
1
+ #!/usr/bin/env ruby
2
+ CONSTANT = "Kcar::VERSION"
3
+ RVF = "lib/kcar/version.rb"
4
+ DEF_VER = "v0.5.0"
5
+ vn = DEF_VER
8
6
 
9
7
  # First see if there is a version file (included in release tarballs),
10
8
  # then try git-describe, then default.
11
- if test -f version
12
- then
13
- VN=$(cat version) || VN="$DEF_VER"
14
- elif test -d .git -o -f .git &&
15
- VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
16
- case "$VN" in
17
- *$LF*) (exit 1) ;;
18
- v[0-9]*)
19
- git update-index -q --refresh
20
- test -z "$(git diff-index --name-only HEAD --)" ||
21
- VN="$VN-dirty" ;;
22
- esac
23
- then
24
- VN=$(echo "$VN" | sed -e 's/-/./g');
25
- else
26
- VN="$DEF_VER"
27
- fi
28
-
29
- VN=$(expr "$VN" : v*'\(.*\)')
9
+ if File.exist?(".git")
10
+ describe = `git describe --abbrev=4 HEAD 2>/dev/null`.strip
11
+ case describe
12
+ when /\Av[0-9]*/
13
+ vn = describe
14
+ system(*%w(git update-index -q --refresh))
15
+ unless `git diff-index --name-only HEAD --`.chomp.empty?
16
+ vn << "-dirty"
17
+ end
18
+ vn.tr!('-', '.')
19
+ end
20
+ end
30
21
 
31
- if test -r $GVF
32
- then
33
- VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
34
- else
35
- VC=unset
36
- fi
37
- test "$VN" = "$VC" || {
38
- echo >&2 "GIT_VERSION = $VN"
39
- echo "GIT_VERSION = $VN" >$GVF
40
- }
22
+ vn = vn.sub!(/\Av/, "")
23
+ new_ruby_version = "#{CONSTANT} = '#{vn}'\n"
24
+ cur_ruby_version = File.read(RVF) rescue nil
25
+ if new_ruby_version != cur_ruby_version
26
+ File.open(RVF, "w") { |fp| fp.write(new_ruby_version) }
27
+ end
28
+ puts vn if $0 == __FILE__
@@ -2,16 +2,10 @@ all::
2
2
  RSYNC_DEST := bogomips.org:/srv/bogomips/kcar
3
3
  RAGEL = ragel
4
4
  RLFLAGS = -G2
5
- rfproject := rainbows
6
5
  rfpackage := kcar
7
- pkg_extra += ext/kcar/kcar.c
6
+ pkg_extra += ext/kcar/kcar.c lib/kcar/version.rb
8
7
  ext/kcar/kcar.c: ext/kcar/kcar.rl ext/kcar/kcar_http_common.rl
9
8
  cd $(@D) && $(RAGEL) kcar.rl -C $(RLFLAGS) -o $(@F)
10
9
  include pkg.mk
11
10
  $(ext_pfx)/$(ext)/kcar.c: ext/kcar/kcar.c
12
11
  $(ext_pfx)/$(ext)/Makefile: ext/kcar/kcar.c
13
- ifneq ($(VERSION),)
14
- release::
15
- $(RAKE) raa_update VERSION=$(VERSION)
16
- $(RAKE) publish_news VERSION=$(VERSION)
17
- endif
data/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  kcar is copyrighted free software by all contributors, see logs in
2
2
  revision control for names and email addresses of all of them. You can
3
3
  redistribute it and/or modify it under either the terms of the
4
- {GPL2}[http://www.gnu.org/licenses/gpl-2.0.txt] (see link:COPYING) or
4
+ {GPLv2}[http://www.gnu.org/licenses/gpl-2.0.txt] or later or
5
5
  the conditions below:
6
6
 
7
7
  1. You may make and give away verbatim copies of the source form of the
data/README CHANGED
@@ -17,7 +17,7 @@ regular files, FIFOs, StringIOs as well as traditional TCP sockets.
17
17
  * streaming interface for response bodies allows for incremental
18
18
  processing of arbitrarily large responses.
19
19
 
20
- * suppported under Ruby 1.8, 1.9 and Rubinuus
20
+ * supported under Ruby 1.9 and later.
21
21
 
22
22
  == Problems
23
23
 
@@ -83,13 +83,8 @@ don't email the git mailing list or maintainer with kcar patches.
83
83
  == Contact
84
84
 
85
85
  All feedback (bug reports, user/development discussion, patches, pull
86
- requests) go to the mailing list: mailto:kcar@librelist.org
86
+ requests) go to the mailing list: mailto:kcar-public@bogomips.org
87
87
 
88
- The mailing list is mirrored to Gmane, all information about the
89
- group is here:
88
+ Mailing list archives are available here:
90
89
 
91
- http://gmane.org/info.php?group=gmane.comp.lang.ruby.kcar.general
92
-
93
- Mailing list archives in mbox format may be downloaded here:
94
-
95
- http://bogomips.org/kcar/archives/
90
+ http://bogomips.org/kcar-public/
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Copyright (c) 2009, 2010 Eric Wong (all bugs are Eric's fault)
3
3
  * Copyright (c) 2005 Zed A. Shaw
4
- * You can redistribute it and/or modify it under the same terms as Ruby.
4
+ * You can redistribute it and/or modify it under the same terms as Ruby 1.8
5
+ * or the GPLv2 or later.
5
6
  */
6
7
  #include "ruby.h"
7
8
  #include "ext_help.h"
@@ -33,7 +34,6 @@ static ID id_sq, id_sq_set;
33
34
  DEF_MAX_LENGTH(FIELD_NAME, 256);
34
35
  DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024);
35
36
  DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32)));
36
- DEF_MAX_LENGTH(REASON, 256);
37
37
 
38
38
  #define UH_FL_CHUNKED 0x1
39
39
  #define UH_FL_HASBODY 0x2
@@ -1,25 +1,23 @@
1
1
  ENV["VERSION"] or abort "VERSION= must be specified"
2
2
  manifest = File.readlines('.manifest').map! { |x| x.chomp! }
3
- require 'wrongdoc'
4
- extend Wrongdoc::Gemspec
3
+ require 'olddoc'
4
+ extend Olddoc::Gemspec
5
5
  name, summary, title = readme_metadata
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = %q{kcar}
9
9
  s.version = ENV["VERSION"].dup
10
- s.homepage = Wrongdoc.config[:rdoc_url]
10
+ s.homepage = Olddoc.config['rdoc_url']
11
11
  s.authors = ["kcar hackers"]
12
- s.date = Time.now.utc.strftime('%Y-%m-%d')
13
12
  s.description = readme_description
14
- s.email = %q{kcar@librelist.org}
13
+ s.email = %q{kcar@bogomips.org}
15
14
  s.extra_rdoc_files = extra_rdoc_files(manifest)
16
15
  s.files = manifest
17
- s.rdoc_options = rdoc_options
18
- s.rubyforge_project = %q{rainbows}
19
16
  s.summary = summary
20
17
  s.test_files = Dir['test/test_*.rb']
21
18
  s.extensions = %w(ext/kcar/extconf.rb)
22
- s.add_development_dependency('wrongdoc', '~> 1.5')
19
+ s.add_development_dependency('olddoc', '~> 1.0')
20
+ s.add_development_dependency('test-unit', '~> 3.0')
23
21
 
24
- # s.license = %w(GPL Ruby) # disabled for compatibility with older RubyGems
22
+ s.licenses = %w(GPLv2+ Ruby)
25
23
  end
@@ -1,13 +1,8 @@
1
1
  # -*- encoding: binary -*-
2
2
  module Kcar
3
-
4
- # current version of Kcar, currently 0.2.0
5
- # This constant is deprecated and will be removed in the next
6
- # release. Use +respond_to?+ or +defined?+ instead to test for features.
7
- VERSION = "0.2.0"
8
-
9
3
  autoload :Response, 'kcar/response'
10
4
  end
11
5
 
6
+ require 'kcar/version'
12
7
  require 'kcar/parser'
13
8
  require 'kcar_ext'
@@ -27,7 +27,7 @@ class Kcar::Response
27
27
  #
28
28
  # [ status, headers, body ]
29
29
  #
30
- # Use Kcar::Response#rack if you want to guaranteee a proper Rack response.
30
+ # Use Kcar::Response#rack if you want to guarantee a proper Rack response.
31
31
  #
32
32
  # this method will not return until the response headers are fully parsed,
33
33
  # but the body returned will be this Kcar::Response handler itself.
data/pkg.mk CHANGED
@@ -1,7 +1,8 @@
1
1
  RUBY = ruby
2
2
  RAKE = rake
3
3
  RSYNC = rsync
4
- WRONGDOC = wrongdoc
4
+ OLDDOC = olddoc
5
+ RDOC = rdoc
5
6
 
6
7
  GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
7
8
  @./GIT-VERSION-GEN
@@ -12,14 +13,6 @@ RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION')
12
13
  RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
13
14
  lib := lib
14
15
 
15
- ifeq ($(shell test -f script/isolate_for_tests && echo t),t)
16
- isolate_libs := tmp/isolate/$(RUBY_ENGINE)-$(RUBY_VERSION)/isolate.mk
17
- $(isolate_libs): script/isolate_for_tests
18
- @$(RUBY) script/isolate_for_tests
19
- -include $(isolate_libs)
20
- lib := $(lib):$(ISOLATE_LIBS)
21
- endif
22
-
23
16
  ext := $(firstword $(wildcard ext/*))
24
17
  ifneq ($(ext),)
25
18
  ext_pfx := tmp/ext/$(RUBY_ENGINE)-$(RUBY_VERSION)
@@ -36,7 +29,7 @@ $(ext_pfx)/$(ext)/%: $(ext)/% $(ext_d)
36
29
  install -m 644 $< $@
37
30
  $(ext_pfx)/$(ext)/Makefile: $(ext)/extconf.rb $(ext_d) $(ext_h)
38
31
  $(RM) -f $(@D)/*.o
39
- cd $(@D) && $(RUBY) $(CURDIR)/$(ext)/extconf.rb
32
+ cd $(@D) && $(RUBY) $(CURDIR)/$(ext)/extconf.rb $(EXTCONF_ARGS)
40
33
  ext_sfx := _ext.$(DLEXT)
41
34
  ext_dl := $(ext_pfx)/$(ext)/$(notdir $(ext)_ext.$(DLEXT))
42
35
  $(ext_dl): $(ext_src) $(ext_pfx_src) $(ext_pfx)/$(ext)/Makefile
@@ -48,10 +41,10 @@ else
48
41
  build:
49
42
  endif
50
43
 
51
- pkg_extra += GIT-VERSION-FILE NEWS ChangeLog LATEST
52
- ChangeLog: GIT-VERSION-FILE .wrongdoc.yml
53
- $(WRONGDOC) prepare
54
- NEWS LATEST: ChangeLog
44
+ pkg_extra += GIT-VERSION-FILE NEWS LATEST
45
+ NEWS: GIT-VERSION-FILE .olddoc.yml
46
+ $(OLDDOC) prepare
47
+ LATEST: NEWS
55
48
 
56
49
  manifest:
57
50
  $(RM) .manifest
@@ -63,28 +56,20 @@ manifest:
63
56
  cmp $@+ $@ || mv $@+ $@
64
57
  $(RM) $@+
65
58
 
66
- doc:: .document .wrongdoc.yml $(pkg_extra)
59
+ doc:: .document .olddoc.yml $(pkg_extra) $(PLACEHOLDERS)
67
60
  -find lib -type f -name '*.rbc' -exec rm -f '{}' ';'
68
61
  -find ext -type f -name '*.rbc' -exec rm -f '{}' ';'
69
62
  $(RM) -r doc
70
- $(WRONGDOC) all
63
+ $(RDOC) -f oldweb
64
+ $(OLDDOC) merge
71
65
  install -m644 COPYING doc/COPYING
66
+ install -m644 NEWS doc/NEWS
67
+ install -m644 NEWS.atom.xml doc/NEWS.atom.xml
72
68
  install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
73
69
 
74
70
  ifneq ($(VERSION),)
75
71
  pkggem := pkg/$(rfpackage)-$(VERSION).gem
76
72
  pkgtgz := pkg/$(rfpackage)-$(VERSION).tgz
77
- release_notes := release_notes-$(VERSION)
78
- release_changes := release_changes-$(VERSION)
79
-
80
- release-notes: $(release_notes)
81
- release-changes: $(release_changes)
82
- $(release_changes):
83
- $(WRONGDOC) release_changes > $@+
84
- $(VISUAL) $@+ && test -s $@+ && mv $@+ $@
85
- $(release_notes):
86
- $(WRONGDOC) release_notes > $@+
87
- $(VISUAL) $@+ && test -s $@+ && mv $@+ $@
88
73
 
89
74
  # ensures we're actually on the tagged $(VERSION), only used for release
90
75
  verify:
@@ -120,31 +105,18 @@ $(pkgtgz): manifest fix-perms
120
105
 
121
106
  package: $(pkgtgz) $(pkggem)
122
107
 
123
- test-release:: verify package $(release_notes) $(release_changes)
124
- # make tgz release on RubyForge
125
- @echo rubyforge add_release -f \
126
- -n $(release_notes) -a $(release_changes) \
127
- $(rfproject) $(rfpackage) $(VERSION) $(pkgtgz)
128
- @echo gem push $(pkggem)
129
- @echo rubyforge add_file \
130
- $(rfproject) $(rfpackage) $(VERSION) $(pkggem)
131
- release:: verify package $(release_notes) $(release_changes)
132
- # make tgz release on RubyForge
133
- rubyforge add_release -f -n $(release_notes) -a $(release_changes) \
134
- $(rfproject) $(rfpackage) $(VERSION) $(pkgtgz)
108
+ release:: verify package
135
109
  # push gem to RubyGems.org
136
110
  gem push $(pkggem)
137
- # in case of gem downloads from RubyForge releases page
138
- rubyforge add_file \
139
- $(rfproject) $(rfpackage) $(VERSION) $(pkggem)
140
111
  else
141
112
  gem install-gem: GIT-VERSION-FILE
142
113
  $(MAKE) $@ VERSION=$(GIT_VERSION)
143
114
  endif
144
115
 
145
- all:: test
116
+ all:: check
146
117
  test_units := $(wildcard test/test_*.rb)
147
- test: test-unit
118
+ test: check
119
+ check: test-unit
148
120
  test-unit: $(test_units)
149
121
  $(test_units): build
150
122
  $(RUBY) -I $(lib) $@ $(RUBY_TEST_OPTS)
@@ -154,8 +126,6 @@ ifneq ($(RSYNC_DEST),)
154
126
  publish_doc:
155
127
  -git set-file-times
156
128
  $(MAKE) doc
157
- find doc/images -type f | \
158
- TZ=UTC xargs touch -d '1970-01-01 00:00:06' doc/rdoc.css
159
129
  $(MAKE) doc_gz
160
130
  $(RSYNC) -av doc/ $(RSYNC_DEST)/
161
131
  git ls-files | xargs touch
@@ -163,7 +133,7 @@ endif
163
133
 
164
134
  # Create gzip variants of the same timestamp as the original so nginx
165
135
  # "gzip_static on" can serve the gzipped versions directly.
166
- doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
136
+ doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.gz$$')
167
137
  doc_gz:
168
138
  for i in $(docs); do \
169
139
  gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
@@ -171,5 +141,10 @@ check-warnings:
171
141
  @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \
172
142
  do $(RUBY) -d -W2 -c $$i; done) | grep -v '^Syntax OK$$' || :
173
143
 
174
- .PHONY: all .FORCE-GIT-VERSION-FILE doc test $(test_units) manifest
144
+ ifneq ($(PLACEHOLDERS),)
145
+ $(PLACEHOLDERS):
146
+ echo olddoc_placeholder > $@
147
+ endif
148
+
149
+ .PHONY: all .FORCE-GIT-VERSION-FILE doc check test $(test_units) manifest
175
150
  .PHONY: check-warnings
metadata CHANGED
@@ -1,60 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - kcar hackers
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-26 00:00:00.000000000 Z
11
+ date: 2015-01-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: wrongdoc
14
+ name: olddoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '1.5'
19
+ version: '1.0'
22
20
  type: :development
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
29
- version: '1.5'
30
- description: ! 'kcar features an HTTP parser that will convert a bytestream into a
31
-
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: test-unit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ description: |-
42
+ kcar features an HTTP parser that will convert a bytestream into a
32
43
  3-element array suitable for use as a Rack response. It is IO interface
33
-
34
44
  agnostic, so it may be used with HTTP streams over Unix domain sockets,
35
-
36
- regular files, FIFOs, StringIOs as well as traditional TCP sockets.'
37
- email: kcar@librelist.org
45
+ regular files, FIFOs, StringIOs as well as traditional TCP sockets.
46
+ email: kcar@bogomips.org
38
47
  executables: []
39
48
  extensions:
40
49
  - ext/kcar/extconf.rb
41
50
  extra_rdoc_files:
42
51
  - LICENSE
43
52
  - README
44
- - TODO
45
53
  - NEWS
46
- - ChangeLog
47
54
  - lib/kcar.rb
48
55
  - lib/kcar/parser.rb
49
56
  - lib/kcar/response.rb
57
+ - lib/kcar/version.rb
50
58
  - ext/kcar/kcar.c
51
59
  files:
52
- - .document
53
- - .gitignore
54
- - .manifest
55
- - .wrongdoc.yml
60
+ - ".document"
61
+ - ".gitignore"
62
+ - ".manifest"
63
+ - ".olddoc.yml"
56
64
  - COPYING
57
- - ChangeLog
58
65
  - GIT-VERSION-FILE
59
66
  - GIT-VERSION-GEN
60
67
  - GNUmakefile
@@ -62,8 +69,6 @@ files:
62
69
  - LICENSE
63
70
  - NEWS
64
71
  - README
65
- - Rakefile
66
- - TODO
67
72
  - ext/kcar/c_util.h
68
73
  - ext/kcar/ext_help.h
69
74
  - ext/kcar/extconf.rb
@@ -74,37 +79,35 @@ files:
74
79
  - lib/kcar.rb
75
80
  - lib/kcar/parser.rb
76
81
  - lib/kcar/response.rb
82
+ - lib/kcar/version.rb
77
83
  - pkg.mk
78
84
  - setup.rb
79
85
  - test/test_parser.rb
80
86
  - test/test_response.rb
81
87
  homepage: http://bogomips.org/kcar/
82
- licenses: []
88
+ licenses:
89
+ - GPLv2+
90
+ - Ruby
91
+ metadata: {}
83
92
  post_install_message:
84
- rdoc_options:
85
- - -t
86
- - kcar - bytestream to Rack response converter
87
- - -W
88
- - http://bogomips.org/kcar.git/tree/%s
93
+ rdoc_options: []
89
94
  require_paths:
90
95
  - lib
91
96
  required_ruby_version: !ruby/object:Gem::Requirement
92
- none: false
93
97
  requirements:
94
- - - ! '>='
98
+ - - ">="
95
99
  - !ruby/object:Gem::Version
96
100
  version: '0'
97
101
  required_rubygems_version: !ruby/object:Gem::Requirement
98
- none: false
99
102
  requirements:
100
- - - ! '>='
103
+ - - ">="
101
104
  - !ruby/object:Gem::Version
102
105
  version: '0'
103
106
  requirements: []
104
- rubyforge_project: rainbows
105
- rubygems_version: 1.8.23
107
+ rubyforge_project:
108
+ rubygems_version: 2.4.5
106
109
  signing_key:
107
- specification_version: 3
110
+ specification_version: 4
108
111
  summary: bytestream to Rack response converter
109
112
  test_files:
110
113
  - test/test_parser.rb
data/Rakefile DELETED
@@ -1,70 +0,0 @@
1
- # -*- encoding: binary -*-
2
- require 'wrongdoc'
3
- cgit_url = Wrongdoc.config[:cgit_url]
4
- git_url = Wrongdoc.config[:git_url]
5
-
6
- desc "post news article to rubyforge"
7
- task :publish_news do
8
- require 'rubyforge'
9
- spec = Gem::Specification.load('kcar.gemspec')
10
- tmp = Tempfile.new('rf-news')
11
- _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
12
- tmp.puts subject
13
- tmp.puts
14
- tmp.puts spec.description.strip
15
- tmp.puts ""
16
- tmp.puts "* #{spec.homepage}"
17
- tmp.puts "* #{spec.email}"
18
- tmp.puts "* #{git_url}"
19
- tmp.print "\nChanges:\n\n"
20
- tmp.puts body
21
- tmp.flush
22
- system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
23
- msg = File.readlines(tmp.path)
24
- subject = msg.shift
25
- blank = msg.shift
26
- blank == "\n" or abort "no newline after subject!"
27
- subject.strip!
28
- body = msg.join("").strip!
29
-
30
- rf = RubyForge.new.configure
31
- rf.login
32
- rf.post_news('rainbows', subject, body)
33
- end
34
-
35
- desc "post to RAA"
36
- task :raa_update do
37
- require 'net/http'
38
- require 'net/netrc'
39
- rc = Net::Netrc.locate('kcar-raa') or abort "~/.netrc not found"
40
- password = rc.password
41
-
42
- s = Gem::Specification.load('kcar.gemspec')
43
- desc = [ s.description.strip ]
44
- desc << ""
45
- desc << "* #{s.email}"
46
- desc << "* #{git_url}"
47
- desc << "* #{cgit_url}"
48
- desc = desc.join("\n")
49
- uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
50
- form = {
51
- :name => s.name,
52
- :short_description => s.summary,
53
- :version => s.version.to_s,
54
- :status => 'experimental',
55
- :owner => s.authors.first,
56
- :email => s.email,
57
- :category_major => 'Library',
58
- :category_minor => 'WWW',
59
- :url => s.homepage,
60
- :download => 'http://rubyforge.org/frs/?group_id=8977',
61
- :license => "Ruby's",
62
- :description_style => 'Plain',
63
- :description => desc,
64
- :pass => password,
65
- :submit => 'Update',
66
- }
67
- res = Net::HTTP.post_form(uri, form)
68
- p res
69
- puts res.body
70
- end
data/TODO DELETED
@@ -1,2 +0,0 @@
1
- Patches to kcar@librelist.org (via git format-patch + git send-email) for
2
- these would be greatly appreciated