infect 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05d75015caec374001e4358c43d235a82d35b363
4
- data.tar.gz: 9e5ea3749966f1bc0650aaffb5e0861c454bb89b
3
+ metadata.gz: 9954bd5a373cc6a42f6fb4c0ac0474feafe9d8e9
4
+ data.tar.gz: 2727006e4ad2ee6ff29a27cb395f03342d5f8790
5
5
  SHA512:
6
- metadata.gz: e96756c93fa19f14ee5f4b772f13d4abebb3417b8bf46cbfd577048a47fa500769e968d33188feb08f1001c6de728ece48a6f5d507b1b5d028a7ab9d196e36e9
7
- data.tar.gz: d02ef3b339747ae14051c06c0a1bec0ec862125c1d3a62fb1f870b89d284e35a2d67975775d96bef742fd2bf39d942d87540401c8cede694df73ce076124d938
6
+ metadata.gz: 79c54e4f1692467ca425666f6de7bc6d7b9b5a2486e8f6abb2e513e3d83dc68767bfc6abfd83633524c8119ba6e3c623562c9719c712d245bf4ebe17fe85d248
7
+ data.tar.gz: 7039ce9fe5e4ad685a748d85470526c1ae92d6efd0356aa8fb5fe0a9b09e5fee4801a05b4faac29d7796a47af6a15259fda791cecc5181193af25204a84c8807
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infect (1.0.0)
4
+ infect (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -42,4 +42,4 @@ DEPENDENCIES
42
42
  rspec
43
43
 
44
44
  BUNDLED WITH
45
- 1.13.5
45
+ 1.13.6
data/README.md CHANGED
@@ -4,7 +4,7 @@ Package manager for [Vim 8](https://github.com/vim/vim/blob/master/runtime/doc/v
4
4
 
5
5
  The only package manager that makes no impact on start up time.
6
6
 
7
- Manage your entire vim config with a single `.vimrc` file, while keeping the vimrc file functional on systems with out any custom plugins installed, or with older versions of Vim.
7
+ Manage your entire vim config with a single `.vimrc` file, while keeping the `.vimrc` file functional on systems with out any custom plugins installed, or with older versions of Vim.
8
8
 
9
9
  ## Installation
10
10
 
@@ -30,13 +30,13 @@ Why invent another way of managing vim plugins?
30
30
  * I was tired of managing git submodules, nor did I find it very scalable.
31
31
  * I do not want my plugin manager to **affect the start up time** of my editor.
32
32
 
33
- Many of the other plugins mangers are really slick, but every one I have seen has violated of of those reasons.
33
+ Many of the other plugins mangers are really slick, but every one I have seen has violated at least one of those.
34
34
 
35
- I don't really want to use my editor for installing stuff. Bram said "Each program has its own task and should be good at it" and think installing bundles is better suited for a command line script.
35
+ I don't really want to use my editor for installing stuff. Feels like it goes against the Vim philosophy. Bram said "Each program has its own task and should be good at it" and think installing things is better suited for a command line script.
36
36
 
37
37
  ## Usage
38
38
 
39
- Infect reads your `.vimrc` file and looks for magic comments. It uses those to install pathogen style vim bundles. A minimal `.vimrc` to use with infect might look like this:
39
+ Infect reads your `.vimrc` file and looks for magic comments. It uses those to install vim packages and plugins. A minimal `.vimrc` to use with infect might look like this:
40
40
 
41
41
  "=plugin tpope/vim-sensible
42
42
  "=plugin csexton/trailertrash.vim
@@ -44,7 +44,7 @@ Infect reads your `.vimrc` file and looks for magic comments. It uses those to i
44
44
  syntax on
45
45
  filetype plugin indent on
46
46
 
47
- Just put those lines at the top of your vimrc and infect will install plugins and packages for you.
47
+ Just put those lines at the top of your `.vimrc` and infect will install plugins and packages for you.
48
48
 
49
49
  ## Building plugins
50
50
 
@@ -9,7 +9,7 @@ module Infect
9
9
  end
10
10
 
11
11
  def call
12
- Dir["#{PACK_DIR}*/*/*"].each do |path|
12
+ install_paths.each do |path|
13
13
  unless names.include? File.basename(path)
14
14
  if confirm(path)
15
15
  notice "Deleting #{path}"
@@ -37,5 +37,20 @@ module Infect
37
37
  end
38
38
  end
39
39
 
40
+ private
41
+
42
+ def install_paths
43
+ # Get the list of directories that plugins might be installed to, since
44
+ # we install legacy plugins in a special directory we want to look under
45
+ # that as well as in the top level `pack` directory.
46
+
47
+ default_dir = Command::Plugin::DEFAULT_DIR
48
+ plugins = Dir["#{PACK_DIR}#{default_dir}/*/*"]
49
+ packages = Dir["#{PACK_DIR}*"]
50
+ packages.delete("#{PACK_DIR}#{default_dir}")
51
+
52
+ plugins + packages
53
+ end
54
+
40
55
  end
41
56
  end
@@ -3,11 +3,13 @@ require 'open3'
3
3
  module Infect
4
4
  class Command
5
5
  class Plugin < Command
6
+ DEFAULT_DIR = "plugins"
7
+
6
8
  attr_reader :build, :location, :name, :options, :url
7
9
 
8
10
  def initialize(arg, opts)
9
11
  load = opts.fetch(:load) { "start" }
10
- package = opts.fetch(:package) { "default" }
12
+ package = opts.fetch(:package) { DEFAULT_DIR }
11
13
 
12
14
  @name = File.basename(arg)
13
15
  @url = "git@github.com:#{arg}.git"
@@ -1,3 +1,3 @@
1
1
  module Infect
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Sexton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
11
+ date: 2017-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec