Sha256: 84ea03f38a97c5feed3b4ba8d83c0f0254fc2508f3d14651568521d3895c5aac

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

namespace :voight_kampff do

  desc 'Import a new uesr_agents.yml file'
  task :import_user_agents, :url do |t, args|
    args.with_defaults :url => 'http://www.user-agents.org/allagents.xml'
    agents = VoightKampff::UserAgentsParser.new(args[:url])
    file = File.open(Rails.root.join('config','user_agents.yml'), 'w')
    file.write(agents.to_yaml)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
voight_kampff-0.1.4 lib/tasks/voight_kampff.rake
voight_kampff-0.1.3 lib/tasks/voight_kampff.rake
voight_kampff-0.1.2 lib/tasks/voight_kampff.rake
voight_kampff-0.1.1 lib/tasks/voight_kampff.rake