[SCM] vim-addon-manager packaging branch, master, updated. v0.4.4-52-geef7258

Antonio Terceiro terceiro at debian.org
Tue Jan 31 23:33:18 UTC 2012


The following commit has been merged in the master branch:
commit 4db7a692752e37aede4f06e7bdde8c73c69c2fda
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sun Jan 22 10:52:50 2012 -0200

    Remove warning on Ruby 1.9 caused by ambiguous syntax

diff --git a/bin/vim-addons b/bin/vim-addons
index 46ae423..d0d0d4f 100755
--- a/bin/vim-addons
+++ b/bin/vim-addons
@@ -248,7 +248,7 @@ cmd, args, options = parse_cmdline
 registry = Vim::AddonManager::Registry.new(options[:registry_dir], options[:source_dir])
 selected_addons =
   args.empty? ? registry.to_a : registry.select {|a| args.member? a.name}
-unknown = args.select {|name| not (registry.any? {|a| a.name == name})}
+unknown = args.select {|name| registry.all? {|a| a.name != name} }
 logger.warn "Ignoring unknown addons: #{unknown.join ', '}" unless unknown.empty?
 
 case cmd
diff --git a/features/install.feature b/features/install.feature
index a0b9178..24b8fdd 100644
--- a/features/install.feature
+++ b/features/install.feature
@@ -3,3 +3,7 @@ Feature: installing addons
   Scenario: installing foo
     When I run `vim-addons install foo`
     Then foo should be installed
+
+  Scenario: unknown addons
+    When I run `vim-addons install addonthatdoesnotexist`
+    Then vim-addons should warn "Ignoring unknown addons: addonthatdoesnotexist"
diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb
index 1247ac2..5b4b430 100644
--- a/features/step_definitions/steps.rb
+++ b/features/step_definitions/steps.rb
@@ -18,7 +18,13 @@ end
 When /^I run `vim\-addons (.*)`$/ do |args|
   command = [ruby, "-I#{libdir}", vim_addons, '--silent', '--registry-dir', registry, '--source-dir', source, '--target-dir', @tmpdir]
   args.split.each { |a| command << a }
-  system *command
+
+  stdout = File.join(@tmpdir, 'stdout')
+  stderr = File.join(@tmpdir, 'stderr')
+
+  system("#{command.join(' ')} >#{stdout} 2>#{stderr}")
+  @stdout = File.read(stdout)
+  @stderr = File.read(stderr)
 end
 
 Then /^foo should be installed$/ do
@@ -32,3 +38,7 @@ end
 Then /^(.*) should not be installed anymore$/ do |addon|
   Dir.glob(File.join(@tmpdir, '*/foo.vim')).should be_empty
 end
+
+Then /^vim-addons should warn "([^"]*)"$/ do |text|
+  @stderr.should =~ Regexp.new(text)
+end

-- 
vim-addon-manager packaging



More information about the pkg-vim-maintainers mailing list