Permalink
Browse files

big restructure, start of tests

  • Loading branch information...
1 parent 0a86dc5 commit d8d2b329460e8109f3e3dde0d41bfc8357ea5cd5 @schacon committed Feb 21, 2011
Showing with 469 additions and 316 deletions.
  1. +34 −0 Rakefile
  2. +2 −1 bin/git-scribe
  3. +19 −315 lib/git-scribe.rb
  4. +39 −0 lib/git-scribe/check.rb
  5. +79 −0 lib/git-scribe/cli.rb
  6. +220 −0 lib/git-scribe/generate.rb
  7. +14 −0 lib/git-scribe/init.rb
  8. +3 −0 lib/git-scribe/version.rb
  9. +15 −0 test/init_test.rb
  10. +44 −0 test/test_helper.rb
View
@@ -0,0 +1,34 @@
+def command?(command)
+ system("type #{command} > /dev/null 2>&1")
+end
+
+#
+# Tests
+#
+
+task :default => :test
+
+desc "Run the test suite"
+task :test do
+ rg = command?(:rg)
+ Dir['test/**/*_test.rb'].each do |f|
+ rg ? sh("rg #{f}") : ruby(f)
+ end
+end
+
+
+#
+# Publishing
+#
+
+desc "Push a new version to Gemcutter"
+task :publish do
+ require 'git-scribe/version'
+
+ sh "gem build git-scribe.gemspec"
+ sh "gem push git-scribe-#{GitScribe::Version}.gem"
+ sh "git tag v#{GitScribe::Version}"
+ sh "git push origin v#{GitScribe::Version}"
+ sh "git push origin master"
+end
+
View
@@ -2,5 +2,6 @@
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
require 'git-scribe'
+require 'git-scribe/cli'
-GitScribe.start
+GitScribe.new.run
Oops, something went wrong.

0 comments on commit d8d2b32

Please sign in to comment.