Sha256: 32d77585f7b61e1a37f00e66bb351949e40de6cf02549b1673f8ac75df28c43d

Contents?: true

Size: 728 Bytes

Versions: 49

Compression:

Stored size: 728 Bytes

Contents

# frozen_string_literal: true

require "rake/testtask"
require "rubocop/rake_task"

task default: %i[test rubocop]

Rake::TestTask.new do |t|
  t.pattern = "./test/**/*_test.rb"
end

RuboCop::RakeTask.new

desc "Update bundled certs"
task :update_certs do
  require "faraday"

  fetch_file "https://curl.haxx.se/ca/cacert.pem",
             ::File.expand_path("../lib/data/ca-certificates.crt", __FILE__)
end

#
# helpers
#

def fetch_file(url, dest)
  ::File.open(dest, "w") do |file|
    resp = Faraday.get(url)
    unless resp.status == 200
      abort("bad response when fetching: #{url}\n" \
        "Status #{resp.status}: #{resp.body}")
    end
    file.write(resp.body)
    puts "Successfully fetched: #{url}"
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
stripe-4.11.0 Rakefile
stripe-4.10.0 Rakefile
stripe-4.9.1 Rakefile
stripe-4.9.0 Rakefile
stripe-4.8.1 Rakefile
stripe-4.8.0 Rakefile
stripe-4.7.1 Rakefile
stripe-4.7.0 Rakefile
stripe-4.6.0 Rakefile
stripe-4.5.0 Rakefile
stripe-4.4.1 Rakefile
stripe-4.4.0 Rakefile
stripe-4.3.0 Rakefile
stripe-4.2.0 Rakefile
stripe-4.1.0 Rakefile
stripe-4.0.3 Rakefile
stripe-4.0.2 Rakefile
stripe-4.0.1 Rakefile
stripe-4.0.0 Rakefile
stripe-3.31.1 Rakefile