Permalink
Browse files

'dk add ruby fpm'

  • Loading branch information...
1 parent d05c332 commit 30351863abb234cd33c503451886be450a14b074 @jordansissel committed Feb 29, 2012
Showing with 68 additions and 1 deletion.
  1. +5 −0 .batcave/manifest
  2. +46 −0 Makefile
  3. +15 −0 notify-failure.sh
  4. +2 −1 test/docs.rb
View
@@ -0,0 +1,5 @@
+---
+things:
+ ruby:
+ args:
+ - fpm
View
@@ -0,0 +1,46 @@
+GEMSPEC=$(shell ls *.gemspec)
+VERSION=$(shell awk -F\" '/spec.version/ { print $$2 }' $(GEMSPEC))
+NAME=$(shell awk -F\" '/spec.name/ { print $$2 }' $(GEMSPEC))
+GEM=$(NAME)-$(VERSION).gem
+
+.PHONY: test
+test:
+ sh notify-failure.sh ruby test/all.rb
+
+.PHONY: testloop
+testloop:
+ while true; do \
+ $(MAKE) test; \
+ $(MAKE) wait-for-changes; \
+ done
+
+.PHONY: serve-coverage
+serve-coverage:
+ cd coverage; python -mSimpleHTTPServer
+
+.PHONY: wait-for-changes
+wait-for-changes:
+ -inotifywait --exclude '\.swp' -e modify $$(find $(DIRS) -name '*.rb'; find $(DIRS) -type d)
+
+.PHONY: package
+package: | $(GEM)
+
+.PHONY: gem
+gem: $(GEM)
+
+$(GEM):
+ gem build $(GEMSPEC)
+
+.PHONY: test-package
+test-package: $(GEM)
+ # Sometimes 'gem build' makes a faulty gem.
+ gem unpack $(GEM)
+ rm -rf ftw-$(VERSION)/
+
+.PHONY: publish
+publish: test-package
+ gem push $(GEM)
+
+.PHONY: install
+install: $(GEM)
+ gem install $(GEM)
View
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+"$@"
+status=$?
+
+if [ ! -z "$TMUX" ] ; then
+ if [ "$status" -ne 0 ] ; then
+ tmux display-message "Tests Fail"
+ else
+ tmux display-message "Tests OK"
+ fi
+fi
+
+exit $status
+
View
@@ -1,7 +1,6 @@
require "rubygems"
require "yard"
require File.join(File.expand_path(File.dirname(__FILE__)), "testing")
-require "minitest/autorun"
describe "documentation tests" do
before do
@@ -12,6 +11,8 @@
end
test "All classes, methods, modules, and constants must be documented" do
+ # YARD's parser works best in ruby 1.9.x, so skip 1.8.x
+ skip if RUBY_VERSION < "1.9.2"
# Note, the 'find the undocumented things' code here is
# copied mostly from: YARD 0.7.5's lib/yard/cli/stats.rb
#

0 comments on commit 3035186

Please sign in to comment.