vim-flavor 2.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +12 -0
  3. data/.github/workflows/ci.yml +35 -0
  4. data/.ruby-version +1 -0
  5. data/README.md +126 -45
  6. data/Rakefile +11 -0
  7. data/config/cucumber.yml +1 -0
  8. data/features/.nav +2 -1
  9. data/features/backward_compatibilities/flavorfile.feature +166 -0
  10. data/features/backward_compatibilities/lockfile.feature +22 -0
  11. data/features/branches/changing_tracking_branches.feature +0 -3
  12. data/features/branches/detect_incompatible_declarations.feature +0 -2
  13. data/features/branches/install.feature +0 -2
  14. data/features/branches/update.feature +0 -1
  15. data/features/caching/deployment.feature +1 -0
  16. data/features/flavorfile/README.md +1 -1
  17. data/features/flavorfile/comments.feature +0 -1
  18. data/features/flavorfile/groups.feature +0 -3
  19. data/features/flavorfile/repository_name.feature +0 -3
  20. data/features/flavorfile/version_constraint.feature +3 -7
  21. data/features/install_vim_flavor.md +6 -12
  22. data/features/news.md +72 -0
  23. data/features/philosophy.md +4 -4
  24. data/features/resolve_dependencies/README.md +4 -3
  25. data/features/resolve_dependencies/basics.feature +0 -4
  26. data/features/resolve_dependencies/upgrade_outdated_dependencies.feature +0 -2
  27. data/features/resolve_dependencies/version_conflict.feature +0 -2
  28. data/features/step_definitions/cli_steps.rb +6 -1
  29. data/features/step_definitions/dependency_steps.rb +2 -1
  30. data/features/step_definitions/directory_steps.rb +1 -1
  31. data/features/step_definitions/file_steps.rb +2 -2
  32. data/features/step_definitions/flavor_steps.rb +25 -9
  33. data/features/step_definitions/flavorfile_steps.rb +10 -1
  34. data/features/step_definitions/lockfile_steps.rb +14 -5
  35. data/features/support/env.rb +22 -12
  36. data/features/testing_vim_plugins/README.md +7 -6
  37. data/features/testing_vim_plugins/dependencies.feature +2 -3
  38. data/features/testing_vim_plugins/failures.feature +3 -3
  39. data/features/testing_vim_plugins/specifying_test_scripts.feature +3 -3
  40. data/features/testing_vim_plugins/typical_usage.feature +30 -7
  41. data/features/typical_usage/README.md +7 -7
  42. data/features/typical_usage/deploy_to_arbitrary_place.feature +0 -1
  43. data/features/typical_usage/install_vim_plugins.feature +0 -1
  44. data/features/typical_usage/uninstall_vim_plugins.feature +0 -1
  45. data/features/typical_usage/update_vim_plugins.feature +0 -3
  46. data/features/uninstall_vim_flavor.md +3 -4
  47. data/features/version_lock.feature +0 -1
  48. data/features/version_tag_format.feature +0 -4
  49. data/lib/vim-flavor/cli.rb +2 -2
  50. data/lib/vim-flavor/console.rb +22 -0
  51. data/lib/vim-flavor/facade.rb +18 -49
  52. data/lib/vim-flavor/flavor.rb +2 -2
  53. data/lib/vim-flavor/flavorfile.rb +24 -1
  54. data/lib/vim-flavor/lockfile.rb +15 -0
  55. data/lib/vim-flavor/shellutility.rb +2 -1
  56. data/lib/vim-flavor/stringextension.rb +3 -11
  57. data/lib/vim-flavor/version.rb +1 -1
  58. data/lib/vim-flavor.rb +1 -1
  59. data/spec/branchversion_spec.rb +4 -4
  60. data/spec/stringextension_spec.rb +31 -0
  61. data/vim-flavor.gemspec +8 -5
  62. metadata +69 -26
  63. data/.travis.yml +0 -7
  64. data/features/step_definitions/bootstrap_script_steps.rb +0 -6
  65. data/spec/facade_spec.rb +0 -57
@@ -26,21 +26,21 @@ and `vim-flavor` does it.
26
26
  cd $YOUR_REPOSITORY_FOR_DOTFILES
27
27
 
28
28
  # Add, delete or change declarations which versions of Vim plugins to use.
29
- vim VimFlavor
29
+ vim Flavorfile
30
30
 
31
- # Install Vim plugins according to VimFlavor.
31
+ # Install Vim plugins according to Flavorfile.
32
32
  vim-flavor install
