Sha256: ceb9936b355c6b3d776f5b3b556d0781c1328069f85ede9438ae033302579e70

Contents?: true

Size: 754 Bytes

Versions: 12

Compression:

Stored size: 754 Bytes

Contents

desc "update the strscan default gem"
task :update_global_strscan do
  on roles(:app) do |host|
    strscan_version = within release_path do
      capture(:bundle, 'exec', 'ruby', '-e', '"puts Gem::Specification.find_by_name(\'strscan\').version"', ' || true')
    end

    next warn 'strscan is not installed' if strscan_version.empty?

    begin
      Gem::Version.new(strscan_version)
    rescue ArgumentError
      next warn "skipping, could not install strscan due to an unrelated error: #{strscan_version}"
    end

    execute "gem install strscan --silent --no-document -v #{strscan_version}"
  end
end

if Rake::Task.task_defined?(:'passenger:restart')
  before :'passenger:restart', :update_global_strscan unless ENV['SKIP_UPDATE_STRSCAN']
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dlss-capistrano-5.3.0 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.2.0 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.1.1 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.1.0 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.0.4 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.0.3 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.0.2 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.0.1 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-5.0.0 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-4.4.1 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-4.4.0 lib/dlss/capistrano/tasks/strscan.rake
dlss-capistrano-4.3.1 lib/dlss/capistrano/tasks/strscan.rake