Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 48 lines (42 sloc) 1.363 kb
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
1 require 'bundler'
2 Bundler::GemHelper.install_tasks
3
4 require 'rspec/core/rake_task'
ae53862 @e2 add rubocop and fix offenses
e2 authored
5 RSpec::Core::RakeTask.new(:spec) do |t|
6 t.verbose = false unless ENV.key?('CI')
7 end
8
9 if ENV.key?('CI')
10 task default: :spec
11 else
12 require 'rubocop/rake_task'
13 RuboCop::RakeTask.new(:rubocop)
14 task default: [:spec, :rubocop]
15 end
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
16
6b55f53 @e2 rework deps+Gemfile+gemspec+Rakefile
e2 authored
17 require 'yaml'
18
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
19 namespace(:spec) do
ae53862 @e2 add rubocop and fix offenses
e2 authored
20 desc 'Run all specs on multiple ruby versions (requires rvm)'
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
21 task(:portability) do
ae53862 @e2 add rubocop and fix offenses
e2 authored
22 travis_config_file = File.expand_path('../.travis.yml', __FILE__)
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
23 begin
ae53862 @e2 add rubocop and fix offenses
e2 authored
24 travis_options ||= YAML.load_file(travis_config_file)
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
25 rescue => ex
26 puts "Travis config file '#{travis_config_file}' could not be found: #{ex.message}"
27 return
28 end
29
30 travis_options['rvm'].each do |version|
31 system <<-BASH
32 bash -c 'source ~/.rvm/scripts/rvm;
6b55f53 @e2 rework deps+Gemfile+gemspec+Rakefile
e2 authored
33 set -e
ead5ba4 @netzpirat Refactored guard-jammit.
netzpirat authored
34 rvm #{version};
35 ruby_version_string_size=`ruby -v | wc -m`
36 echo;
37 for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
38 echo;
39 echo "`ruby -v`";
40 for ((c=1; c<$ruby_version_string_size; c++)); do echo -n "="; done
41 echo;
42 RBXOPT="-Xrbc.db" bundle install;
43 RBXOPT="-Xrbc.db" bundle exec rspec spec -f doc 2>&1;'
44 BASH
45 end
46 end
47 end
Something went wrong with that request. Please try again.