yahns Ruby server user/dev discussion
 help / color / Atom feed
* [PATCH 0/4] documentation cleanups and tidying
@ 2017-03-05 22:29 Eric Wong
  2017-03-05 22:29 ` [PATCH 1/4] update more referenced URLs to be HTTPS Eric Wong
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Wong @ 2017-03-05 22:29 UTC (permalink / raw)
  To: yahns-public

Eric Wong (4):
      update more referenced URLs to be HTTPS
      chunk_body: nodoc this internal class
      Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
      gemspec: stop advertising "private" email address

 .gitignore                     |   1 -
 .olddoc.yml                    |   7 ---
 Documentation/yahns-rackup.pod |   2 +-
 Documentation/yahns_config.pod |   4 +-
 HACKING                        |  13 +++---
 README                         |   2 +-
 Rakefile                       | 101 +++++++++++++++++++++++++++++++++++++++--
 examples/logrotate.conf        |   2 +-
 lib/yahns/chunk_body.rb        |   3 +-
 yahns.gemspec                  |   2 +-
 10 files changed, 112 insertions(+), 25 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] update more referenced URLs to be HTTPS
  2017-03-05 22:29 [PATCH 0/4] documentation cleanups and tidying Eric Wong
@ 2017-03-05 22:29 ` Eric Wong
  2017-03-05 22:30 ` [PATCH 2/4] chunk_body: nodoc this internal class Eric Wong
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2017-03-05 22:29 UTC (permalink / raw)
  To: yahns-public

HTTPS provides some security against spying and MitM attacks,
so refer users to HTTPS sites, instead.
---
 Documentation/yahns-rackup.pod |  2 +-
 Documentation/yahns_config.pod |  4 ++--
 HACKING                        | 10 +++++-----
 README                         |  2 +-
 examples/logrotate.conf        |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/yahns-rackup.pod b/Documentation/yahns-rackup.pod
index bd10efc..3fbde0e 100644
--- a/Documentation/yahns-rackup.pod
+++ b/Documentation/yahns-rackup.pod
@@ -168,7 +168,7 @@ List archives are available at L<https://yhbt.net/yahns-public/>
 =head1 COPYRIGHT
 
 Copyright (C) 2013-2016 all contributors L<mailto:yahns-public@yhbt.net>
-License: GPL-3.0+ L<http://www.gnu.org/licenses/gpl-3.0.txt>
+License: GPL-3.0+ L<https://www.gnu.org/licenses/gpl-3.0.txt>
 
 =head1 SEE ALSO
 
diff --git a/Documentation/yahns_config.pod b/Documentation/yahns_config.pod
index 8fb1608..9558d3d 100644
--- a/Documentation/yahns_config.pod
+++ b/Documentation/yahns_config.pod
@@ -427,7 +427,7 @@ To enable TLS connections, you must configure this yourself.
 See documentation for OpenSSL::SSL::SSLContext
 for more information:
 
-L<http://docs.ruby-lang.org/en/trunk/OpenSSL/SSL/SSLContext.html>
+L<https://docs.ruby-lang.org/en/trunk/OpenSSL/SSL/SSLContext.html>
 
 Default: none
 
@@ -667,7 +667,7 @@ List archives are available at L<https://yhbt.net/yahns-public/>
 =head1 COPYRIGHT
 
 Copyright (C) 2013-2016 all contributors L<mailto:yahns-public@yhbt.net>
-License: GPL-3.0+ L<http://www.gnu.org/licenses/gpl-3.0.txt>
+License: GPL-3.0+ L<https://www.gnu.org/licenses/gpl-3.0.txt>
 
 =head1 SEE ALSO
 
diff --git a/HACKING b/HACKING
index e9a2b76..d0485c4 100644
--- a/HACKING
+++ b/HACKING
@@ -2,12 +2,12 @@ development dependencies
 ------------------------
 
 * minitest RubyGem (version 4 or 5, standard in Ruby 2.0+)
-* curl - http://curl.haxx.se/ - we don't trust our own Ruby abilities :>
+* curl - https://curl.haxx.se/ - we don't trust our own Ruby abilities :>
 * dd(1) - standard POSIX tool - to feed curl
-* ab - http://httpd.apache.org/ - for concurrent testing
+* ab - https://httpd.apache.org/ - for concurrent testing
 * GNU make - https://www.gnu.org/software/make/
-* git - http://www.git-scm.com/
-* ruby - http://www.ruby-lang.org/en/
+* git - https://www.git-scm.com/
+* ruby - https://www.ruby-lang.org/en/
 
 	git clone git://yhbt.net/yahns
 
@@ -52,4 +52,4 @@ No subscription is necessary to post to the mailing list.
 Please remember to Cc: all recipients as subscription is optional.
 
 Copyright (C) 2013-2016 all contributors <yahns-public@yhbt.net>
-License: GPL-3.0+ <http://www.gnu.org/licenses/gpl-3.0.txt>
+License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
diff --git a/README b/README
index 2b15cba..349b028 100644
--- a/README
+++ b/README
@@ -88,7 +88,7 @@ the git(7) suite for generating and sending patches.  Please format
 pull requests with the git-request-pull(1) script (also distributed
 with git(7)) and send them via email.
 
-See http://www.git-scm.com/ for more information on git.
+See https://www.git-scm.com/ for more information on git.
 
 Design
 ------
diff --git a/examples/logrotate.conf b/examples/logrotate.conf
index b0d1351..1fd92d0 100644
--- a/examples/logrotate.conf
+++ b/examples/logrotate.conf
@@ -5,7 +5,7 @@
 # /etc/logrotate.d/yahns_app on my Debian systems
 #
 # See the logrotate(8) manpage for more information:
-#    http://linux.die.net/man/8/logrotate
+#    https://linux.die.net/man/8/logrotate
 
 # Modify the following glob to match the logfiles your app writes to:
 /var/log/yahns_app/*.log {
-- 
EW


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/4] chunk_body: nodoc this internal class
  2017-03-05 22:29 [PATCH 0/4] documentation cleanups and tidying Eric Wong
  2017-03-05 22:29 ` [PATCH 1/4] update more referenced URLs to be HTTPS Eric Wong
