Adds rubocop and fixes most style violations it detected

- add rubocop as a dev dependency
- fixed many style violations it reported, often using --auto-correct
- add a rubocop config
 - .rubocop.yml shows the exceptions
 - .rubocopy_todo.yml tracks outstanding style issues
- adds a rake task to allow rubocop styling checks to be automated
diff --git a/src/ruby/.rubocop_todo.yml b/src/ruby/.rubocop_todo.yml
new file mode 100644
index 0000000..d5bb55e
--- /dev/null
+++ b/src/ruby/.rubocop_todo.yml
@@ -0,0 +1,52 @@
+# This configuration was generated by `rubocop --auto-gen-config`
+# on 2015-01-16 02:30:04 -0800 using RuboCop version 0.28.0.
+# The point is for the user to remove these configuration records
+# one by one as the offenses are removed from the code base.
+# Note that changes in the inspected code, or installation of new
+# versions of RuboCop, may require this file to be generated again.
+
+# Offense count: 3
+# Lint/UselessAssignment:
+#  Enabled: false
+
+# Offense count: 33
+Metrics/AbcSize:
+  Max: 39
+
+# Offense count: 3
+# Configuration parameters: CountComments.
+Metrics/ClassLength:
+  Max: 231
+
+# Offense count: 2
+Metrics/CyclomaticComplexity:
+  Max: 8
+
+# Offense count: 36
+# Configuration parameters: CountComments.
+Metrics/MethodLength:
+  Max: 37
+
+# Offense count: 8
+# Configuration parameters: CountKeywordArgs.
+Metrics/ParameterLists:
+  Max: 8
+
+# Offense count: 2
+Metrics/PerceivedComplexity:
+  Max: 10
+
+# Offense count: 7
+# Configuration parameters: AllowedVariables.
+Style/GlobalVars:
+  Enabled: false
+
+# Offense count: 1
+# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
+Style/Next:
+  Enabled: false
+
+# Offense count: 2
+# Configuration parameters: Methods.
+Style/SingleLineBlockParams:
+  Enabled: false