Sha256: c6ff93715c60ff2fe0508d626992299ec5fc928545ac8e820564a481170d018e

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

require 'rubygems'
require 'rake'

require 'bundler/setup'

begin
  require 'jeweler'

  Jeweler::Tasks.new do |gem|
    gem.name = "domain_prefix"
    gem.summary = "Domain Prefix Extraction Library"
    gem.description = "A library to extract information about top-level domain and registered name from generic and international domain names"
    gem.email = "github@tadman.ca"
    gem.homepage = "http://github.com/twg/domain_prefix"
    gem.authors = %w[ tadman ]
  end

  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.pattern = 'test/**/test_*.rb'
  test.verbose = true
end

namespace :domain_prefix do
  desc "Update the domain information"
  task :update do
    require 'open-uri'
    
    open("https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat") do |source|
      open(File.expand_path(File.join('data', 'effective_tld_names.dat'), File.dirname(__FILE__)), 'w') do |dest|
        dest.write(source.read)
      end
    end

    open("https://raw.githubusercontent.com/publicsuffix/list/master/tests/test_psl.txt") do |source|
      open(File.expand_path(File.join('test', 'sample', 'test.txt'), File.dirname(__FILE__)), 'w') do |dest|
        dest.write(source.read)
      end
    end
  end
end

task :default => [ :test ]

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
domain_prefix-0.4.20171130 Rakefile
domain_prefix-0.4.20170829 Rakefile
domain_prefix-0.4.20170503 Rakefile
domain_prefix-0.4.20161219 Rakefile
domain_prefix-0.4.20161125 Rakefile
domain_prefix-0.3.0.17 Rakefile
domain_prefix-0.3.0.16 Rakefile
domain_prefix-0.3.0.15 Rakefile
domain_prefix-0.3.0.13 Rakefile
domain_prefix-0.3.0.12 Rakefile