@ 2017-03-05 22:30 ` Eric Wong
  2017-03-05 22:30 ` [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml" Eric Wong
  2017-03-05 22:30 ` [PATCH 4/4] gemspec: stop advertising "private" email address Eric Wong
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2017-03-05 22:30 UTC (permalink / raw)
  To: yahns-public

Although we do not publish RDoc-generated documentation on our
website, other places may, an people use ri(1) locally.
---
 lib/yahns/chunk_body.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/yahns/chunk_body.rb b/lib/yahns/chunk_body.rb
index 6e56a18..aab803b 100644
--- a/lib/yahns/chunk_body.rb
+++ b/lib/yahns/chunk_body.rb
@@ -2,7 +2,8 @@
 # Copyright (C) 2016 all contributors <yahns-public@yhbt.net>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 # frozen_string_literal: true
-class Yahns::ChunkBody
+
+class Yahns::ChunkBody # :nodoc:
   def initialize(body, vec)
     @body = body
     @vec = vec
-- 
EW


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
  2017-03-05 22:29 [PATCH 0/4] documentation cleanups and tidying Eric Wong
  2017-03-05 22:29 ` [PATCH 1/4] update more referenced URLs to be HTTPS Eric Wong
  2017-03-05 22:30 ` [PATCH 2/4] chunk_body: nodoc this internal class Eric Wong
@ 2017-03-05 22:30 ` Eric Wong
  2017-03-05 22:30 ` [PATCH 4/4] gemspec: stop advertising "private" email address Eric Wong
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2017-03-05 22:30 UTC (permalink / raw)
  To: yahns-public

This reverts commit bcf0f0efb3173b18957ddba2af6592219a2d72a3.

The dependency on olddoc makes it slightly more difficult for
users to package their own and distribute RubyGems.  We will
also not host HTML RDoc files since we have no internal API
to support.
---
 .gitignore  |   1 -
 .olddoc.yml |   7 -----
 Rakefile    | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 97 insertions(+), 12 deletions(-)
 delete mode 100644 .olddoc.yml

diff --git a/.gitignore b/.gitignore
index c1c147f..45603bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,3 @@
 .gem-manifest
 .tgz-manifest
 /doc
-/LATEST
diff --git a/.olddoc.yml b/.olddoc.yml
deleted file mode 100644
index 67b78d0..0000000
--- a/.olddoc.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-cgit_url: https://yhbt.net/yahns.git
-git_url: git://yhbt.net/yahns.git
-rdoc_url: https://yhbt.net/yahns/
-ml_url: https://yhbt.net/yahns-public/
-public_email: yahns-public@yhbt.net
-private_email: yahns@yhbt.net
diff --git a/Rakefile b/Rakefile
index b776c4a..3eb0219 100644
--- a/Rakefile
+++ b/Rakefile
@@ -66,12 +66,105 @@ def tags
   end.compact.sort { |a,b| b[:time] <=> a[:time] }
 end
 
+def xml(dst, tag, text = nil, attrs = nil)
+  if Hash === text
+    attrs = text
+    text = nil
+  end
+  if attrs
+    attrs = attrs.map { |k,v| "#{k}=#{v.encode(xml: :attr)}" }
+    attrs = "\n#{attrs.join("\n")}"
+  end
+  case text
+  when nil
+    if block_given?
+      dst << "<#{tag}#{attrs}>"
+      yield
+      dst << "</#{tag}>"
+    else
+      dst << "<#{tag}#{attrs}/>"
+    end
+  else
+    dst << "<#{tag}#{attrs}>#{text.encode(xml: :text)}</#{tag}>"
+  end
+end
+
 desc 'prints news as an Atom feed'
 task "NEWS.atom.xml" do
-  # gem install 'olddoc', 'olddoc prepare' has no API besides the
-  # command-line.  This requires olddoc 1.1 or later.
-  system('olddoc', 'prepare') or abort "olddoc prepare failed #$?"
+  require 'uri'
+  cgit_uri = URI('https://yhbt.net/yahns.git')
+  uri = URI('https://yhbt.net/yahns/')
+  new_tags = tags[0,10]
+  time = nil
+  project_name = 'yahns'
+  short_desc = File.readlines('README')[0].split(' - ')[0]
+  new_tags = tags[0,10]
+  atom_uri = uri.dup
+  atom_uri.path += 'NEWS.atom.xml'
+  news_uri = uri.dup
+  news_uri.path += 'NEWS.html'
+  dst = ''
+  xml(dst, 'feed', xmlns: 'http://www.w3.org/2005/Atom') do
+    xml(dst, 'id', atom_uri.to_s)
+    xml(dst, 'title', "#{project_name} news")
+    xml(dst, 'subtitle', short_desc)
+    xml(dst, 'link', rel: 'alternate', type: 'text/html', href: news_uri.to_s)
+    xml(dst, 'updated', new_tags.empty? ? '1970-01-01:00:00:00Z'
+                                      : new_tags[0][:time])
+    new_tags.each do |tag|
+      xml(dst, 'entry') do
+        xml(dst, 'title', tag[:subject])
+        xml(dst, 'updated', tag[:time])
+        xml(dst, 'published', tag[:time])
+        xml(dst, 'author') do
+          xml(dst, 'name', tag[:tagger_name])
+          xml(dst, 'email', tag[:tagger_email])
+        end
+        uri = cgit_uri.dup
+        uri.path += '/tag/'
+        uri.query = "id=#{tag[:tag]}"
+        uri = uri.to_s
+        xml(dst, 'link', rel: 'alternate', type: 'text/html', href: uri)
+        xml(dst, 'id', uri)
+        xml(dst, 'content', type: 'xhtml') do
+          xml(dst, 'div', xmlns: 'http://www.w3.org/1999/xhtml') do
+            xml(dst, 'pre', tag[:body])
+          end # div
+        end # content
+      end # entry
+    end # new_tags.each
+  end # feed
+
+  fp = Tempfile.new('NEWS.atom.xml', '.')
+  fp.sync = true
+  fp.write(dst)
+  fp.chmod 0644
+  File.utime(time, time, fp.path) if time
+  File.rename(fp.path, 'NEWS.atom.xml')
+  fp.close!
 end
 
 desc 'prints news as a text file'
-task 'NEWS' => 'NEWS.atom.xml'
+task 'NEWS' do
+  fp = Tempfile.new('NEWS', '.')
+  fp.sync = true
+  time = nil
+  tags.each do |tag|
+    time ||= tag[:time_obj]
+    line = tag[:subject] + ' / ' + tag[:time].sub(/T.*/, '')
+    fp.puts line
+    fp.puts('-' * line.length)
+    fp.puts
+    fp.puts tag[:body]
+    fp.puts
+  end
+  fp.write("Unreleased\n\n") unless fp.size > 0
+  fp.puts "COPYRIGHT"
+  fp.puts "---------"
+  fp.puts "Copyright (C) 2013-2017 all contributors <yahns-public@yhbt.net>"
+  fp.puts "License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>"
+  fp.chmod 0644
+  File.utime(time, time, fp.path) if time
+  File.rename(fp.path, 'NEWS')
+  fp.close!
+end
-- 
EW


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 4/4] gemspec: stop advertising "private" email address
  2017-03-05 22:29 [PATCH 0/4] documentation cleanups and tidying Eric Wong
                   ` (2 preceding siblings ...)
  2017-03-05 22:30 ` [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml" Eric Wong
@ 2017-03-05 22:30 ` Eric Wong
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2017-03-05 22:30 UTC (permalink / raw)
  To: yahns-public

Anonymity is a job for the users sending the mail; lets not hold
ourselves unnecessarily accountable for anonymizing or hiding
messages.
---
 HACKING       | 3 ++-
 yahns.gemspec | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/HACKING b/HACKING
index d0485c4..cf6c660 100644
--- a/HACKING
+++ b/HACKING
@@ -47,7 +47,8 @@ developers do.  Please send patches via git-send-email(1) to the public
 mailing list at <yahns-public@yhbt.net>.  Pull requests should be
 formatted using git-request-pull(1).
 
-Mailing list archives: https://yhbt.net/yahns-public/
+All mail is archived publically at: https://yhbt.net/yahns-public/
+Anonymous contributions will always be welcome.
 No subscription is necessary to post to the mailing list.
 Please remember to Cc: all recipients as subscription is optional.
 
diff --git a/yahns.gemspec b/yahns.gemspec
index 0ac394c..31eb957 100644
--- a/yahns.gemspec
+++ b/yahns.gemspec
@@ -7,7 +7,7 @@
   s.authors = ["yahns hackers"]
   s.summary = "sleepy, multi-threaded, non-blocking application server"
   s.description = File.read("README").split(/\n\n/)[1].strip
-  s.email = %q{yahns@yhbt.net}
+  s.email = %q{yahns-public@yhbt.net}
   s.executables = manifest.grep(%r{\Abin/}).map { |s| s.sub(%r{\Abin/}, "") }
   s.files = manifest
   s.add_dependency(%q<kgio>, '~> 2.9')
-- 
EW


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-05 22:29 [PATCH 0/4] documentation cleanups and tidying Eric Wong
2017-03-05 22:29 ` [PATCH 1/4] update more referenced URLs to be HTTPS Eric Wong
2017-03-05 22:30 ` [PATCH 2/4] chunk_body: nodoc this internal class Eric Wong
2017-03-05 22:30 ` [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml" Eric Wong
2017-03-05 22:30 ` [PATCH 4/4] gemspec: stop advertising "private" email address Eric Wong

yahns Ruby server user/dev discussion

Archives are clonable:
	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox