From 7b914ab1883de2e946238015503b8eacecd5b65b Mon Sep 17 00:00:00 2001 From: Magnus Holm Date: Sat, 7 Mar 2009 23:54:47 +0100 Subject: [PATCH] Some minor documentation cleanup --- README | 27 ++++++++++++++++----------- lib/camping-unabridged.rb | 10 +++++----- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/README b/README index ed8f459..9e61400 100644 --- a/README +++ b/README @@ -52,7 +52,9 @@ A skeletal Camping blog could look like this: == Installation -Interested yet? Luckily it's quite easy to install Camping. We'll be using a tool called RubyGems, so if you don't have that installed yet, go grab it! Once that's sorted out, open up a Terminal or Command Line and enter: +Interested yet? Luckily it's quite easy to install Camping. We'll be using +a tool called RubyGems, so if you don't have that installed yet, go grab it! +Once that's sorted out, open up a Terminal or Command Line and enter: * gem install camping @@ -60,25 +62,28 @@ Or for the bleeding edge: * gem install camping --source http://gems.judofyr.net -This will download everything you need and get you all set up. If you're installing camping manually, you'll need to make sure you have 'rack' installed as well, the interface Camping uses to talk to your web server. You'll also need 'markaby' for the views, and 'activerecord' if you're going to be using databases. +Camping itself only depends on Rack[http://rack.rubyforge.org] and using the +command above will only install Camping and Rack. However, if you intend to +use the views you also need to install +markaby+, and if you're going to use +the database you need +activerecord+ as well: + +* gem install markaby +* gem install activerecord == Learning -* Start by reading the documentation in {the Camping module}[link:classes/Camping.html] - - it should get you started pretty quick. +* Start by reading the documentation in {the Camping module}[link:classes/Camping.html], + it should get you started pretty quick. * {The wiki}[http://wiki.github.com/why/camping] is the place for all tiny, useful tricks that we've collected over the years. Don't be afraid to share your own discoveries; the more, the better! -* Still wondering? Subscribe to {the mailing list}[http://rubyforge.org/mailman/listinfo/camping-list]. - This is where it's all happening! Don't worry, though, the volume is just +* Still wondering? Subscribe to {the mailing list}[http://rubyforge.org/mailman/listinfo/camping-list], + the place where it's all happening! Don't worry, though, the volume is just as micro as Camping itself. == Authors -Camping was originally started by{why the lucky stiff}[http://en.wikipedia.org/wiki/Why_the_lucky_stiff], +Camping was originally started by {why the lucky stiff}[http://en.wikipedia.org/wiki/Why_the_lucky_stiff], but is now maintained by the _community_. This simply means that if we like your patch, it will be applied. Everything is managed through {the mailing list}[http://rubyforge.org/mailman/listinfo/camping-list], -so just subscribe and you'll become a contributor too. Remember: writing the -code is just half the job, without some serious thinking from you we won't get -any further. - +so just subscribe and you can instantly take a part in shaping Camping. diff --git a/lib/camping-unabridged.rb b/lib/camping-unabridged.rb index c559497..b062a4b 100644 --- a/lib/camping-unabridged.rb +++ b/lib/camping-unabridged.rb @@ -557,8 +557,8 @@ def service(*a) # === Resource # # A _resource_ in HTTP is simply a name of a _thing_ - it's a noun. Just like - # "home", "blog post" and "comment" are nouns in our world, are "/", - # "/post/123" and "/post/123/comment/456" resources in HTTP. + # "home", "blog post" and "comment" are nouns in our world, are +/+, + # +/post/123+ and +/post/123/comment/456+ resources in HTTP. # # Nouns are well and good, but just like you can't build a sentence with # only nouns, you can't build a request with only a resource. We need verbs! @@ -692,7 +692,7 @@ def service(*a) # # Very often, you will name your controllers identical to it's route. If # you leave out the route and just define the controller as a class - # (+class Posts+), Camping will automatically build the route using some magic: + # (class Posts), Camping will automatically build the route using some magic: # # First it will split the controller name up by words. For instance # +VeryNiftyRoute+ will be split up into +Very+, +Nifty+ and +Route+. @@ -701,7 +701,7 @@ def service(*a) # # * Index turns into / # * X turns into ([^/]+) - # * N turns into (\d+) + # * N turns into (\\\d+) # * Everything else turns into lowercase # # Finally it puts a slash between the parts. @@ -896,7 +896,7 @@ def method_missing(m, c, *a) # end # end # - # In your controllers you just call +render :template_name+ which will + # In your controllers you just call render :template_name which will # invoke the template. The views and controllers will share instance # variables (as you can see above). #