]> git.wincent.com - wikitext.git/commit
Refactor for deployment using RubyGems
authorWincent Colaiuta <win@wincent.com>
Wed, 17 Oct 2007 12:59:06 +0000 (14:59 +0200)
committerWincent Colaiuta <win@wincent.com>
Wed, 17 Oct 2007 12:59:39 +0000 (14:59 +0200)
commit80ae7252530be1b79fbaa7924787a43b54447a14
treea40adec8407eb9f49ed18da4d4cc2b25658f73e5
parent02d11e94e697cd5fe3cb081f5d515f6bfc947ccb
Refactor for deployment using RubyGems

On thinking about the need for this to run on multiple platforms I decided
that it wasn't really suited to being used as a Rails plug-in:

- Rails plugins are usually deployed by simply unpacking them into the
"vendor/plugins" directory; given that this is actually a C extension this
means that a second step is required (compilation)

- I looked at cross-compiling here locally before deploying the plugin but
that seems awfully brittle with plenty of scope for breakage when one of the
target systems is upgraded

- There is already a system designed to handle exactly this deployment
problem: RubyGems

So even though I would prefer to have all of the dependencies of my Rails
applications frozen into the "vendor" directory, it seems that deployment as
a RubyGem is the most robust solution. I can still tie my application to a
particular version of the gem by doing something like:

  require 'rubygems'
  gem 'wikitext', '>= 1.1'

So this commit refactors the working tree to match the typical RubyGems
pattern (ext, spec subdirectories). At the same time while preparing the gem
specification I realized that the inconsistencies in the naming conventions
were too ugly to bear, and so as part of the move I renamed many of the files
and symbols (capitalization changes and omitting underscores).

As all of these changes have to be made in a single batch to keep the specs
passing I am not splitting this up into a series of smaller commits.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 files changed:
.gitignore
Makefile [deleted file]
Rakefile
WikiTextLexer.h [deleted file]
ext/.gitignore [new file with mode: 0644]
ext/Wikitext.g [moved from WikiText.g with 99% similarity]
ext/WikitextLexer.c [moved from WikiTextLexer.c with 87% similarity]
ext/WikitextLexer.h [new file with mode: 0644]
ext/depend [moved from depend with 78% similarity]
ext/extconf.rb [moved from extconf.rb with 90% similarity]
ext/wikitext.c [moved from wiki_text.c with 87% similarity]
ext/wikitext.h [moved from wiki_text.h with 94% similarity]
spec/spec_helper.rb [new file with mode: 0644]
spec/wikitext_spec.rb [moved from wiki_text_spec.rb with 94% similarity]
test.rb [changed mode: 0644->0755]