rakefile.rb in buildar-0.3.0.2 vs rakefile.rb in buildar-0.3.0.3
- old
+ new
@@ -1,13 +1,8 @@
require 'rubygems/package_task'
require 'rake/testtask'
-Rake::TestTask.new :test do |t|
- # FIX for your layout
- t.pattern = 'test/*.rb'
-end
-
module Buildar
##############################################
# Project-specific settings. Edit as needed.
#
#
@@ -60,11 +55,11 @@
def self.write_version new_version
File.open(VERSION_FILE, 'w') { |f| f.write(new_version) }
end
# e.g. bump(:minor, '1.2.3') #=> '1.3.0'
- # only works for integers delimited by periods (dots)
+ # only works for versions consisting of integers delimited by periods (dots)
#
def self.bump(position, version)
pos = [:major, :minor, :patch, :build].index(position) || position
places = version.split('.')
raise "bad position: #{pos} (for version #{version})" unless places[pos]
@@ -76,9 +71,21 @@
else
0
end
}.join('.')
end
+end
+
+
+#######
+# Tasks
+#
+#
+
+# task :test runs your test files
+#
+Rake::TestTask.new :test do |t|
+ t.pattern = 'test/*.rb' # FIX for your layout
end
task :version do
puts "#{Buildar::PROJECT_NAME} #{Buildar.version}"
end