33
33
 
34
34
  # Record changes to the declarations and locked status.
35
- git add VimFlavor VimFlavor.lock
35
+ git add Flavorfile Flavorfile.lock
36
36
  git commit -m '...'
37
37
 
38
38
 
39
39
 
40
40
 
41
- ## Flavorfile (`VimFlavor`)
41
+ ## Flavorfile (`Flavorfile`)
42
42
 
43
- `vim-flavor` reads a file `VimFlavor` in the current working directory.
43
+ `vim-flavor` reads a file `Flavorfile` in the current working directory.
44
44
  The file is called a flavorfile. A flavorfile contains zero or more
45
45
  declarations about Vim plugins and which versions of Vim plugins to use.
46
46
 
@@ -49,9 +49,9 @@ See also [more details about flavorfile](flavorfile).
49
49
 
50
50
 
51
51
 
52
- ## Lockfile (`VimFlavor.lock`)
52
+ ## Lockfile (`Flavorfile.lock`)
53
53
 
54
- `vim-flavor` creates a file `VimFlavor.lock` in the current working directory.
54
+ `vim-flavor` creates a file `Flavorfile.lock` in the current working directory.
55
55
  The file is called a lockfile. A lockfile contains details about installed
56
56
  Vim plugins to use the same configuration on every machine.
57
57
 
@@ -19,5 +19,4 @@ Feature: Deploy Vim plugins to a non-standard directory
19
19
  """
20
20
  $foo_uri (1.0.2)
21
21
  """
22
- And a bootstrap script is created in "my-vimfiles"
23
22
  And a flavor "$foo_uri" version "1.0.2" is deployed to "my-vimfiles"
@@ -21,5 +21,4 @@ Feature: Install Vim plugins
21
21
  """
22
22
  $foo_uri (1.0.2)
23
23
  """
24
- And a bootstrap script is created in "$home/.vim"
25
24
  And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
@@ -26,6 +26,5 @@ Feature: Uninstall Vim plugins
26
26
  """
27
27
  $bar_uri (2.0.2)
28
28
  """
29
- And a bootstrap script is created in "$home/.vim"
30
29
  And a flavor "$bar_uri" version "2.0.2" is deployed to "$home/.vim"
31
30
  But a flavor "$foo_uri" is not deployed to "$home/.vim"
@@ -30,7 +30,6 @@ Feature: Update Vim plugins
30
30
  $baz_uri (1.0.2)
31
31
  $foo_uri (1.0.2)
32
32
  """
33
- And a bootstrap script is created in "$home/.vim"
34
33
  And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
35
34
  And a flavor "$bar_uri" version "1.0.2" is deployed to "$home/.vim"
36
35
  And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
@@ -56,7 +55,6 @@ Feature: Update Vim plugins
56
55
  $baz_uri (1.0.2)
57
56
  $foo_uri (1.0.2)
58
57
  """
59
- And a bootstrap script is created in "$home/.vim"
60
58
  And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
61
59
  And a flavor "$bar_uri" version "1.0.0" is deployed to "$home/.vim"
62
60
  And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
@@ -82,7 +80,6 @@ Feature: Update Vim plugins
82
80
  $baz_uri (1.0.2)
83
81
  $foo_uri (1.0.2)
84
82
  """
85
- And a bootstrap script is created in "$home/.vim"
86
83
  And a flavor "$foo_uri" version "1.0.2" is deployed to "$home/.vim"
87
84
  And a flavor "$bar_uri" version "1.0.2" is deployed to "$home/.vim"
88
85
  And a flavor "$baz_uri" version "1.0.2" is deployed to "$home/.vim"
@@ -1,11 +1,10 @@
1
1
  ## Uninstallation steps
2
2
 
3
- rm -r ~/.vim-flavor
4
- rm -r ~/.vim/flavors # or ~/vimfiles/flavors etc.
3
+ rm -rf ~/.vim-flavor
4
+ rm -rf ~/.vim/pack/flavors
5
5
 
6
6
  cd $YOUR_REPOSITORY_FOR_DOTFILES
7
- rm VimFlavor VimFlavor.lock
8
- vim vimrc # Remove the "runtime flavors/bootstrap.vim" line.
7
+ rm Flavorfile Flavorfile.lock
9
8
  git commit -am 'Farewell to vim-flavor'
10
9
 
11
10
  gem uninstall vim-flavor
@@ -19,5 +19,4 @@ Feature: Version lock
19
19
  """
20
20
  $foo_uri (1.0.0)
