Wincent Colaiuta [Fri, 1 Jan 2016 15:23:46 +0000 (16:23 +0100)]
Update to Ruby 2.3.0 for development purposes
Note that I also switched to using chruby/ruby-install in order to get
2.3.0 on the system, and that doesn't play nicely with these Bundler
bin-stubs, so I had to rip those out in favor of explicit `bundle exec`
invocations.
Wincent Colaiuta [Mon, 14 Dec 2015 08:00:59 +0000 (00:00 -0800)]
Use --one-file mode in YARD to sidestep link issues
Relative paths in the generated docs are freaking out in combination
with my current nginx config. Jam it all in one file completely avoids
the problem, at a minor cost, so let's do it.
Change or remove all references to Wincent Colaiuta. Update the
copyright year ranges (and switch to "-present" to make them a little
more future-proof). Remove the donations section.
Wincent Colaiuta [Tue, 14 Jan 2014 01:58:42 +0000 (20:58 -0500)]
Apply some stylistic fixes
Included here:
- add missing # on blank lines in license comments
- switch to Ruby 1.9+ hash syntax (we dropped 1.8 support long ago)
- uphold convention of commenting `end` lines for modules and classes
- use parens around method param list declarations
Wincent Colaiuta [Tue, 14 Jan 2014 01:44:04 +0000 (20:44 -0500)]
Drop code that only existed to support Rails 2
We dropped support for Rails 2 back in the 3.0b release, so there is no
need to keep this crud lying around.
If somebody attempts to use the Gem with Rails 2, it should explode with
a NoMethodError when we call ActiveSupport.on_load(:action_view), which
seems fair enough.
Wincent Colaiuta [Tue, 19 Mar 2013 05:19:30 +0000 (22:19 -0700)]
Fix bad paths in gemspec
Looks like the 4.0.1 release was entirely busted due to commit fcefbd9.
Hadn't exposed this in manual tested on my local development machine or
remotely.
Wincent Colaiuta [Wed, 27 Feb 2013 08:37:46 +0000 (00:37 -0800)]
Attempted fix for build issues on Linux with RubyGems 2.0.0
On Linux the build is failing with:
make install
/usr/bin/install -c -m 0755 wikitext.so /data/shared/bundle/ruby/2.0.0/gems/wikitext-4.0/ext
/usr/bin/install: `wikitext.so' and `/data/shared/bundle/ruby/2.0.0/gems/wikitext-4.0/ext/wikitext.so' are the same file
Wincent Colaiuta [Wed, 27 Feb 2013 05:22:45 +0000 (21:22 -0800)]
Various fixes for Ruby 2.0.0 compatibility
- switch Gemfile source from :gemcutter to 'https://rubygems.org'
(silences security warnings)
- bump version number prior to 4.0.0 release
- drop unnecessary `encoding` magic comments from source files
- drop support for versions of Ruby < 2.0.0
- make sure string_from_str() returns a string that is marked as UTF-8
encoded; otherwise a string marked as "ASCII-8BIT" will be returned
and string comparisons will fail; this was noticed due to the
breakage of the "redlink" specs which were failing otherwise
- drop references to now-dead iconv
- swap some `proc` for `Proc.new`
- swap some `lambda` for `expect` in the spec suite; this is not
merely cosmetic as the LocalJumpError tests were failing without it
- drop some "should" from `it` descriptions in the spec suite
- loosen brittle TypeError assertions in spec suite which would
otherwise have failed (the error message has changed since 1.9.x)
- always use a space after a comma separating arguments
- replace `not` and `or` with `!` and `!!`
- use `__dir__` in lieu of `File.dirname(__FILE__)`
- update copyright year ranges in touched files
- update docs prior to release
Wincent Colaiuta [Sat, 16 Feb 2013 19:51:23 +0000 (11:51 -0800)]
Silence a Clang warning about use of an uninitialized variable
parser.c:350:14: warning: variable 'dest' is used uninitialized whenever 'if' condition is false
else if ((src[0] & 0xf8) == 0xf0)
^~~~~~~~~~~~~~~~~~~~~~~
parser.c:375:12: note: uninitialized use occurs here
return dest;
^~~~
parser.c:350:10: note: remove the 'if' if its condition is always true
else if ((src[0] & 0xf8) == 0xf0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
parser.c:307:18: note: initialize the variable 'dest' to silence this warning
uint32_t dest;
^
= 0
In this case the warning is spurious (the `else` branch raises an
exception, so it is not possible for `dest` to be used unuinitialized).
But Clang doesn't know that, so keep it happy by initializing the
variable every time.
Wincent Colaiuta [Thu, 29 Nov 2012 07:50:56 +0000 (23:50 -0800)]
Simplify Wikitext_parser_sanitize_link_target
Commit 778839e made the wiki_append_sanitized_link_target function more
flexible by making it accept a str_t instead of a parser_t. This in turn
means that we can simplify the Wikitext_parser_sanitize_link_target
function; it can deal with a str_t directly rather than working with a
throwaway parser_t.
Wincent Colaiuta [Thu, 29 Nov 2012 07:46:30 +0000 (23:46 -0800)]
Teach wiki_append_sanitized_link_target to take a str_t
Rather than passing in a parser_t and assuming the text we want to
operate on is the one in the struct, pass in the link target str_t
explicitly. This added flexibility will make the
wiki_append_sanitized_link_target function suitable for wider use, which
I am presently going to do in order to fix a bug.
Wincent Colaiuta [Sun, 4 Mar 2012 00:25:21 +0000 (16:25 -0800)]
Allow email addresses inside external link text
Previously we allowed:
[mailto:user@example.com text]
but dealt poorly with:
[mailto:user@example.com user@example.com]
While that might seem like a contrived example (because you could
dispense with the explicit external link entirely and instead rely on
the standard auto-linkification) it also meant that we couldn't handle
perfectly reasonable and useful input like:
[mailto:user@example.com contact me at user@example.com for info]
Note the problem wasn't just limited to URIs with the "mailto:" schema;
we also choked on stuff like:
[http://google.com/?q=user@example.com Google for user@example.com]
Wincent Colaiuta [Sat, 28 May 2011 07:24:20 +0000 (00:24 -0700)]
Bump version number for 3.0b release
Bumpig the major version number here because this is a
compatibility-breaking release (supporting only Rails 3.1.0 and above).
As Rails 3.1.0 isn't finalized yet, marking this one as a beta, as other
tweaks may be required by the time Rails 3.1.0 goes final.
Wincent Colaiuta [Sat, 28 May 2011 07:12:29 +0000 (00:12 -0700)]
Rename spec/trash -> spec/.trash
This has a number of benefits:
- things which search (like Command-T and ack) won't waste time
looking at the enormous quantity of stuff that accumulates in the
trash dir
- RSpec won't try to run stuff buried deep down inside the trash dir,
almost certainly breaking
Wincent Colaiuta [Sat, 28 May 2011 06:07:12 +0000 (23:07 -0700)]
Drop support for Rails 3.0.x
In the interests of moving forward, older versions of Rails will
continue to be supported with the last Wikitext release (2.1.1, 2.1.x),
but the current version will only support Rails 3.1.0 and above.
Wincent Colaiuta [Sat, 28 May 2011 05:48:26 +0000 (22:48 -0700)]
Avoid another Rails 3.1 deprecation warning
Specifically:
DEPRECATION WARNING: Including Compilable in your template handler is
deprecated. Since Rails 3, all the API your template handler needs to
implement is to respond to #call.
Wincent Colaiuta [Sat, 28 May 2011 05:45:03 +0000 (22:45 -0700)]
Avoid a Rails 3.1 deprecation warning
Specifically:
DEPRECATION WARNING: Inheriting from ActionView::Template::Handler is
deprecated. Since Rails 3, all the API your template handler needs to
implement is to respond to #call.
Wincent Colaiuta [Sun, 15 May 2011 23:36:40 +0000 (16:36 -0700)]
Manage Arel version as well when setting up Rails test apps
This gets the spec suite passing in a hopefully robust and independent,
"bundlerized" way, for Rails version 3.0.1 through 3.0.7. It even works
on the current "Edge" Rails.
Wincent Colaiuta [Sun, 15 May 2011 19:53:02 +0000 (12:53 -0700)]
More attempts at getting Bundlerized test Rails app working
Trying with the latest Bundler (1.0.13) and RubyGems (1.8.2) I see the
test environment also winds up with GEM_PATH and GEM_HOME set, so be a
little more careful about how we clean the environment (note that before
we were going too far, cleaning the entire environment). We now clean
any environment variables starting with GEM_ or BUNDLE_.
Wincent Colaiuta [Sun, 15 May 2011 04:15:22 +0000 (21:15 -0700)]
Don't test against Rails 2 versions
Testing against so many versions of Rails is proving to be a
maintenance nightmare, so we're going to change tack: I'll continue to
support the current 2.x series of the Wikitext gem, and it will work
perfectly with Rails 2.x.
I'll also be supporting a new 3.x series of the gem, which will support
only Rails 3.x. It is relatively easy to support multiple versions of
the gem, each tailored for a particular version of Rails, compared with
trying to get a single version fo the gem to support all versions (see
the hoops that Haml jumps through to do this).
Additionally, testing against so many versions is complicated even more
when Bundler is added to the equation. From here on I'll be
concentrating on making the Rails specs Bundler-aware, but evidently
only in the 3.x branch, and only against Rails 3.x.
Wincent Colaiuta [Sun, 15 May 2011 04:08:45 +0000 (21:08 -0700)]
Update version numbers for Rails specs
Reformat for readability, add a couple of missing versions to the list,
and remove versions which we no longer test against.
We only test released versions, and it appears that some versions have
(eg. 2.3.2.1, 2.3.3.1) have been pulled from the gem servers (or at
least they no longer show up in the output of "gem list --remote --all
rails").