Sha256: 6862aaf8c9e266546dd9be7a980fbee07b6ecc12586fe49dc15bc2ea0d2aacad

Contents?: true

Size: 436 Bytes

Versions: 8

Compression:

Stored size: 436 Bytes

Contents

namespace :voight_kampff do
  desc 'Import a new crawler-user-agents.json file'
  task :import_user_agents, :url do |t, args|
    args.with_defaults url: 'https://raw.githubusercontent.com/monperrus/crawler-user-agents/master/crawler-user-agents.json'

    require 'net/http'

    uri = URI(args[:url])
    contents = Net::HTTP.get(uri)

    file = File.open('./config/crawler-user-agents.json', 'w')
    file.write(contents)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voight_kampff-1.1.2 lib/tasks/voight_kampff.rake
voight_kampff-1.1.1 lib/tasks/voight_kampff.rake
voight_kampff-1.1.0 lib/tasks/voight_kampff.rake
voight_kampff-1.0.4 lib/tasks/voight_kampff.rake
voight_kampff-1.0.3 lib/tasks/voight_kampff.rake
voight_kampff-1.0.2 lib/tasks/voight_kampff.rake
voight_kampff-1.0.1 lib/tasks/voight_kampff.rake
voight_kampff-1.0.0 lib/tasks/voight_kampff.rake