Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ task :etld_data do
begin
load File.join('.', ETLD_DATA_RB)
data = ETLD_DATA_URI.read(
'If-Modified-Since' => Time.parse(DomainName::ETLD_DATA_DATE).rfc2822
'If-Modified-Since' => Time.parse(DomainName.etld_data_date).rfc2822
)
rescue LoadError, NameError
data = ETLD_DATA_URI.read
Expand All @@ -49,17 +49,11 @@ namespace :etld_data do
sh 'git', 'commit',
ETLD_DATA_FILE,
ETLD_DATA_RB,
'-m', 'Update the eTLD database to %s.' % DomainName::ETLD_DATA_DATE
'-m', 'Update the eTLD database to %s.' % DomainName.etld_data_date
end
end

file ETLD_DATA_RB => [
ETLD_DATA_FILE,
ETLD_DATA_RB + '.erb',
'tool/gen_etld_data.rb'
] do
ruby 'tool/gen_etld_data.rb'
end
ruby 'tool/gen_etld_data.rb'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bare command outside of any task?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess I did not understand completely the previous implementation. Changing that now to revert that.


require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
Expand Down
1 change: 1 addition & 0 deletions domain_name.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Suffix List.

gem.add_runtime_dependency("unf", ["< 1.0.0", ">= 0.0.5"])
gem.add_development_dependency("test-unit", "~> 2.5.5")

if RUBY_VERSION >= "1.9"
gem.add_development_dependency("shoulda", ">= 0")
else
Expand Down
Binary file added lib/cache/etld
Binary file not shown.
Loading