From 1315e3b76f389a808068d6243b03b1edabf9d561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 May 2016 08:14:09 +0200 Subject: [PATCH 1/2] Update to Command-T 3.0.2. --- .gitignore | 1 + sources | 2 +- ...command-t-1.10-support-Rspec-3-style.patch | 46 ------------------- vim-command-t.spec | 30 +++++------- 4 files changed, 14 insertions(+), 65 deletions(-) delete mode 100644 vim-command-t-1.10-support-Rspec-3-style.patch diff --git a/.gitignore b/.gitignore index ea7ed76..1b2be14 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /command-t-1.10.tar.gz /command-t-1.13.tar.gz /command-t-2.0.zip +/command-t-3.0.2.zip diff --git a/sources b/sources index fbed601..ba67993 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -05bef9a19943f869b6e6fb31bde0bebf command-t-2.0.zip +2f4d086bf1c8b64edeb803c6af46fe8e command-t-3.0.2.zip diff --git a/vim-command-t-1.10-support-Rspec-3-style.patch b/vim-command-t-1.10-support-Rspec-3-style.patch deleted file mode 100644 index 96476a7..0000000 --- a/vim-command-t-1.10-support-Rspec-3-style.patch +++ /dev/null @@ -1,46 +0,0 @@ -From af2f6a55c745c2a3368f6146f1003c709541c813 Mon Sep 17 00:00:00 2001 -From: Mamoru TASAKA -Date: Sun, 18 Jan 2015 13:20:48 +0900 -Subject: [PATCH] support Rspec 3 style - -Just change be_true to be_truthy, be_false to be_falsey ---- - spec/command-t/watchman/utils_spec.rb | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/spec/command-t/watchman/utils_spec.rb b/spec/command-t/watchman/utils_spec.rb -index 4bb5c4e..80cc899 100644 ---- a/spec/command-t/watchman/utils_spec.rb -+++ b/spec/command-t/watchman/utils_spec.rb -@@ -71,11 +71,11 @@ describe CommandT::Watchman::Utils do - end - - it 'roundtrips `true` booleans' do -- expect(roundtrip(true)).to be_true -+ expect(roundtrip(true)).to be_truthy - end - - it 'roundtrips `false` booleans' do -- expect(roundtrip(false)).to be_false -+ expect(roundtrip(false)).to be_falsey - end - - it 'roundtrips nil' do -@@ -278,12 +278,12 @@ describe CommandT::Watchman::Utils do - - it 'loads boolean `true` values' do - input = binary("\x00\x01\x03\x01\x08") -- expect(described_class.load(input)).to be_true -+ expect(described_class.load(input)).to be_truthy - end - - it 'loads boolean `false` values' do - input = binary("\x00\x01\x03\x01\x09") -- expect(described_class.load(input)).to be_false -+ expect(described_class.load(input)).to be_falsey - end - - it 'loads nil' do --- -2.2.1 - diff --git a/vim-command-t.spec b/vim-command-t.spec index 77c54ca..bce5256 100644 --- a/vim-command-t.spec +++ b/vim-command-t.spec @@ -7,16 +7,13 @@ %global appdata_dir %{_datadir}/appdata Name: vim-command-t -Version: 2.0 -Release: 2%{?dist} +Version: 3.0.2 +Release: 1%{?dist} Summary: An extremely fast, intuitive mechanism for opening files in VIM Group: Applications/Editors License: BSD URL: https://wincent.com/products/command-t Source0: http://s3.wincent.com/command-t/releases/command-t-%{version}.zip -# Support rspec3 style -# https://github.com/wincent/command-t/issues/190 -Patch1: vim-command-t-1.10-support-Rspec-3-style.patch Requires: ruby(release) # Although command-t does not depend on rubygems directly, the RubyGems are # required by Ruby, but not always (rhbz#845011). So it is necessary to enforce @@ -47,8 +44,6 @@ more weight. %prep %setup -q -c -%patch1 -p1 - %build pushd ./ruby/command-t @@ -70,10 +65,6 @@ mv %{buildroot}%{vimfiles}/ruby/command-t/ext.so %{buildroot}%{commandt_so_dir} # Remove all dot files. find %{buildroot}%{vimfiles} -name '.*' -delete -# Replace symlink with copy. -rm README.txt -cp -pa doc/command-t.txt README.txt - # Install AppData. mkdir -p %{buildroot}%{appdata_dir} install -m 644 appstream/vim-command-t.metainfo.xml %{buildroot}%{appdata_dir} @@ -82,12 +73,12 @@ install -m 644 appstream/vim-command-t.metainfo.xml %{buildroot}%{appdata_dir} # Get rid of Bundler sed -i '/Bundler/,/^end$/ s/^/#/' spec/spec_helper.rb -# Ignore failing test: -# CommandT::Matcher#sorted_matches_for provides intuitive results for "artcon" and "articles_controller" -# https://github.com/wincent/command-t/issues/189 -sed -i '/provides intuitive results for "artcon" and "articles_controller"/,/^ end$/ s/^/#/' \ - spec/command-t/matcher_spec.rb - +## Ignore failing test: +## CommandT::Matcher#sorted_matches_for provides intuitive results for "artcon" and "articles_controller" +## https://github.com/wincent/command-t/issues/189 +#sed -i '/provides intuitive results for "artcon" and "articles_controller"/,/^ end$/ s/^/#/' \ +# spec/command-t/matcher_spec.rb +# rspec -Iruby spec %post @@ -99,7 +90,7 @@ vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null %files %license LICENSE -%doc README.txt +%doc README.md %{commandt_so_dir} %{vimfiles}/autoload/* %{vimfiles}/doc/* @@ -116,6 +107,9 @@ vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null %changelog +* Tue May 03 2016 Vít Ondruch - 3.0.2-1 +- Update to Command-T 3.0.2. + * Fri Feb 05 2016 Fedora Release Engineering - 2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From c754e868688ad78cd24073059750f81175940b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 May 2016 08:14:09 +0200 Subject: [PATCH 2/2] Relax version check. --- ..._LIB_VERSION-instead-of-RUBY_VERSION.patch | 43 +++++++++++++++++++ vim-command-t.spec | 6 +++ 2 files changed, 49 insertions(+) create mode 100644 vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch diff --git a/vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch b/vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch new file mode 100644 index 0000000..3da09ab --- /dev/null +++ b/vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch @@ -0,0 +1,43 @@ +From 4f1aefbeca21b6b3eb74252b70e8608dd20bc36a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 3 May 2016 07:45:56 +0200 +Subject: [PATCH] Check RUBY_LIB_VERSION instead of RUBY_VERSION. + +--- + autoload/commandt.vim | 3 +-- + ruby/command-t/extconf.rb | 5 +---- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/autoload/commandt.vim b/autoload/commandt.vim +index 7513f55..1299731 100644 +--- a/autoload/commandt.vim ++++ b/autoload/commandt.vim +@@ -169,8 +169,7 @@ ruby << EOF + # compiled with. + patchlevel = defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL : nil + if CommandT::Metadata::UNKNOWN == true || ( +- CommandT::Metadata::EXPECTED_RUBY_VERSION == RUBY_VERSION && +- CommandT::Metadata::EXPECTED_RUBY_PATCHLEVEL == patchlevel ++ CommandT::Metadata::EXPECTED_RUBY_LIB_VERSION == RbConfig::CONFIG['RUBY_LIB_VERSION'] + ) + require 'command-t/ext' # eager load, to catch compilation problems early + $command_t = CommandT::Controller.new +diff --git a/ruby/command-t/extconf.rb b/ruby/command-t/extconf.rb +index 8603dad..643fa6a 100644 +--- a/ruby/command-t/extconf.rb ++++ b/ruby/command-t/extconf.rb +@@ -55,10 +55,7 @@ basedir = Pathname.new(__FILE__).dirname + # This file was generated by #{(basedir + 'extconf.rb').to_s} + module CommandT + module Metadata +- EXPECTED_RUBY_VERSION = #{RUBY_VERSION.inspect} +- EXPECTED_RUBY_PATCHLEVEL = #{ +- defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL.inspect : nil.inspect +- } ++ EXPECTED_RUBY_LIB_VERSION = #{RbConfig::MAKEFILE_CONFIG['RUBY_LIB_VERSION'].inspect} + UNKNOWN = false + end # module Metadata + end # module CommandT +-- +2.8.2 + diff --git a/vim-command-t.spec b/vim-command-t.spec index bce5256..a05c6f4 100644 --- a/vim-command-t.spec +++ b/vim-command-t.spec @@ -14,6 +14,9 @@ Group: Applications/Editors License: BSD URL: https://wincent.com/products/command-t Source0: http://s3.wincent.com/command-t/releases/command-t-%{version}.zip +# Relax the Command-T version checking. +# https://github.com/wincent/command-t/issues/192 +Patch0: vim-3.0.2-Check-RUBY_LIB_VERSION-instead-of-RUBY_VERSION.patch Requires: ruby(release) # Although command-t does not depend on rubygems directly, the RubyGems are # required by Ruby, but not always (rhbz#845011). So it is necessary to enforce @@ -44,6 +47,8 @@ more weight. %prep %setup -q -c +%patch0 -p1 + %build pushd ./ruby/command-t @@ -109,6 +114,7 @@ vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null %changelog * Tue May 03 2016 Vít Ondruch - 3.0.2-1 - Update to Command-T 3.0.2. +- Relax version check. * Fri Feb 05 2016 Fedora Release Engineering - 2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild