Sha256: 0a2a9e8b43410987dd792b342585e965fde1389bebe43d7e80143cc97cd4aa8b

Contents?: true

Size: 812 Bytes

Versions: 2

Compression:

Stored size: 812 Bytes

Contents

require 'bundler'
Bundler::GemHelper.install_tasks

namespace :d3 do
  desc 'Update d3 version'
  task :update_version do
    `curl -o app/assets/javascripts/d3.js https://d3js.org/d3.v7.js`
    `curl -o app/assets/javascripts/d3.min.js https://d3js.org/d3.v7.min.js`
    `cp app/assets/javascripts/d3.js app/assets/javascripts/d3.v7.js`
    `cp app/assets/javascripts/d3.min.js app/assets/javascripts/d3.v7.min.js`
    version = File.open("app/assets/javascripts/d3.js") { |f|
      f.each_line.lazy.select { |line|
        line.match(/((\d+\.)(\d+\.)(\*|\d+))/)
      }.first; $1
    }
    message = <<-MSG
      Please update the version to #{version} manually in the following files:
      * CHANGELOG.md
      * README.md
      * lib/d3/rails/version.rb
    MSG
    puts message.strip.squeeze ' '
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
d3-rails-7.8.5 Rakefile
d3-rails-7.0.0 Rakefile