forked from mconf/bigbluebutton-api-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
48 lines (39 loc) · 1.44 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require 'rubygems'
require 'rdoc/task'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
desc 'Default: run tests.'
# task :default => [:spec, :cucumber]
task :default => :spec
RSpec::Core::RakeTask.new(:spec)
Cucumber::Rake::Task.new do |t|
# Disable all features that need the bot. It isn't working since BigBlueButton 0.81.
prepend = "--tags ~@need-bot"
# in jruby the class BigBlueButtonBot doesn't work (it uses fork)
if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
puts "Jruby detected, ignoring features with @need-bot"
prepend = "--tags ~@need-bot"
end
# defaults to the latest version, that runs all tests
# if set to 0.8 only, won't run tests for newer versions
if ENV["V"] == "0.8" or ENV["VERSION"] == "0.8"
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all #{prepend}"
else
t.cucumber_opts = "--format pretty --tags ~@wip --tags @version-all,@version-081 #{prepend}"
end
end
RDoc::Task.new do |rdoc|
rdoc.rdoc_files.include('README.md', 'LICENSE', 'LICENSE_003', 'CHANGELOG.md', 'lib/**/*.rb')
rdoc.main = "README.md"
rdoc.title = "bigbluebutton-api-ruby Docs"
rdoc.rdoc_dir = 'rdoc'
end
eval("$specification = begin; #{IO.read('bigbluebutton-api-ruby.gemspec')}; end")
Gem::PackageTask.new $specification do |pkg|
pkg.need_tar = true
pkg.need_zip = true
end
task :notes do
puts `grep -r 'OPTIMIZE\\|FIXME\\|TODO' lib/ spec/ features/`
end