Stok Footage

Continually experimenting with new ideas and techniques — Reconstructing, Developing, Modernising.

Quick Project Start

I have been thinking about updating a Rails app I wrote for my wife a few years ago. I still love Ruby, and in 2013 I have had a chance to read Sandy Metz’s Practical Object-Oriented Design in Ruby.

I have had a few runs at getting friends to pair up with me, but so far that hasn’t panned out. With a new year looming I think that it’s time to go solo and get cracking.

Maybe I don’t want a “monorail” this time, and it is an excuse to maybe play with some new (to me) toys:

  • Ruby 2.1.0 and minitest
  • hoe for getting my project laid out nicely from day 1
  • sinatra
  • sequel
  • pry

So what do I need to do…

ratdog:Projects mike$ sow test_maker
Creating missing default template.
erb: .autotest.erb
erb: History.txt.erb
erb: Manifest.txt.erb
erb: README.txt.erb
erb: Rakefile.erb
erb: bin/file_name.erb
erb: lib/file_name.rb.erb
erb: test/test_file_name.rb.erb

... done, now go fix all occurrences of 'FIX':

  test_maker/Rakefile:19:  # developer("FIX", "FIX@example.com")
  test_maker/README.txt:3:* FIX (url)
  test_maker/README.txt:7:FIX (describe your package)
  test_maker/README.txt:11:* FIX (list of features or problems)
  test_maker/README.txt:15:  FIX (code sample of usage)
  test_maker/README.txt:19:* FIX (list of requirements)
  test_maker/README.txt:23:* FIX (sudo gem install, anything else)
  test_maker/README.txt:38:Copyright (c) 2013 FIX

ratdog:Projects mike$ mvim test_maker/Rakefile test_maker/README.txt

The Rakefile pointed me at its own template so that I could permanently set the developer name for future runs, so

ratdog:Projects mike$ mvim ~/.hoe_template/default/Rakefile.erb

So now I have my project set up…

The benefit of using hoe is that I get some rake tasks to help me on my way:

ratdog:test_maker mike$ rake -T
rake announce              # publish   # Announce your release
rake audit                 # test      # Run ZenTest against the package
rake check_extra_deps      # deps      # Install missing dependencies
rake check_manifest        # debug     # Verify the manifest
rake clean                 # clean     # Clean up all the extras
rake clobber_docs          # publish   # Remove RDoc files
rake clobber_package       # package   # Remove package products
rake config_hoe            # debug     # Create a fresh ~/.hoerc file
rake dcov                  # publish   # Generate rdoc coverage report
rake debug_email           # publish   # Generate email announcement file
rake debug_gem             # debug     # Show information about the gem
rake default               # test      # Run the default task(s)
rake deps:email            # deps      # Print a contact list for gems dependent on this gem
rake deps:fetch            # deps      # Fetch all the dependent gems of this gem into tarballs
rake deps:list             # deps      # List all the dependent gems of this gem
rake docs                  # publish   # Generate rdoc
rake gem                   # package   # Build the gem file test-maker-1.0.0.gem
rake generate_key          # signing   # Generate a key for signing your gems
rake install_gem           # package   # Install the package as a gem
rake install_plugins       # deps      # Install missing plugins
rake multi                 # test      # Run the test suite using multiruby
rake newb                  # newb      # Install deps, generate docs, run tests/specs
rake package               # package   # Build all the packages
rake post_blog             # publish   # Post announcement to blog
rake publish_docs          # publish   # Publish RDoc to wherever you want
rake release               # package   # Package and upload; Requires VERSION=x.y.z (optional PRE=a.1)
rake release_sanity        # package   # Sanity checks for release
rake release_to_gemcutter  # gemcutter # Push gem to gemcutter
rake repackage             # package   # Force a rebuild of the package files
rake ridocs                # publish   # Generate ri locally for testing
rake test                  # test      # Run the test suite
rake test_deps             # test      # Show which test files fail when run alone

I’m not likely to use all of these, but I can see that many of then are immediately useful and lots pique my interest.

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *