Pete [Sat, 13 Jul 2024 19:17:46 +0000 (12:17 -0700)]
Update the tests for the Rack change.
Pete [Sun, 7 Jul 2024 05:57:50 +0000 (22:57 -0700)]
Rack::Lint stopped accepting canonical header case.
Some time in the last few years, Rack::Lint started requiring header
names to be lower-case rather than the canonical case used by every
web server and user agent, the same case style used in the RFCs, all
documentation everywhere, since the 1990s. For the mandatory lower-
case in HTTP/2, they still have to convert it to be compliant, but
that is for the sake of the compression algorithm (imagine sending
so many headers that you feel the need to compress them), which is
to say that forcing lower-case is for machines, not people: HTTP/2
isn't even a plain-text protocol, so forcing the wire format into
the application programmer's lap is obtuse.
Pete [Sun, 7 Jul 2024 04:38:12 +0000 (21:38 -0700)]
Update the README. I think there are enough fixes in here that this should
probably be a release.
Pete [Sun, 7 Jul 2024 04:37:56 +0000 (21:37 -0700)]
Fix gem spec and install task.
It is gauche to invoke `sudo` in a Rakefile; @alrs told me about this about
a decade ago, but I appear not to have actually made the change.
Gem::Specification#has_rdoc is deprecated, so that has been removed.
Fun story: if you don't clean out the package directory, apparently
the package task will tell you something like this:
Gem::InvalidSpecificationException: ["doc/examples/return.ru"] are not files
Having been fairly certain it *was* a file, this was mystifying. So I walked
down the stack, but did not have to walk far, as the source of the error was
first: rubygems/specification_policy.rb:298. Using the Kernighan methodā±, I
noted that File.file?("doc/examples/return.ru") was returning false. I checked
that the method hadn't been monkey-patched, I checked the contents of the
directory, and the file wasn't there. I was squinting at the screen: I
double-checked the Rakefile, and it added every existing file under doc/ to
the list of files. Just a few minutes before, I had managed to get Ruby to
tell me `syntax error, unexpected '}\, expecting '}'` in response
to a typo, so I was starting to have some grave doubts about the ground under
my feet. At any rate, I am not certain why Gem::PackageTask does not pick up
new files but sometimes if the computer tells you a file does not exist, it
is correct.
Pete [Sun, 7 Jul 2024 04:17:16 +0000 (21:17 -0700)]
Add an HTTP method and compensate for more Rack changes.
I had somehow missed PATCH! That list was written in 2010; I think PATCH was not as
common back then. Still somewhat embarrassing.
Rack has also started getting upset if you return a bare Rack::Response, so we
call #to_a on it. That seems to work.
Pete [Sun, 7 Jul 2024 04:03:21 +0000 (21:03 -0700)]
Add an example clarifying expected return values.
Pete [Tue, 2 Jul 2024 17:06:16 +0000 (10:06 -0700)]
Update examples slightly.
Since adding the `res` alias, I don't ever use `resource`.
I don't think the longer name ends up any clearer, really
it's just a tree represented as a series of nested blocks
and getting the lengthy name out of the way removes a bit of
distraction.
Because the cost of maintaining compatibility is near-zero,
the `resource` name isn't going to go away, but I am also
still too chicken to add another alias that is just `r`.
Pete [Tue, 2 Jul 2024 17:00:58 +0000 (10:00 -0700)]
Call Rack::Response#to_a
Rack apparently no longer responds appropriately when given
an instance of Rack::Response for its return value, so this
fixes the test: calling .to_a transforms it into the familiar
[status_code,headers,[body]] format.
Pete Elmore [Sat, 6 Jan 2018 02:28:38 +0000 (18:28 -0800)]
This technically works, but is sub-optimal semantically.
Essentially, it allows Resource classes to inherit seamlessly, but only
if you write them in order. So, not *real* inheritance.
Pete Elmore [Wed, 12 Jul 2017 00:52:07 +0000 (17:52 -0700)]
Speedup.
The benchmark I've been using had Watts at 90% of the speed of bare Rack, but
now it is showing 95%.
This code is definitely faster (no tradeoff) but I should find another
benchmark to avoid hyperoptimizing.
Pete Elmore [Sat, 8 Jul 2017 22:07:25 +0000 (15:07 -0700)]
Version bump
Pete Elmore [Sat, 8 Jul 2017 18:39:06 +0000 (11:39 -0700)]
Test that out!
Pete Elmore [Sat, 8 Jul 2017 18:34:18 +0000 (11:34 -0700)]
Fix a bug, clean up a test case.
Pete Elmore [Wed, 5 Jul 2017 05:34:30 +0000 (22:34 -0700)]
Just another
useless
README
twiddle
sir
Pete Elmore [Wed, 5 Jul 2017 05:27:09 +0000 (22:27 -0700)]
Fix the abuse of backticks foisted upon the README by GFM.
Made the text read worse in the only environment that actually matters: the
text editor.
Pete Elmore [Wed, 5 Jul 2017 05:22:03 +0000 (22:22 -0700)]
I was kidding about the 'push -f' bit. But if GH's markdown does not render
a Gameboy sprite properly, it is entirely useless as a piece of software.
(Technically it's not the markdown processor but their CSS, which adds space
between the lines. Using their markdown syntax is lame for philosophical
reasons, but this is at least one practical reason.)
Pete Elmore [Wed, 5 Jul 2017 05:12:08 +0000 (22:12 -0700)]
Maybe if I anger Github enough, I'll come up with a way to get it to draw this
guy correctly.
Pete Elmore [Wed, 5 Jul 2017 05:05:13 +0000 (22:05 -0700)]
It absolutely butchers the carefully crafted (okay, *generated*) sprite,
and this might be an absolute dealbreaker.
Pete Elmore [Wed, 5 Jul 2017 05:00:05 +0000 (22:00 -0700)]
Let's see how terrible this is before I push -f it out of existence.
Pete Elmore [Wed, 5 Jul 2017 04:55:20 +0000 (21:55 -0700)]
Let's see how badly this renders on github as-is.
Pete Elmore [Wed, 5 Jul 2017 04:52:06 +0000 (21:52 -0700)]
Github does not like the equals signs; rdoc no longer seems to like my README.
True story: your markdown syntax matters less than how often you change it.
Pete Elmore [Wed, 5 Jul 2017 04:47:43 +0000 (21:47 -0700)]
Twiddle syntax uselessly.
Pete Elmore [Wed, 5 Jul 2017 04:47:25 +0000 (21:47 -0700)]
Watts needed Watts.
Pete Elmore [Tue, 1 Nov 2016 09:15:01 +0000 (02:15 -0700)]
Update the gemspec, and correct some braggin' slightly.
On a side note, I probably ought to move the spec out of the Rakefile. Old
codebases, man.
Pete Elmore [Tue, 1 Nov 2016 08:04:51 +0000 (01:04 -0700)]
...Could not resist.
Pete Elmore [Tue, 1 Nov 2016 08:01:06 +0000 (01:01 -0700)]
Doc cleanup, update copyright in doc/LICENSE.
Pete Elmore [Tue, 1 Nov 2016 07:52:41 +0000 (00:52 -0700)]
Document the new constants.
Pete Elmore [Tue, 1 Nov 2016 07:42:38 +0000 (00:42 -0700)]
All right, that puts us over at 94% coverage.
The only thing *not* covered is the extra "view class" stuff, which I actually
don't even use when I'm using Hoshi. It should probably be removed.
Pete Elmore [Tue, 1 Nov 2016 07:42:28 +0000 (00:42 -0700)]
Support code coverage in the tests.
Pete Elmore [Tue, 1 Nov 2016 07:16:11 +0000 (00:16 -0700)]
Flesh out the tests further.
Pete Elmore [Tue, 1 Nov 2016 07:15:00 +0000 (00:15 -0700)]
Fix a bug, and stop doing a bit of senseless work. Speculative changes.
Pete Elmore [Tue, 1 Nov 2016 07:10:03 +0000 (00:10 -0700)]
rm useless .gitignore files, from an era where they made sense.
This repo is seven years old. git was younger.
Pete Elmore [Tue, 1 Nov 2016 05:44:29 +0000 (22:44 -0700)]
A few minor performance enhancements.
Pete Elmore [Tue, 15 Mar 2016 06:06:40 +0000 (23:06 -0700)]
Minor doc changes that have been sitting around, uncommitted, for a while.
Pete Elmore [Mon, 8 Sep 2014 01:44:26 +0000 (18:44 -0700)]
resource() is verbose to the point of being distracting for large apps.
(I don't like to make large apps, but sometimes I have to.)
Pete Elmore [Mon, 8 Sep 2014 01:30:15 +0000 (18:30 -0700)]
A readme change. I can't believe how long that sat there.
Just because it goes a while between updates doesn't mean it's abandoned,
by the way. It might just mean that it doesn't have any known bugs and that
its maintainer, who uses it in production, prefers to avoid design decisions
that he will regret. :)
Pete Elmore [Fri, 9 Nov 2012 00:30:01 +0000 (16:30 -0800)]
Somewhat better for symbols.
Pete Elmore [Thu, 25 Oct 2012 02:51:56 +0000 (19:51 -0700)]
Bump the version post-tag.
Pete Elmore [Thu, 25 Oct 2012 02:05:45 +0000 (19:05 -0700)]
No more metaid dependency, fix a path-generation bug.
Pete Elmore [Tue, 28 Aug 2012 20:23:08 +0000 (13:23 -0700)]
D:<
Pete Elmore [Tue, 21 Aug 2012 06:54:54 +0000 (23:54 -0700)]
Starting on 1.0.2!
Pete Elmore [Tue, 21 Aug 2012 06:52:14 +0000 (23:52 -0700)]
Forgot to bump the version. Math is hard, let's go shopping.
Pete Elmore [Tue, 21 Aug 2012 06:51:06 +0000 (23:51 -0700)]
Well, that was easy.
Pete Elmore [Tue, 21 Aug 2012 06:46:06 +0000 (23:46 -0700)]
So...this test fails. Time to untorture some logic.
Pete Elmore [Mon, 25 Jun 2012 19:08:40 +0000 (12:08 -0700)]
Whoops, this was in the gem but not the git.
Pete Elmore [Sun, 24 Jun 2012 00:47:23 +0000 (17:47 -0700)]
Screw you, deprication warning, I require() what I want!
Pete Elmore [Sun, 24 Jun 2012 00:45:47 +0000 (17:45 -0700)]
I call it 1.0. I don't even care.
Pete Elmore [Sun, 24 Jun 2012 00:43:28 +0000 (17:43 -0700)]
Fix a bug with dups in Allow:, add auto_head.
Pete Elmore [Sun, 24 Jun 2012 00:42:25 +0000 (17:42 -0700)]
Whoops...I added a test and realized that this Rakefile wouldn't run it.
Pete Elmore [Mon, 1 Aug 2011 20:34:03 +0000 (13:34 -0700)]
Bump the version number.
Pete Elmore [Mon, 1 Aug 2011 20:32:56 +0000 (13:32 -0700)]
TODO has an entry.
Pete Elmore [Mon, 1 Aug 2011 20:13:32 +0000 (13:13 -0700)]
Change the examples to .ru files.
Pete Elmore [Mon, 1 Aug 2011 20:02:46 +0000 (13:02 -0700)]
Those should've been rackup files.
Pete Elmore [Thu, 17 Mar 2011 00:33:09 +0000 (17:33 -0700)]
Turns out you are supposed to return a 501. RFC2616, 10.5.2:
The server does not support the functionality required to fulfill the
request. This is the appropriate response when the server does not
recognize the request method and is not capable of supporting it for
any resource.
Pete Elmore [Tue, 15 Mar 2011 23:52:41 +0000 (16:52 -0700)]
Rackup file; makes it easier to test. May convert other examples.
Pete Elmore [Tue, 15 Mar 2011 23:51:26 +0000 (16:51 -0700)]
Version bump.
Pete Elmore [Tue, 15 Mar 2011 23:49:51 +0000 (16:49 -0700)]
Fix reliance on a deprecated rack variable!
(cf. http://rack.rubyforge.org/doc/SPEC.html )
Pete Elmore [Fri, 11 Mar 2011 02:16:54 +0000 (18:16 -0800)]
Version bump.
Pete Elmore [Fri, 11 Mar 2011 02:12:50 +0000 (18:12 -0800)]
Adding two features ahead of LARuby Meetup in...48 minutes. I am a cowboy.
Pete Elmore [Thu, 10 Mar 2011 05:06:44 +0000 (21:06 -0800)]
Fix a couple of other length/bytesize issues, and make Rack::Lint stop bitching.
Pete Elmore [Thu, 3 Mar 2011 00:20:30 +0000 (16:20 -0800)]
Bump version to 0.0.5.
Pete Elmore [Thu, 3 Mar 2011 00:18:43 +0000 (16:18 -0800)]
That is damned embarassing.
Pete Elmore [Fri, 28 Jan 2011 03:17:02 +0000 (19:17 -0800)]
Version bump: on time this time.
Pete Elmore [Fri, 28 Jan 2011 03:15:50 +0000 (19:15 -0800)]
Update the readme while I'm here...
Pete Elmore [Fri, 28 Jan 2011 03:10:27 +0000 (19:10 -0800)]
Path generation. Watts bloats up to 311 lines and has tests.
Pete Elmore [Fri, 28 Jan 2011 03:09:22 +0000 (19:09 -0800)]
Version bump.
Pete Elmore [Fri, 28 Jan 2011 03:07:38 +0000 (19:07 -0800)]
Ignore generated rdoc.
Pete Elmore [Wed, 2 Jun 2010 04:25:31 +0000 (21:25 -0700)]
Let's also do that for plain responses.
Pete Elmore [Wed, 2 Jun 2010 04:22:52 +0000 (21:22 -0700)]
Set a content length for views. I wanted to see how much HTML I was actually
generating.
Pete Elmore [Tue, 1 Jun 2010 22:26:00 +0000 (15:26 -0700)]
Rack wants something that yields strings in response to #each. Lessons learned!
Pete Elmore [Tue, 1 Jun 2010 21:56:36 +0000 (14:56 -0700)]
Bump to 0.0.2.
Pete Elmore [Tue, 1 Jun 2010 21:28:31 +0000 (14:28 -0700)]
I just use 'tmp/' as an excuse to make a mess all over my hard drive.
Pete Elmore [Tue, 1 Jun 2010 21:19:59 +0000 (14:19 -0700)]
Enhancement.
Pete Elmore [Tue, 1 Jun 2010 21:19:45 +0000 (14:19 -0700)]
Update the examples' README.
Pete Elmore [Tue, 1 Jun 2010 21:11:58 +0000 (14:11 -0700)]
I suppose I should mention this somewhere.
Pete Elmore [Tue, 1 Jun 2010 20:41:49 +0000 (13:41 -0700)]
I can never remember that formatting.
Pete Elmore [Tue, 1 Jun 2010 20:39:50 +0000 (13:39 -0700)]
Yeah, that should probably be documented.
Pete Elmore [Tue, 1 Jun 2010 20:23:22 +0000 (13:23 -0700)]
It stopped making sense.
Pete Elmore [Tue, 1 Jun 2010 20:22:57 +0000 (13:22 -0700)]
A mystery.
Pete Elmore [Tue, 1 Jun 2010 20:17:53 +0000 (13:17 -0700)]
Well, I tell you, it's not in doc/.
Pete Elmore [Tue, 1 Jun 2010 20:17:36 +0000 (13:17 -0700)]
WHERE IS YOUR README NOW
Pete Elmore [Tue, 1 Jun 2010 20:17:20 +0000 (13:17 -0700)]
It had been bugging me...because it was a bug.
Pete Elmore [Tue, 1 Jun 2010 19:04:53 +0000 (12:04 -0700)]
That was a fun one.
Pete Elmore [Tue, 1 Jun 2010 19:04:43 +0000 (12:04 -0700)]
Okay, here you go.
Pete Elmore [Tue, 1 Jun 2010 19:04:34 +0000 (12:04 -0700)]
BUGS!
Pete Elmore [Tue, 1 Jun 2010 05:35:53 +0000 (22:35 -0700)]
Two simple examples.
Pete Elmore [Tue, 1 Jun 2010 05:27:40 +0000 (22:27 -0700)]
Documentate.
Pete Elmore [Tue, 1 Jun 2010 04:37:07 +0000 (21:37 -0700)]
Set a year in the license.
Pete Elmore [Tue, 1 Jun 2010 04:02:54 +0000 (21:02 -0700)]
Added dumb-simple support for HTML view classes, moved method dispatch logic,
tiny cleanings-up, and it's still not 200 lines.
Pete Elmore [Mon, 31 May 2010 10:29:19 +0000 (03:29 -0700)]
You will need.
Pete Elmore [Mon, 31 May 2010 10:05:25 +0000 (03:05 -0700)]
Fix that.
Pete Elmore [Mon, 31 May 2010 07:45:20 +0000 (00:45 -0700)]
And here you have it. A framework that doesn't even exist.
Pete Elmore [Mon, 31 May 2010 07:45:02 +0000 (00:45 -0700)]
Specificify the rack file.
Pete Elmore [Fri, 7 May 2010 21:59:29 +0000 (14:59 -0700)]
New email...again.
Pete Elmore [Fri, 7 May 2010 21:58:42 +0000 (14:58 -0700)]
Github doesn't even do that any more.
Pete Elmore [Fri, 7 May 2010 21:58:19 +0000 (14:58 -0700)]
A new email for the ages.
Pete Elmore [Fri, 24 Jul 2009 19:10:55 +0000 (12:10 -0700)]
Ignore the pkg directory.
Pete Elmore [Fri, 6 Mar 2009 01:56:19 +0000 (17:56 -0800)]
Yeah...
Pete Elmore [Wed, 28 Jan 2009 23:57:19 +0000 (15:57 -0800)]
Adding an IRB task.
Pete Elmore [Wed, 14 Jan 2009 21:31:16 +0000 (13:31 -0800)]
Some Rakefile changes to install proper versions of gems and to generate rdoc.