Skip to content

Commit

Permalink
rewrite rakefile
Browse files Browse the repository at this point in the history
add clause to check reuby version as < 1.9.3 is no longer supported by Rubocop
  • Loading branch information
sensu-plugin committed Dec 22, 2014
1 parent 3efe2f4 commit 05dd9af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
15 changes: 12 additions & 3 deletions Rakefile
@@ -1,13 +1,20 @@
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

RSpec::Core::RakeTask.new(:spec) do |r|
r.pattern = FileList['**/**/*_spec.rb']
desc 'Don\'t run Rubocop for unsupported versions'
begin
if RUBY_VERSION >= '1.9.3'
args = [:spec, :rubocop]
else
args = [:spec]
end
end

Rubocop::RakeTask.new

task default: [:spec, :rubocop]
RSpec::Core::RakeTask.new(:spec) do |r|
r.pattern = FileList['**/**/*_spec.rb']
end

desc 'Calculate technical debt'
task :calculate_debt do
Expand All @@ -18,3 +25,5 @@ desc 'Make all plugins executable'
task :make_plugins_executable do
`chmod -R +x /plugins/*`
end

task default: args
6 changes: 4 additions & 2 deletions Vagrantfile
Expand Up @@ -21,11 +21,13 @@ curl -L get.rvm.io | bash -s stable
source /home/vagrant/.rvm/scripts/rvm
rvm reload
#rvm install 1.8.7
#rvm install 1.9.3
rvm install 1.9.2
rvm install 1.9.3
rvm install 2.1.4
rvm install 2.0.0
#rvm use 1.8.7@sensu_plugins --create
#rvm use 1.9.3@sensu_plugins --create
rvm use 1.9.3@sensu_plugins --create
rvm use 1.9.2@sensu_plugins --create
rvm use 2.0.0@sensu_plugins --create
rvm use 2.1.4@sensu_plugins --create
rvm use 2.1.4@sensu_plugins --default
Expand Down

0 comments on commit 05dd9af

Please sign in to comment.