kcar 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15df74e16d5b40e07ee166b1d108f015c7a3ea41
4
- data.tar.gz: 82d3d3dc591371892d3c9ca0a8c773ff3c2f26aa
3
+ metadata.gz: 11fd8bf65267d66726c60a780beb44140d7ce64e
4
+ data.tar.gz: a6508831c72ee890f06a1a6b70858b15a3817ddb
5
5
  SHA512:
6
- metadata.gz: 39bf8594ae9d5b66c54a2869385ddb0470e255226b10a7162d0ae025ee2f85b45ccb7d22f3296248560b1cfd1778f9d1b1524cfff886681c042f9f2ed8000826
7
- data.tar.gz: b60f2c1974fa587993a3bf43000933ff1f0633d0966f5413a577aacfbad888b88292fae7e9fc29e6357609d09957b94ff72984b7e3b971a97a332bac84ddbc75
6
+ metadata.gz: 7c28c23285c4c881749facc72bb8388b7e66d8231201b1b5ac87c83ddb2482d8b9324ea47d450eae0e63cdccb2b5bb2f42274ca9835276a92b0cabe7b6ab90c8
7
+ data.tar.gz: 2b5ee78603d2e7e36df30e60b06bf3f701b1aa240655b8df84f71e91b0254333b587c2be955816505673b1a92eb234f0151f39ff7e6749c80e540ad9cb645821
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  CONSTANT = "Kcar::VERSION"
3
3
  RVF = "lib/kcar/version.rb"
4
- DEF_VER = "v0.5.0"
4
+ DEF_VER = "v0.6.0"
5
+ GVF = "GIT-VERSION-FILE"
5
6
  vn = DEF_VER
6
7
 
7
8
  # First see if there is a version file (included in release tarballs),
@@ -25,4 +26,14 @@ cur_ruby_version = File.read(RVF) rescue nil
25
26
  if new_ruby_version != cur_ruby_version
26
27
  File.open(RVF, "w") { |fp| fp.write(new_ruby_version) }
27
28
  end
29
+ File.chmod(0644, RVF)
30
+
31
+ # generate the makefile snippet
32
+ new_make_version = "GIT_VERSION = #{vn}\n"
33
+ cur_make_version = File.read(GVF) rescue nil
34
+ if new_make_version != cur_make_version
35
+ File.open(GVF, "w") { |fp| fp.write(new_make_version) }
36
+ end
37
+ File.chmod(0644, GVF)
38
+
28
39
  puts vn if $0 == __FILE__
@@ -0,0 +1,3 @@
1
+ /data
2
+ /news
3
+ /requests
@@ -0,0 +1,4 @@
1
+ # group_name max expire headers_only
2
+ gmane.comp.lang.ruby.kcar.general 1000000000 1000000000 0
3
+
4
+ # usage: slrnpull -d $PWD -h news.gmane.org --no-post
@@ -19,7 +19,7 @@ class Kcar::Parser
19
19
  value.split(/\s*,+\s*/).each do |k|
20
20
  t[k] = true
21
21
  end
22
- elsif false == t.empty? && key =~ /\A(#{t.keys.join('|')})\z/i
22
+ elsif !t.empty? && key =~ /\A(#{t.keys.join('|')})\z/i
23
23
  k = $1
24
24
  trailers.concat(value.split(/\n+/).map! { |v| [ k, v ] })
25
25
  end
@@ -7,8 +7,6 @@ class Kcar::Response
7
7
  attr_accessor :sock, :hdr, :unchunk, :buf, :parser
8
8
 
9
9
  # :stopdoc:
10
- LAST_CHUNK = "0\r\n"
11
- CRLF = "\r\n"
12
10
  Parser = Kcar::Parser
13
11
  # :startdoc:
14
12
 
@@ -91,12 +89,12 @@ class Kcar::Response
91
89
  size = dst.size
92
90
  if size > 0
93
91
  yield("#{size.to_s(16)}\r\n")
94
- yield(dst << CRLF)
92
+ yield(dst << "\r\n".freeze)
95
93
  end
96
94
  break if @parser.body_eof?
97
95
  end while @buf << @sock.readpartial(READ_SIZE, dst)
98
96
 
99
- yield LAST_CHUNK
97
+ yield "0\r\n".freeze
100
98
 
101
99
  until @parser.trailers(@hdr, @buf)
102
100
  @buf << @sock.readpartial(READ_SIZE, dst)
@@ -106,7 +104,7 @@ class Kcar::Response
106
104
  # in the response, we'll just yield a stringified version to our
107
105
  # server and pretend it's part of the body.
108
106
  trailers = @parser.extract_trailers(@hdr)
109
- yield(trailers.map! { |k,v| "#{k}: #{v}\r\n" }.join << CRLF)
107
+ yield(trailers.map! { |k,v| "#{k}: #{v}\r\n" }.join << "\r\n".freeze)
110
108
  end
111
109
 
112
110
  def each_until_eof
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kcar hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-14 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: olddoc
@@ -69,6 +69,8 @@ files:
69
69
  - LICENSE
70
70
  - NEWS
71
71
  - README
72
+ - archive/.gitignore
73
+ - archive/slrnpull.conf
72
74
  - ext/kcar/c_util.h
73
75
  - ext/kcar/ext_help.h
74
76
  - ext/kcar/extconf.rb
@@ -105,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
107
  version: '0'
106
108
  requirements: []
107
109
  rubyforge_project:
108
- rubygems_version: 2.4.5
110
+ rubygems_version: 2.5.0
109
111
  signing_key:
110
112
  specification_version: 4
111
113
  summary: bytestream to Rack response converter