rails-browscap 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/tasks/rails-browscap_tasks.rake +2 -2
- metadata +2 -2
|
@@ -10,8 +10,8 @@ namespace :browscap do
|
|
|
10
10
|
desc "Update browscap file"
|
|
11
11
|
task :update => :environment do
|
|
12
12
|
Net::HTTP.start("browsers.garykeith.com") { |http|
|
|
13
|
-
resp = http.get("/stream.asp?BrowsCapINI")
|
|
14
|
-
open("#{Rails.
|
|
13
|
+
resp = http.get("/stream.asp?BrowsCapINI", {'User-Agent' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9'})
|
|
14
|
+
open("#{Rails.root}/config/browscap.ini", "w") { |file|
|
|
15
15
|
file.write(resp.body)
|
|
16
16
|
}
|
|
17
17
|
}
|