summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-11 12:52:40 +0200
committerAzul <azul@leap.se>2012-10-11 12:52:40 +0200
commit10441deba145f53604ca3b981374f1ee6619c400 (patch)
tree90d2a851cd558652121182937a5ec8373722cab0 /lib
parent61d73ac517ccbcc7ca8892010ef89e861052807f (diff)
parent33ef3d2ac9a03b06ff29f1367c69731a89f1dfc7 (diff)
Merge branch 'release-0.1.0'
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_web/version.rb2
-rw-r--r--lib/tasks/gems.rake40
-rw-r--r--lib/tasks/task_helper.rb19
-rw-r--r--lib/tasks/test.rake18
4 files changed, 78 insertions, 1 deletions
diff --git a/lib/leap_web/version.rb b/lib/leap_web/version.rb
index ef81e43..6a74082 100644
--- a/lib/leap_web/version.rb
+++ b/lib/leap_web/version.rb
@@ -1,3 +1,3 @@
module LeapWeb
- VERSION = "0.0.1"
+ VERSION = "0.1.0" unless defined?(LeapWeb::VERSION)
end
diff --git a/lib/tasks/gems.rake b/lib/tasks/gems.rake
new file mode 100644
index 0000000..8120235
--- /dev/null
+++ b/lib/tasks/gems.rake
@@ -0,0 +1,40 @@
+require File.expand_path('../task_helper', __FILE__)
+include TaskHelper
+
+
+namespace :gem do
+
+ desc "run rake gem for all gems"
+ task :build => :clear do
+ each_gem do |gem_name|
+ putsys "cd #{gem_name} && bundle exec rake gem"
+ end
+ putsys "bundle exec rake gem"
+ end
+
+ desc "clear pkg directory for all gems"
+ task :clear do
+ each_gem do |gem_name|
+ putsys "rm -rf #{gem_name}/pkg"
+ end
+ putsys "rm -rf pkg"
+ end
+
+ desc "run gem install for all gems"
+ task :install => :build do
+
+ each_gem do |gem_name|
+ putsys "cd #{gem_name}/pkg && gem install leap_web_#{gem_name}-#{LeapWeb::VERSION}.gem"
+ end
+ putsys "gem install pkg/leap_web-#{LeapWeb::VERSION}.gem"
+ end
+
+ desc "Release all gems to gemcutter. Package leap web components, then push"
+ task :release do
+
+ each_gem do |gem_name|
+ putsys "cd #{gem_name}/pkg && gem push leap_web_#{gem_name}-#{LeapWeb::VERSION}.gem"
+ end
+ putsys "gem push pkg/leap_web-#{LeapWeb::VERSION}.gem"
+ end
+end
diff --git a/lib/tasks/task_helper.rb b/lib/tasks/task_helper.rb
new file mode 100644
index 0000000..26e60bc
--- /dev/null
+++ b/lib/tasks/task_helper.rb
@@ -0,0 +1,19 @@
+require File.expand_path('../../../lib/leap_web/version', __FILE__)
+
+module TaskHelper
+
+ ENGINES = %w(users certs help)
+
+ def putsys(cmd)
+ puts cmd
+ system cmd
+ end
+
+ def each_gem
+ ENGINES.each do |gem_name|
+ puts "########################### #{gem_name} #########################"
+ yield gem_name
+ end
+ end
+end
+
diff --git a/lib/tasks/test.rake b/lib/tasks/test.rake
new file mode 100644
index 0000000..3c87b45
--- /dev/null
+++ b/lib/tasks/test.rake
@@ -0,0 +1,18 @@
+namespace :test do
+
+ Rails::SubTestTask.new(:units => "test:prepare") do |t|
+ t.libs << "test"
+ t.pattern = '*/test/unit/**/*_test.rb'
+ end
+
+ Rails::SubTestTask.new(:functionals => "test:prepare") do |t|
+ t.libs << "test"
+ t.pattern = '*/test/functional/**/*_test.rb'
+ end
+
+ Rails::SubTestTask.new(:integration => "test:prepare") do |t|
+ t.libs << "test"
+ t.pattern = '*/test/integration/**/*_test.rb'
+ end
+
+end