Hello community, here is the log from the commit of package rubygem-yast-rake for openSUSE:Factory checked in at 2015-03-29 20:17:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-yast-rake (Old) and /work/SRC/openSUSE:Factory/.rubygem-yast-rake.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-yast-rake" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-yast-rake/rubygem-yast-rake.changes 2014-11-24 11:11:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-yast-rake.new/rubygem-yast-rake.changes 2015-03-29 20:17:24.000000000 +0200 @@ -1,0 +2,16 @@ +Thu Mar 26 14:08:51 UTC 2015 - lsle...@suse.cz + +- fixed gem packaging (missing "lib/tasks/spell.dict" file) +- 0.2.1 + +------------------------------------------------------------------- +Wed Mar 11 20:02:42 UTC 2015 - lsle...@suse.cz + +- added "check:spelling" task - spell check files (by default + *.md and *.html files), needs "raspell" gem (no explicit + dependency) +- do not crash when there is no "package/*.spec" file (e.g. + in yast.github.io repository) +- 0.2.0 + +------------------------------------------------------------------- Old: ---- yast-rake-0.1.10.gem New: ---- yast-rake-0.2.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-yast-rake.spec ++++++ --- /var/tmp/diff_new_pack.Z0qE71/_old 2015-03-29 20:17:25.000000000 +0200 +++ /var/tmp/diff_new_pack.Z0qE71/_new 2015-03-29 20:17:25.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-yast-rake # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: rubygem-yast-rake -Version: 0.1.10 +Version: 0.2.1 Release: 0 %define mod_name yast-rake %define mod_full_name %{mod_name}-%{version} ++++++ yast-rake-0.1.10.gem -> yast-rake-0.2.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 1970-01-01 01:00:00.000000000 +0100 +++ new/VERSION 2015-03-26 15:21:23.000000000 +0100 @@ -1 +1 @@ -0.1.10 +0.2.1 Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/spell.dict new/lib/tasks/spell.dict --- old/lib/tasks/spell.dict 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/tasks/spell.dict 2015-03-26 15:21:23.000000000 +0100 @@ -0,0 +1,43 @@ +# This is the global custom dictionary shared with all YaST repositories. +# +# Write the words in alphabetical order, one word per line. +# If an unknown word is not generic put it into the repository specific dictionary. +# +API +bnc +boolean +Bugzilla +devel +DHCP +freenode +gh +GitHub +GitHub's +html +IRC +LDAP +md +NCurses +NFS +NIS +openSUSE +osc +Rakefile +rb +refactorings +RSpec +runlevel +SCR +SLP +sudo +SUSE +systemd +testsuite +UI +WFM +workflow +yast +YaST +ycp +YCP +zypper diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/spellcheck.rake new/lib/tasks/spellcheck.rake --- old/lib/tasks/spellcheck.rake 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/tasks/spellcheck.rake 2015-03-26 15:21:23.000000000 +0100 @@ -0,0 +1,124 @@ +#-- +# Yast rake +# +# Copyright (C) 2015 Novell, Inc. +# This library is free software; you can redistribute it and/or modify +# it only under the terms of version 2.1 of the GNU Lesser General Public +# License as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +#++ +# +# Rake task for checking spelling in the documentation files. +# By default checks all *.md and *.html files. +# +# Supports custom dictionaries: +# +# - global dictionary located in the tasks gem (lib/tasks/.spell.dict) +# - repository specific dictionary (.spell.dict in the root directory) +# +# The custom dictionaries contains one word per line. +# The lines starting with '#' character are ignored (used for comments), +# + +GLOBAL_DICTIONARY_FILE = "spell.dict" +CUSTOM_DICTIONARY_FILE = ".spell.dict" + +def read_dictionary_file(file) + puts "Loading custom dictionary (#{file})..." if verbose == true + words = File.read(file).split("\n") + + # remove comments + words.reject! { |word| word.start_with?("#")} + words.each(&:chomp!) +end + +# read the global and the repository custom dictionary +def read_custom_words + # read the global default custom dictionary + dict_path = File.expand_path("../#{GLOBAL_DICTIONARY_FILE}", __FILE__) + custom_words = read_dictionary_file(dict_path) + + # read the custom dictionary from the project directory if present + dict_path = CUSTOM_DICTIONARY_FILE + if File.exist?(dict_path) + local_dict = read_dictionary_file(dict_path) + duplicates = custom_words & local_dict + + if !duplicates.empty? + $stderr.puts "Warning: Found duplicates in the local dictionary (#{dict_path}):\n" + duplicates.each {|duplicate| $stderr.puts " #{duplicate}" } + $stderr.puts + end + + custom_words += local_dict - duplicates + end + + custom_words +end + +def aspell_speller + # raspell is an optional dependency, handle the missing case nicely + begin + require "raspell" + rescue LoadError + $stderr.puts "ERROR: Ruby gem \"raspell\" is not installed." + exit 1 + end + + # initialize aspell + speller = Aspell.new("en_US") + speller.suggestion_mode = Aspell::NORMAL + # ignore the HTML tags in the text + speller.set_option("mode", "html") + + speller +end + +namespace :check do + desc "Run spell checker (by default for *.md and *.html files in Git)" + task :spelling, :regexp do |t, args| + regexp = args[:regexp] || /\.(md|html)\z/ + success = true + + files = `git ls-files . | grep -v \\.gitignore`.split("\n") + files.select!{|file| file.match(regexp)} + + custom_words = read_custom_words + speller = aspell_speller + + files.each do |file| + puts "Checking #{file}..." if verbose == true + # spell check each line separately so we can report error locations properly + lines = File.read(file).split("\n") + + lines.each_with_index do |text, index| + misspelled = speller.list_misspelled([text]) - custom_words + + if !misspelled.empty? + success = false + puts "#{file}:#{index + 1}: #{text.inspect}" + misspelled.each do |word| + puts " #{word.inspect} => #{speller.suggest(word)}" + end + puts + end + end + end + + if success + puts "Spelling OK." + else + $stderr.puts "Spellcheck failed! (Fix it or add the words to " \ + "'#{CUSTOM_DICTIONARY_FILE}' file if it is OK.)" + exit 1 + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/yast/rake.rb new/lib/yast/rake.rb --- old/lib/yast/rake.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/yast/rake.rb 2015-03-26 15:21:23.000000000 +0100 @@ -46,7 +46,8 @@ conf.obs_project = "YaST:Head" conf.obs_sr_project = "openSUSE:Factory" conf.package_name = File.read("RPMNAME").strip if File.exists?("RPMNAME") - conf.version = Yast::Tasks.spec_version + conf.version = Yast::Tasks.spec_version if !Dir.glob("package/*.spec").empty? + conf.skip_license_check << /spell.dict$/ # skip license check for spelling dictionaries end # load own tasks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 2015-03-26 15:21:23.000000000 +0100 @@ -1,41 +1,41 @@ --- !ruby/object:Gem::Specification name: yast-rake version: !ruby/object:Gem::Version - version: 0.1.10 + version: 0.2.1 platform: ruby authors: - Josef Reidinger autorequire: bindir: bin cert_chain: [] -date: 2014-11-13 00:00:00.000000000 Z +date: 2015-03-26 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: packaging_rake_tasks requirement: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: 1.0.0 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: 1.0.0 description: | @@ -47,14 +47,16 @@ extensions: [] extra_rdoc_files: [] files: -- lib/yast/rake.rb +- COPYING +- VERSION - lib/tasks/install.rake - lib/tasks/pot.rake +- lib/tasks/run.rake +- lib/tasks/spell.dict +- lib/tasks/spellcheck.rake - lib/tasks/test_unit.rake - lib/tasks/version.rake -- lib/tasks/run.rake -- COPYING -- VERSION +- lib/yast/rake.rb homepage: http://github.org/openSUSE/yast-rake licenses: - LGPL v2.1 @@ -65,17 +67,17 @@ - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.0.3 +rubygems_version: 2.2.2 signing_key: specification_version: 4 summary: Rake tasks providing basic work-flow for Yast development -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org