21
21
  """
22
- And a bootstrap script is created in "$home/.vim"
23
22
  And a flavor "$foo_uri" version "1.0.0" is deployed to "$home/.vim"
@@ -26,7 +26,6 @@ Feature: Version tag format
26
26
  """
27
27
  $foo_uri (1.2.3)
28
28
  """
29
- And a bootstrap script is created in "$home/.vim"
30
29
  And a flavor "$foo_uri" version "1.2.3" is deployed to "$home/.vim"
31
30
  When I run `vim-flavor install`
32
31
  Then it should pass with template:
@@ -57,7 +56,6 @@ Feature: Version tag format
57
56
  """
58
57
  $foo_uri (v1.2.3)
59
58
  """
60
- And a bootstrap script is created in "$home/.vim"
61
59
  And a flavor "$foo_uri" version "v1.2.3" is deployed to "$home/.vim"
62
60
  When I run `vim-flavor install`
63
61
  Then it should pass with template:
@@ -86,7 +84,6 @@ Feature: Version tag format
86
84
  There is no valid version
87
85
  """
88
86
  And a lockfile is not created
89
- And a bootstrap script is not created in "$home/.vim"
90
87
  And a flavor "$foo_uri" is not deployed to "$home/.vim"
91
88
 
92
89
  Scenario: Without tags
@@ -106,5 +103,4 @@ Feature: Version tag format
106
103
  There is no valid version
