Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit f3ab71bfa27fa6063d41689de1b4964cf346ba56 Michael Nutt committed Oct 18, 2009
Showing with 185 additions and 0 deletions.
  1. +16 −0 .bnsignore
  2. +4 −0 History.txt
  3. +55 −0 README.txt
  4. +30 −0 Rakefile
  5. +8 −0 bin/quickgithelp
  6. +49 −0 lib/quickgithelp.rb
  7. +7 −0 spec/quickgithelp_spec.rb
  8. +16 −0 spec/spec_helper.rb
16 .bnsignore
@@ -0,0 +1,16 @@
+# The list of files that should be ignored by Mr Bones.
+# Lines that start with '#' are comments.
+#
+# A .gitignore file can be used instead by setting it as the ignore
+# file in your Rakefile:
+#
+# PROJ.ignore_file = '.gitignore'
+#
+# For a project with a C extension, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
+announcement.txt
+coverage
+doc
+pkg
4 History.txt
@@ -0,0 +1,4 @@
+== 1.0.0 / 2009-10-18
+
+* 1 major enhancement
+ * Birthday!
55 README.txt
@@ -0,0 +1,55 @@
+quickgithelp
+ by Michael Nutt <michael@nuttnet.net>
+ http://nutt.im
+
+== DESCRIPTION:
+
+Generate programming tutorials based of a git repository. Each tutorial step should be a commit in git. Run
+quickgithelp inside the repository to generate pretty html which can be filled out into a tutorial.
+
+== FEATURES/PROBLEMS:
+
+* Not done yet.
+
+== SYNOPSIS:
+
+cd mynewtutorial/
+git init
+[ commit some code ]
+git commit
+[ commit step 2 of the tutorial ]
+git commit
+quickgithelp
+
+== REQUIREMENTS:
+
+* grit
+
+== INSTALL:
+
+* sudo gem install quickgithelp
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2009 Michael Nutt
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 Rakefile
@@ -0,0 +1,30 @@
+# Look in the tasks/setup.rb file for the various options that can be
+# configured in this Rakefile. The .rake files in the tasks directory
+# are where the options are used.
+
+begin
+ require 'bones'
+ Bones.setup
+rescue LoadError
+ begin
+ load 'tasks/setup.rb'
+ rescue LoadError
+ raise RuntimeError, '### please install the "bones" gem ###'
+ end
+end
+
+ensure_in_path 'lib'
+require 'quickgithelp'
+
+task :default => 'spec:run'
+
+PROJ.name = 'quickgithelp'
+PROJ.authors = 'Michael Nutt'
+PROJ.email = 'michael@nuttnet.net'
+PROJ.url = 'http://github.com/mnutt/quickgithelp'
+PROJ.version = Quickgithelp::VERSION
+PROJ.rubyforge.name = 'quickgithelp'
+
+PROJ.spec.opts << '--color'
+
+# EOF
8 bin/quickgithelp
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+
+require File.expand_path(
+ File.join(File.dirname(__FILE__), %w[.. lib quickgithelp]))
+
+# Put your code here
+
+# EOF
49 lib/quickgithelp.rb
@@ -0,0 +1,49 @@
+
+module Quickgithelp
+
+ # :stopdoc:
+ VERSION = '1.0.0'
+ LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
+ PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
+ # :startdoc:
+
+ # Returns the version string for the library.
+ #
+ def self.version
+ VERSION
+ end
+
+ # Returns the library path for the module. If any arguments are given,
+ # they will be joined to the end of the libray path using
+ # <tt>File.join</tt>.
+ #
+ def self.libpath( *args )
+ args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
+ end
+
+ # Returns the lpath for the module. If any arguments are given,
+ # they will be joined to the end of the path using
+ # <tt>File.join</tt>.
+ #
+ def self.path( *args )
+ args.empty? ? PATH : ::File.join(PATH, args.flatten)
+ end
+
+ # Utility method used to require all files ending in .rb that lie in the
+ # directory below this file that has the same name as the filename passed
+ # in. Optionally, a specific _directory_ name can be passed in such that
+ # the _filename_ does not have to be equivalent to the directory.
+ #
+ def self.require_all_libs_relative_to( fname, dir = nil )
+ dir ||= ::File.basename(fname, '.*')
+ search_me = ::File.expand_path(
+ ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
+
+ Dir.glob(search_me).sort.each {|rb| require rb}
+ end
+
+end # module Quickgithelp
+
+Quickgithelp.require_all_libs_relative_to(__FILE__)
+
+# EOF
7 spec/quickgithelp_spec.rb
@@ -0,0 +1,7 @@
+
+require File.join(File.dirname(__FILE__), %w[spec_helper])
+
+describe Quickgithelp do
+end
+
+# EOF
16 spec/spec_helper.rb
@@ -0,0 +1,16 @@
+
+require File.expand_path(
+ File.join(File.dirname(__FILE__), %w[.. lib quickgithelp]))
+
+Spec::Runner.configure do |config|
+ # == Mock Framework
+ #
+ # RSpec uses it's own mocking framework by default. If you prefer to
+ # use mocha, flexmock or RR, uncomment the appropriate line:
+ #
+ # config.mock_with :mocha
+ # config.mock_with :flexmock
+ # config.mock_with :rr
+end
+
+# EOF

0 comments on commit f3ab71b

Please sign in to comment.