sky-uk / ruby-bootcamp

Other
18 stars 22 forks source link

Introduction to Rake #10

Closed lashd closed 9 years ago

lashd commented 9 years ago

After candidates have completed the ruby quiz they are going to need to know how to create some of the standard infrastructure around the projects.

An exercise or Rake would be good vehicle to also get them to wire up running tests a code coverage.

lashd commented 9 years ago

Thinking that this might be a good video to watch:

joshnesbitt commented 9 years ago

Yeah that looks good.

lashd commented 9 years ago

I'm thinking that the exercises you be two fold for this one:

  1. An exercise write a Rakefile using third party tasks for some code that is supplied
  2. The exercise that @joshnesbitt has been working on that get's participants to write and test their own tasks.
joshnesbitt commented 9 years ago

Sounds good to me. I'm looking at integrating my repo into this one tomorrow morning, i'll do it in a PR so not to confuse candidates.

lashd commented 9 years ago

cool

lashd commented 9 years ago

@joshnesbitt is it ok if I grab your code for the rake exercise now and put in to what I am building?

joshnesbitt commented 9 years ago

@lashd absolutely.

lashd commented 9 years ago

@joshnesbitt thanks, in the exercise you have written, you give an example file listing output. Do you have those files? I could check them in as test data for them to play with?

joshnesbitt commented 9 years ago

They're just stock images, sure thing:

http://wearest.ac/17h6U

You'll want to change the glob pattern to *.jpg for these.

lashd commented 9 years ago

@joshnesbitt Thanks, I'll mix in a couple of text files for variety and update the description

joshnesbitt commented 9 years ago

@lashd great cheers. Let me know if you want a review.

lashd commented 9 years ago

Nearly there

lashd commented 9 years ago

I'm thinking that candidates should wire in third party rake tasks for the first part of this exercise.

The two I am thinking of are:

With regards to rubocop they could use the autocorrect feature to fix the easy ones and then configure rubocop:

@joshnesbitt what do you think

joshnesbitt commented 9 years ago

@lashd sounds good. Got an example of how you'd like to see third party tasks included?

lashd commented 9 years ago

I was thinking just in the way that the projects themselves document it. This way they are also compelled to go off and read the docs for a couple of projects. e.g.

require 'rubocop/rake_task'

RuboCop::RakeTask.new

These implementations also will demonstrate a testable way of implementing portable tasks?

joshnesbitt commented 9 years ago

Yeah that would be good, maybe even link to the task source so they can have a dig around.

joshnesbitt commented 9 years ago

Just had a look through this, looks great. Not sure you need the "Thirdparty Tasks" heading though?

lashd commented 9 years ago

This has been merged, so let's close this one down and see how people get on with it.