Permalink
Browse files

directory structure & basic config

  • Loading branch information...
0 parents commit 628e373d8250c70aae9ce18bfedd0c4d21c2c6b2 @martinrehfeld committed Nov 29, 2011
@@ -0,0 +1,4 @@
+*.dump
+*.beam
+.eunit
+deps
1 .rvmrc
@@ -0,0 +1 @@
+rvm --create ruby-1.9.2-p180@erlang-kata
@@ -0,0 +1,8 @@
+source 'http://rubygems.org'
+
+group :development, :test do
+ gem 'guard-shell'
+ gem 'rb-fsevent'
+ gem 'growl'
+ gem 'rake'
+end
@@ -0,0 +1,20 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ growl (1.0.3)
+ guard (0.8.8)
+ thor (~> 0.14.6)
+ guard-shell (0.1.1)
+ guard (>= 0.2.0)
+ rake (0.9.2.2)
+ rb-fsevent (0.4.3.1)
+ thor (0.14.6)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ growl
+ guard-shell
+ rake
+ rb-fsevent
@@ -0,0 +1,38 @@
+# # -*- encoding : utf-8 -*-
+
+# automatically run the eunit tests
+
+def run_eunit_all
+ cmd = "./rebar eunit skip_deps=true"
+ puts "Executing #{cmd}"
+ puts `#{cmd}`
+ if $? == 0
+ Growl.notify_ok "eunit: all tests passed."
+ else
+ Growl.notify_error "eunit: tests failed."
+ end
+end
+
+def run_eunit(app, src, suite)
+ if File.exist?(File.join(File.dirname(__FILE__), app, 'test', "#{suite}_tests.erl"))
+ cmd = "./rebar eunit skip_deps=true suite=#{suite}"
+ puts "Executing #{cmd}"
+ puts `#{cmd}`
+ if $? == 0
+ Growl.notify_ok "#{suite}: eunit passed."
+ else
+ Growl.notify_error "#{suite}: eunit failed."
+ end
+ else
+ puts "No tests for #{suite.inspect}"
+ Growl.notify_warning "No tests for #{suite}!"
+ end
+end
+
+def run_spec
+end
+
+guard 'shell' do
+ watch(%r{(apps/.*?)(src|test)/([^.].*?)(_tests)?.erl}) {|m| run_eunit(m[1], m[2], m[3]) }
+ watch(%r{apps/(.*?)/include/([^.].*).hrl}) {|m| run_eunit_all }
+end
@@ -0,0 +1,12 @@
+# -*- encoding : utf-8 -*-
+
+require 'rubygems'
+require 'bundler'
+begin
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
+require 'rake'
No changes.
No changes.
No changes.
No changes.
@@ -0,0 +1,9 @@
+% {erl_opts, [warnings_as_errors, debug_info]}.
+{erl_opts, [debug_info]}.
+{require_otp_vsn, "R14"}.
+{deps, [
+ {meck, "0.7.1", {git, "git://github.com/eproxus/meck.git", {tag, "916844d6d1df6b"}}}
+]}.
+{clean_files, ["ebin/*.beam"]}.
+
+{xref_checks, [undefined_function_calls]}.
No changes.
No changes.
BIN rebar
Binary file not shown.
@@ -0,0 +1,8 @@
+{sub_dirs, [
+ "apps/*",
+ "rel"
+ ]}.
+% {erl_opts, [warnings_as_errors, debug_info]}.
+{erl_opts, [debug_info]}.
+
+{require_otp_vsn, "R14"}.
No changes.

0 comments on commit 628e373

Please sign in to comment.