Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update rake task to download the PSL file from the repository.

  • Loading branch information...
commit e9c8ed5067937a7abe9ed79168bbedc24621139f 1 parent 084fb80
@weppos authored
Showing with 13 additions and 13 deletions.
  1. +13 −3 Rakefile
  2. +0 −10 tasks/public_suffix_service.rake
View
16 Rakefile
@@ -137,7 +137,17 @@ task :publish_rdoc => [:clobber_rdoc, :rdoc] do
sh "rsync -avz --delete rdoc/ #{ENV["username"]}@code:/var/www/apps/code/#{PKG_NAME}/api"
end
-
-Dir["tasks/**/*.rake"].each do |file|
- load(file)
+desc <<-DESC
+ Downloads the Public Suffix List file from the repository \
+ and stores it locally.
+DESC
+task :download_definitions do
+ require "net/http"
+
+ DEFINITION_URL = "http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1"
+
+ File.open("lib/public_suffix_service/definitions.dat", "w+") do |f|
+ response = Net::HTTP.get_response(URI.parse(DEFINITION_URL))
+ f.write(response.body)
+ end
end
View
10 tasks/public_suffix_service.rake
@@ -1,10 +0,0 @@
-task :download_definitions do
- require "net/http"
-
- DEFINITION_URL = "http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1"
-
- File.open("lib/public_suffix_service/definitions.dat", "w+") do |f|
- response = Net::HTTP.get_response(URI.parse(DEFINITION_URL))
- f.write(response.body)
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.