Rakefile in tzinfo-0.3.38 vs Rakefile in tzinfo-0.3.39

- old
+ new

@@ -38,44 +38,13 @@ orig_sh(*cmd, &block) end -PKG_VERSION = "0.3.38" -PKG_FILES = FileList[ - 'CHANGES', - 'LICENSE', - 'Rakefile', - 'README', - '.yardopts', - 'lib', - 'lib/**/*' -].delete_if {|f| f.include?('.svn')} -PKG_TEST_FILES = FileList['test', 'test/**/*'].delete_if {|f| f.include?('.svn')} - -RDOC_OPTIONS = %w[--exclude definitions --exclude indexes] -RDOC_EXTRA_FILES = %w[README CHANGES] - BUILD_TZ_CLASSES_DIR = 'lib/tzinfo.build_tz_classes' -SPEC = Gem::Specification.new do |s| - s.name = "tzinfo" - s.version = PKG_VERSION - s.author = "Philip Ross" - s.email = "phil.ross@gmail.com" - s.homepage = "http://tzinfo.github.io" - s.platform = Gem::Platform::RUBY - s.summary = "Daylight-savings aware timezone library" - s.description = "TZInfo is a Ruby library that uses the standard tz (Olson) database to provide daylight savings aware transformations between times in different time zones." - s.files = PKG_FILES - s.test_files = PKG_TEST_FILES - s.require_path = "lib" - s.has_rdoc = true - s.extra_rdoc_files = RDOC_EXTRA_FILES - s.rdoc_options = RDOC_OPTIONS - s.rubyforge_project = "tzinfo" -end +SPEC = eval(File.read('tzinfo.gemspec')) package_task = Rake::GemPackageTask.new(SPEC) do |pkg| pkg.need_zip = true pkg.need_tar_gz = true pkg.tar_command = '__tar_with_owner__' @@ -134,24 +103,24 @@ Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'doc' rdoc.title = "TZInfo" rdoc.options << '--inline-source' - rdoc.options.concat RDOC_OPTIONS - rdoc.rdoc_files.include(*RDOC_EXTRA_FILES) + rdoc.options.concat SPEC.rdoc_options + rdoc.rdoc_files.include(*SPEC.extra_rdoc_files) rdoc.rdoc_files.include('lib') end task :build_tz_modules do require 'lib/tzinfo/tzdataparser' FileUtils.mkdir_p(BUILD_TZ_CLASSES_DIR) begin - p = TZInfo::TZDataParser.new('../data', BUILD_TZ_CLASSES_DIR) + p = TZInfo::TZDataParser.new('data', BUILD_TZ_CLASSES_DIR) p.execute - scm = Scm.create(File.join(File.dirname(__FILE__), '..')) + scm = Scm.create(File.dirname(__FILE__)) ['indexes', 'definitions'].each do |dir| scm.sync("#{BUILD_TZ_CLASSES_DIR}/#{dir}", "lib/tzinfo/#{dir}") end ensure @@ -296,18 +265,18 @@ end task :build_tz_module do require 'lib/tzinfo/tzdataparser' - p = TZInfo::TZDataParser.new('../data', 'lib/tzinfo') + p = TZInfo::TZDataParser.new('data', 'lib/tzinfo') p.generate_countries = false p.only_zones = [ENV['zone']] p.execute end task :build_countries do require 'lib/tzinfo/tzdataparser' - p = TZInfo::TZDataParser.new('../data', 'lib/tzinfo') + p = TZInfo::TZDataParser.new('data', 'lib/tzinfo') p.generate_countries = true p.generate_zones = false p.execute end