Rakefile in alexandria-book-collection-manager-0.7.1 vs Rakefile in alexandria-book-collection-manager-0.7.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # -*- ruby -*- #-- # Copyright (C) 2009 Cathal Mc Ginley # Copyright (C) 2011, 2014, 2016 Matijs van Zuijlen # @@ -37,11 +39,11 @@ require_relative 'lib/alexandria/version' stage_dir = ENV['DESTDIR'] || 'tmp' prefix_dir = ENV['PREFIX'] || '/usr' -PROJECT = 'alexandria'.freeze +PROJECT = 'alexandria' PREFIX = prefix_dir share_dir = ENV['SHARE'] || "#{PREFIX}/share" SHARE = share_dir GettextGenerateTask.new(PROJECT) do |g| @@ -59,11 +61,11 @@ 'data/sounds/**/*.ogg'].freeze # , 'data/menu/*'] ICON_FILE_GLOBS = ['data/app-icon/**/*.png', 'data/app-icon/scalable/*.svg'].freeze -PIXMAP_GLOBS = 'data/app-icon/32x32/*.xpm'.freeze +PIXMAP_GLOBS = 'data/app-icon/32x32/*.xpm' def install_common(install_task) install_task.install_exe('bin', 'bin/*', "#{PREFIX}/bin") install_task.install('lib', 'lib/**/*.rb', install_task.rubylib) @@ -83,11 +85,11 @@ task debian_install: :install_package_staging FileInstallTask.new(:package) do |j| install_common(j) - docs = %w(README.rdoc NEWS INSTALL.rdoc COPYING TODO.md) + docs = %w(README.rdoc CHANGELOG.md INSTALL.md COPYING TODO.md) devel_docs = ['doc/AUTHORS', 'doc/BUGS', 'doc/FAQ', 'doc/cuecat_support.rdoc'] j.install('', docs, "#{SHARE}/doc/#{PROJECT}") j.install('doc', devel_docs, "#{SHARE}/doc/#{PROJECT}") @@ -131,11 +133,11 @@ else value.strip end end -SCHEMA_PATH = 'schemas/alexandria.schemas'.freeze +SCHEMA_PATH = 'schemas/alexandria.schemas' # This generates default_preferences.rb by copying over values from # providers_priority key in alexandria.schemas (necessary?) file 'lib/alexandria/default_preferences.rb' => [SCHEMA_PATH] do |f| @@ -172,11 +174,13 @@ generate(f.name) do <<EOS module Alexandria class Preferences - DEFAULT_VALUES = {#{generated_lines.join(",\n ")}} + DEFAULT_VALUES = { + #{generated_lines.join(",\n ")} + } end end EOS end end @@ -211,12 +215,12 @@ ## # # # package task # # # ## Rake::PackageTask.new(PROJECT, Alexandria::DISPLAY_VERSION) do |p| p.need_tar_gz = true - p.package_files.include('README*', 'COPYING', 'CHANGELOG.md', 'INSTALL.rdoc', - 'NEWS', 'Rakefile', 'util/**/*', + p.package_files.include('README.md', 'COPYING', 'CHANGELOG.md', 'INSTALL.md', + 'Rakefile', 'util/**/*', 'TODO.md', 'alexandria.desktop', 'alexandria.desktop.in', 'bin/**/*', 'data/**/*', 'misc/**/*', 'doc/**/*', 'lib/**/*', 'po/**/*', 'schemas/**/*', 'spec/**/*') @@ -237,12 +241,10 @@ end task :gconf do return if ENV['GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL'] - unless system('which gconftool-2') - raise 'gconftool-2 cannot be found, is GConf2 correctly installed?' - end + raise 'gconftool-2 cannot be found, is GConf2 correctly installed?' unless system('which gconftool-2') ENV['GCONF_CONFIG_SOURCE'] = `gconftool-2 --get-default-source`.chomp Dir['schemas/*.schemas'].each do |schema| system("gconftool-2 --makefile-install-rule '#{schema}'") end