107
104
  """
108
105
  And a lockfile is not created
109
- And a bootstrap script is not created in "$home/.vim"
110
106
  And a flavor "$foo_uri" is not deployed to "$home/.vim"
@@ -9,7 +9,7 @@ module Vim
9
9
  :banner => 'DIR'
10
10
  end
11
11
 
12
- desc 'install', 'Install Vim plugins according to VimFlavor file.'
12
+ desc 'install', 'Install Vim plugins according to Flavofile.'
13
13
  common_options_to_deploy
14
14
  def install
15
15
  Facade.new().install(
@@ -18,7 +18,7 @@ module Vim
18
18
  end
19
19
 
20
20
  desc 'update [REPO_NAME...]',
21
- 'Update Vim plugins according to VimFlavor file.'
21
+ 'Update Vim plugins according to Flavorfile.'
22
22
  common_options_to_deploy
23
23
  def update(*repo_names)
24
24
  Facade.new().update(
@@ -0,0 +1,22 @@
1
+ require 'pastel'
2
+
3
+ module Vim
4
+ module Flavor
5
+ module Console
6
+ class << self
7
+ private def pastel
8
+ @pastel ||= Pastel.new(enabled: $stdout.tty?)
9
+ end
10
+
11
+ def warn message
12
+ puts pastel.yellow("Warning: #{message}")
13
+ end
14
+
15
+ def error message
16
+ puts pastel.red("Error: #{message}")
17
+ exit(1)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -20,39 +20,42 @@ module Vim
20
20
  def test(files_or_dirs, options)
21
21
  trace "-------- Preparing dependencies\n"
22
22
 
23
- flavorfile = FlavorFile.load_or_new(Dir.getwd().to_flavorfile_path)
23
+ flavorfile_path = FlavorFile.path_from(Dir.getwd(), true)
24
+ flavorfile = FlavorFile.load_or_new(flavorfile_path)
24
25
  flavorfile.flavor 'kana/vim-vspec', '~> 1.5', :group => :development unless
25
26
  flavorfile.flavor_table.has_key?('kana/vim-vspec')
26
- lockfile = LockFile.load_or_new(Dir.getwd().to_lockfile_path)
27
+ lockfile_path = LockFile.path_from(Dir.getwd(), true)
28
+ lockfile = LockFile.load_or_new(lockfile_path)
29
+ flavors_path = Dir.getwd().to_stash_path.to_flavors_path
27
30
 
28
31
  refresh_flavors(
29
32
  options[:update_dependencies] ? :update : :install,
30
33
  flavorfile,
31
34
  lockfile,
32
35
  [:runtime, :development],
33
- Dir.getwd().to_stash_path.to_deps_path
36
+ flavors_path
34
37
  )
35
38
 
36
39
  trace "-------- Testing a Vim plugin\n"
37
40
 
38
- this_path = Dir.getwd()
39
- deps_path = this_path.to_stash_path.to_deps_path
40
- runner = "#{deps_path}/#{'kana/vim-vspec'.zap}/bin/prove-vspec"
41
+ runner = "#{flavors_path}/#{'kana/vim-vspec'.zap}/bin/prove-vspec"
41
42
  plugin_paths = lockfile.flavors.map {|f|
42
- "#{deps_path}/#{f.repo_name.zap}"
43
+ "#{flavors_path}/#{f.repo_name.zap}"
43
44
  }
44
- runtime_paths = ([this_path] + plugin_paths).flat_map {|p| ['-d', p]}
45
+ runtime_paths = ([Dir.getwd()] + plugin_paths).flat_map {|p| ['-d', p]}
45
46
  command =
46
47
  %Q{ '#{runner}' \
47
48
  #{runtime_paths.flat_map {|p| ['-d', p]}.shelljoin} \
48
49
  #{files_or_dirs.shelljoin} }
49
- succeeded = system(command)
50
+ succeeded = system('bash', '-c', command)
50
51
  exit(1) unless succeeded
51
52
  end
52
53
 
53
54
  def install_or_update(mode, vimfiles_path)
54
- flavorfile = FlavorFile.load(Dir.getwd().to_flavorfile_path)
55
- lockfile = LockFile.load_or_new(Dir.getwd().to_lockfile_path)
55
+ flavorfile_path = FlavorFile.path_from(Dir.getwd(), true)
56
+ flavorfile = FlavorFile.load_or_new(flavorfile_path)
57
+ lockfile_path = LockFile.path_from(Dir.getwd(), true)
58
+ lockfile = LockFile.load_or_new(lockfile_path)
56
59
  refresh_flavors(
57
60
  mode,
58
61
  flavorfile,
@@ -175,7 +178,8 @@ module Vim
175
178
 
176
179
  def complete_a_flavor_dependencies(nf, locked_flavor_table, mode, groups, level)
177
180
  nf.checkout()
178
- ff = FlavorFile.load_or_new(nf.cached_repo_path.to_flavorfile_path)
181
+ flavorfile_path = FlavorFile.path_from(nf.cached_repo_path, false)
182
+ ff = FlavorFile.load_or_new(flavorfile_path)
179
183
  complete_flavors(ff.flavor_table, locked_flavor_table, mode, groups, level + 1, nf.repo_name)
180
184
  end
181
185
 
@@ -183,7 +187,8 @@ module Vim
183
187
  trace "Deploying plugins...\n"
184
188
 
185
189
  a_flavors_path = File.absolute_path(flavors_path)
186
- deployment_memo = LockFile.load_or_new(a_flavors_path.to_lockfile_path)
190
+ lockfile_path = LockFile.path_from(a_flavors_path, false)
191
+ deployment_memo = LockFile.load_or_new(lockfile_path)
187
192
 
188
193
  # To uninstall flavors which were deployed by vim-flavor 1.0.2 or
189
194
  # older, the whole deployed flavors have to be removed. Because
@@ -193,8 +198,6 @@ module Vim
193
198
  :secure => true
194
199
  ) if deployment_memo.flavors.empty?
195
200
 
196
- create_vim_script_for_bootstrap(a_flavors_path)
197
-
198
201
  flavors.
199
202
  before_each {|f| trace " #{f.repo_name} #{f.locked_version} ..."}.
200
203
  on_failure {trace " failed\n"}.
@@ -228,40 +231,6 @@ module Vim
228
231
  deployment_memo.save()
229
232
  end
230
233
 
231
- def create_vim_script_for_bootstrap(flavors_path)
232
- bootstrap_path = flavors_path.to_bootstrap_path
233
- FileUtils.mkdir_p(File.dirname(bootstrap_path))
234
- File.open(bootstrap_path, 'w') do |f|
235
- f.write(<<-'END')
236
- function! s:bootstrap()
237
- let current_rtp = &runtimepath
238
- let current_rtps = split(current_rtp, ',')
239
- set runtimepath&
240
- let default_rtp = &runtimepath
241
- let default_rtps = split(default_rtp, ',')
242
- let user_dir = default_rtps[0]
243
- let user_after_dir = default_rtps[-1]
244
- let base_rtps =
245
- \ filter(copy(current_rtps),
246
- \ 'v:val !=# user_dir && v:val !=# user_after_dir')
247
- let flavor_dirs =
248
- \ filter(split(glob(user_dir . '/flavors/*'), '\n'),
249
- \ 'isdirectory(v:val)')
250
- let new_rtps =
251
- \ []
252
- \ + [user_dir]
253
- \ + flavor_dirs
254
- \ + base_rtps
255
- \ + map(reverse(copy(flavor_dirs)), 'v:val . "/after"')
256
- \ + [user_after_dir]
257
- let &runtimepath = join(new_rtps, ',')
258
- endfunction
259
-
260
- call s:bootstrap()
261
- END
262
- end
263
- end
264
-
265
234
  def trace message
266
235
  print message
267
236
  end
@@ -25,7 +25,7 @@ module Vim
25
25
  end
26
26
 
27
27
  def cached_version?(version)
28
- system <<-"END"
28
+ system 'bash', '-c', <<-"END"
29
29
  {
30
30
  cd '#{cached_repo_path}' &&
31
31
  git rev-list --quiet '#{version.to_revision}' --
@@ -74,7 +74,7 @@ module Vim
74
74
  sh %Q{
75
75
  {
76
76
  cd '#{cached_repo_path}' &&
77
- git fetch origin --tags 'refs/heads/*:refs/remotes/origin/*'
77
+ git fetch origin --tags '+refs/heads/*:refs/remotes/origin/*'
78
78
  } 2>&1
79
79
  }
80
80
  end
@@ -1,3 +1,5 @@
1
+ require 'pathname'
2
+
1
3
  module Vim
2
4
  module Flavor
3
5
  class FlavorFile
@@ -16,7 +18,7 @@ module Vim
16
18
 
17
19
  def self.load_or_new(flavorfile_path)
18
20
  ff = new()
19
- ff.load(flavorfile_path) if File.exists?(flavorfile_path)
21
+ ff.load(flavorfile_path) if FileTest.exists?(flavorfile_path)
20
22
  ff
21
23
  end
22
24
 
@@ -26,6 +28,27 @@ module Vim
26
28
  ff
27
29
  end
28
30
 
31
+ def self.path_from(dir_path, warn)
32
+ flavorfile_path = dir_path.to_flavorfile_path
33
+ new_path = Pathname.new(flavorfile_path).relative_path_from(Pathname.getwd())
34
+ old_path = new_path.dirname() / 'VimFlavor'
35
+
36
+ path = if FileTest.exists?(new_path)
37
+ if warn and FileTest.exists?(old_path)
38
+ Console::warn "Delete #{old_path}. #{new_path} is being read instead."
39
+ end
40
+ new_path
41
+ elsif FileTest.exists?(old_path)
42
+ if warn
43
+ Console::warn "Rename #{old_path} to #{new_path}. #{old_path} wll be ignored in future version."
44
+ end
45
+ old_path
46
+ else
47
+ new_path
48
+ end
49
+ path.to_s
50
+ end
51
+
29
52
  def load(flavorfile_path)
30
53
  instance_eval(
31
54
  File.open(flavorfile_path, 'r').read(),
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  module Vim
2
4
  module Flavor
3
5
  class LockFile
@@ -7,6 +9,18 @@ module Vim
7
9
  l
8
10
  end
9
11
 
12
+ def self.path_from(dir_path, error)
13
+ lockfile_path = dir_path.to_lockfile_path
14
+ new_path = Pathname.new(lockfile_path).relative_path_from(Pathname.getwd())
15
+ old_path = new_path.dirname() / 'VimFlavor.lock'
16
+
17
+ if error and FileTest.exists?(old_path)
18
+ Console::error "#{old_path} is no longer used. Rename it to #{new_path}."
19
+ end
20
+
21
+ new_path.to_s
22
+ end
23
+
10
24
  def initialize(path)
11
25
  @path = path
12
26
  end
@@ -38,6 +52,7 @@ module Vim
38
52
  end
39
53
 
40
54
  def save()
55
+ FileUtils.mkdir_p(File.dirname(@path))
41
56
  File.open(@path, 'w') do |io|
42
57
  lines = flavors.flat_map {|f| self.class.serialize_lock_status(f)}
43
58
  lines.each do |line|
@@ -2,7 +2,8 @@ module Vim
2
2
  module Flavor
3
3
  module ShellUtility
4
4
  def sh script
5
- output = send(:`, script)
5
+ output = IO.popen(['bash', '-c', script], 'r', &:read)
6
+
6
7
  if $? == 0
7
8
  output
8
9
  else
@@ -1,24 +1,16 @@
1
1
  module Vim
2
2
  module Flavor
3
3
  module StringExtension
4
- def to_bootstrap_path
5
- "#{self}/bootstrap.vim"
6
- end
7
-
8
- def to_deps_path
9
- "#{self}/deps"
10
- end
11
-
12
4
  def to_flavorfile_path
13
- "#{self}/VimFlavor"
5
+ "#{self}/Flavorfile"
14
6
  end
15
7
 
16
8
  def to_flavors_path
17
- "#{self}/flavors"
9
+ "#{self}/pack/flavors/start"
18
10
  end
19
11
 
20
12
  def to_lockfile_path
21
- "#{self}/VimFlavor.lock"
13
+ "#{self}/Flavorfile.lock"
22
14
  end
23
15
 
24
16
  def to_stash_path
@@ -1,6 +1,6 @@
1
1
  module Vim
2
2
  module Flavor
3
- VERSION = '2.2.0'
3
+ VERSION = '4.0.0'
4
4
 
5
5
  class Version
6
6
  def self.create(arg)
data/lib/vim-flavor.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'bundler/setup'
2
1
  require 'vim-flavor/enumerableextension'
3
2
 
4
3
  module Vim
@@ -6,6 +5,7 @@ module Vim
6
5
  [
7
6
  :BranchVersion,
8
7
  :CLI,
8
+ :Console,
9
9
  :Env,
10
10
  :Facade,
11
11
  :Flavor,
@@ -18,10 +18,10 @@ module Vim
18
18
  end
19
19
 
20
20
  it 'is not comparable' do
21
- expect {v1 < v2}.to raise_error
22
- expect {v1 <= v2}.to raise_error
23
- expect {v1 > v2}.to raise_error
24
- expect {v1 >= v2}.to raise_error
21
+ expect {v1 < v2}.to raise_error(NoMethodError)
22
+ expect {v1 <= v2}.to raise_error(NoMethodError)
23
+ expect {v1 > v2}.to raise_error(NoMethodError)
24
+ expect {v1 >= v2}.to raise_error(NoMethodError)
25
25
  expect(v1 <=> v2).to be_nil
26
26
  end
27
27
 
@@ -3,6 +3,37 @@ require 'spec_helper'
3
3
  module Vim
4
4
  module Flavor
5
5
  describe StringExtension do
6
+ describe '#to_flavorfile_path' do
7
+ it 'extends a given path to a flavorfile' do
8
+ expect('cwd'.to_flavorfile_path).to be == 'cwd/Flavorfile'
9
+ end
10
+ end
11
+
12
+ describe '#to_flavors_path' do
13
+ it 'extends a given path to a flavors path' do
14
+ expect('home/.vim'.to_flavors_path).to be == 'home/.vim/pack/flavors/start'
15
+ end
16
+ end
17
+
18
+ describe '#to_lockfile_path' do
19
+ it 'extends a given path to a lockfile' do
20
+ expect('cwd'.to_lockfile_path).to be == 'cwd/Flavorfile.lock'
21
+ end
22
+ end
23
+
24
+ describe '#to_stash_path' do
25
+ it 'extends a given path to a stash path' do
26
+ expect('home'.to_stash_path).to be == 'home/.vim-flavor'
27
+ expect('cwd'.to_stash_path).to be == 'cwd/.vim-flavor'
28
+ end
29
+ end
30
+
31
+ describe '#to_vimfiles_path' do
32
+ it 'extends a given path to a vimfiles path' do
33
+ expect('home'.to_vimfiles_path).to be == 'home/.vim'
34
+ end
35
+ end
36
+
6
37
  describe '#zap' do
7
38
  it 'replace unsafe characters with "_"' do
8
39
  expect('fakeclip'.zap).to be == 'fakeclip'
data/vim-flavor.gemspec CHANGED
@@ -17,12 +17,15 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
+ spec.required_ruby_version = '~> 3.0'
20
21
 
21
- spec.add_dependency('parslet', '~> 1.7')
22
- spec.add_dependency('thor', '~> 0.19')
22
+ spec.add_dependency('parslet', '>= 1.8', '< 3.0')
23
+ spec.add_dependency('pastel', '~> 0.7')
24
+ spec.add_dependency('thor', '>= 0.20', '< 2.0')
23
25
 
24
- spec.add_development_dependency('aruba', '~> 0.6')
25
- spec.add_development_dependency('cucumber', '~> 1.3')
26
+ spec.add_development_dependency('aruba', '~> 0.14')
27
+ spec.add_development_dependency('cucumber', '~> 7.0')
26
28
  spec.add_development_dependency('pry')
27
- spec.add_development_dependency('rspec', '~> 2.99')
29
+ spec.add_development_dependency('relish', '~> 0.7')
30
+ spec.add_development_dependency('rspec', '~> 3.7')
28
31
  end