diff --git a/.gitignore b/.gitignore index d992b6f..e057753 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ Session.vim +.vim-flavor/ +VimFlavor.lock diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..2955e48 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'vim-flavor', '~> 1.1' + diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..5e357be --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,16 @@ +GEM + remote: https://rubygems.org/ + specs: + blankslate (2.1.2.4) + parslet (1.5.0) + blankslate (~> 2.0) + thor (0.18.1) + vim-flavor (1.1.2) + parslet (~> 1.0) + thor (~> 0.14) + +PLATFORMS + ruby + +DEPENDENCIES + vim-flavor (~> 1.1) diff --git a/Rakefile b/Rakefile new file mode 100755 index 0000000..9c019e1 --- /dev/null +++ b/Rakefile @@ -0,0 +1,13 @@ +#!/usr/bin/env rake + +task :default => :test + +task :ci => [:dump, :test] + +task :dump do + sh 'vim --version' +end + +task :test do + sh 'bundle exec vim-flavor test' +end diff --git a/VimFlavor b/VimFlavor new file mode 100644 index 0000000..232be41 --- /dev/null +++ b/VimFlavor @@ -0,0 +1 @@ +flavor 'kana/vim-textobj-user', '~> 0.3' diff --git a/test/examples.rb b/t/examples.rb similarity index 100% rename from test/examples.rb rename to t/examples.rb diff --git a/test/rubyblock_test.vim b/t/rubyblock_test.vim similarity index 94% rename from test/rubyblock_test.vim rename to t/rubyblock_test.vim index 1a67119..dd55ffa 100644 --- a/test/rubyblock_test.vim +++ b/t/rubyblock_test.vim @@ -1,4 +1,3 @@ -" nnoremap r :wa ! ../vspec/bin/vspec ../vspec/ ../textobj-user . test/rubyblock_test.vim silent filetype indent plugin on runtime! macros/matchit.vim runtime! plugin/textobj/*.vim @@ -58,7 +57,7 @@ end describe '(textobj-rubyblock-i)' before - silent tabnew test/samples/class.rb + silent tabnew t/samples/class.rb end after @@ -74,7 +73,7 @@ end describe '(textobj-rubyblock-a)' before - silent tabnew test/samples/class.rb + silent tabnew t/samples/class.rb end after @@ -90,7 +89,7 @@ end describe '(textobj-rubyblock-i)' before - silent tabnew test/samples/commented-end.rb + silent tabnew t/samples/commented-end.rb end after @@ -108,7 +107,7 @@ end describe 'if/else blocks' before - silent tabnew test/samples/if-else.rb + silent tabnew t/samples/if-else.rb end after @@ -143,7 +142,7 @@ end describe 'nested blocks: (module > class > def > do)' before - silent tabnew test/samples/nested-blocks.rb + silent tabnew t/samples/nested-blocks.rb end after @@ -242,7 +241,7 @@ describe 'rubyblocks with a method call' end it 'handles `end.max` style method invocations' - silent tabnew test/samples/map-dot-max.rb + silent tabnew t/samples/map-dot-max.rb Expect SelectInsideFrom(2, '^') ==# [2, 2, 2] Expect SelectAroundFrom(2, '^') ==# [2, 1, 3] end @@ -252,7 +251,7 @@ end describe 'oneline conditionals' before - silent tabnew test/samples/oneline-conditionals.rb + silent tabnew t/samples/oneline-conditionals.rb end after diff --git a/test/samples/class.rb b/t/samples/class.rb similarity index 100% rename from test/samples/class.rb rename to t/samples/class.rb diff --git a/t/samples/commented-end.rb b/t/samples/commented-end.rb new file mode 100644 index 0000000..ed09dc6 --- /dev/null +++ b/t/samples/commented-end.rb @@ -0,0 +1,3 @@ +class Foo + # this is a comment with no end +end diff --git a/test/samples/if-else.rb b/t/samples/if-else.rb similarity index 100% rename from test/samples/if-else.rb rename to t/samples/if-else.rb diff --git a/test/samples/map-dot-max.rb b/t/samples/map-dot-max.rb similarity index 100% rename from test/samples/map-dot-max.rb rename to t/samples/map-dot-max.rb diff --git a/test/samples/nested-blocks.rb b/t/samples/nested-blocks.rb similarity index 100% rename from test/samples/nested-blocks.rb rename to t/samples/nested-blocks.rb diff --git a/test/samples/oneline-conditionals.rb b/t/samples/oneline-conditionals.rb similarity index 100% rename from test/samples/oneline-conditionals.rb rename to t/samples/oneline-conditionals.rb diff --git a/test/samples/commented-end.rb b/test/samples/commented-end.rb deleted file mode 100644 index 66f644a..0000000 --- a/test/samples/commented-end.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Foo - # this is a comment with no *end -end