zorglub 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/tasks/svn.rake DELETED
@@ -1,48 +0,0 @@
1
- # -*- coding: UTF-8 -*-
2
- #
3
- if HAVE_SVN
4
-
5
- unless PROJ.svn.root
6
- info = %x/svn info ./
7
- m = %r/^Repository Root:\s+(.*)$/.match(info)
8
- PROJ.svn.root = (m.nil? ? '' : m[1])
9
- end
10
- PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
11
-
12
- namespace :svn do
13
-
14
- # A prerequisites task that all other tasks depend upon
15
- task :prereqs
16
-
17
- desc 'Show tags from the SVN repository'
18
- task :show_tags => 'svn:prereqs' do |t|
19
- tags = %x/svn list #{File.join(PROJ.svn.root, PROJ.svn.tags)}/
20
- tags.gsub!(%r/\/$/, '')
21
- tags = tags.split("\n").sort {|a,b| b <=> a}
22
- puts tags
23
- end
24
-
25
- desc 'Create a new tag in the SVN repository'
26
- task :create_tag => 'svn:prereqs' do |t|
27
- v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
28
- abort "Versions don't match #{v} vs #{PROJ.version}" if v != PROJ.version
29
-
30
- svn = PROJ.svn
31
- trunk = File.join(svn.root, svn.trunk)
32
- tag = "%s-%s" % [PROJ.name, PROJ.version]
33
- tag = File.join(svn.root, svn.tags, tag)
34
- msg = "Creating tag for #{PROJ.name} version #{PROJ.version}"
35
-
36
- puts "Creating SVN tag '#{tag}'"
37
- unless system "svn cp -m '#{msg}' #{trunk} #{tag}"
38
- abort "Tag creation failed"
39
- end
40
- end
41
-
42
- end # namespace :svn
43
-
44
- task 'gem:release' => 'svn:create_tag'
45
-
46
- end # if PROJ.svn.path
47
-
48
- # EOF
data/tasks/test.rake DELETED
@@ -1,41 +0,0 @@
1
- # -*- coding: UTF-8 -*-
2
- #
3
- if test(?e, PROJ.test.file) or not PROJ.test.files.to_a.empty?
4
- require 'rake/testtask'
5
-
6
- namespace :test do
7
-
8
- Rake::TestTask.new(:run) do |t|
9
- t.libs = PROJ.libs
10
- t.test_files = if test(?f, PROJ.test.file) then [PROJ.test.file]
11
- else PROJ.test.files end
12
- t.ruby_opts += PROJ.ruby_opts
13
- t.ruby_opts += PROJ.test.opts
14
- end
15
-
16
- if HAVE_RCOV
17
- desc 'Run rcov on the unit tests'
18
- task :rcov => :clobber_rcov do
19
- opts = PROJ.rcov.opts.dup << '-o' << PROJ.rcov.dir
20
- opts = opts.join(' ')
21
- files = if test(?f, PROJ.test.file) then [PROJ.test.file]
22
- else PROJ.test.files end
23
- files = files.join(' ')
24
- sh "#{RCOV} #{files} #{opts}"
25
- end
26
-
27
- task :clobber_rcov do
28
- rm_r 'coverage' rescue nil
29
- end
30
- end
31
-
32
- end # namespace :test
33
-
34
- desc 'Alias to test:run'
35
- task :test => 'test:run'
36
-
37
- task :clobber => 'test:clobber_rcov' if HAVE_RCOV
38
-
39
- end
40
-
41
- # EOF