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 +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +5 -5
- data/lib/infect/cleanup.rb +16 -1
- data/lib/infect/command/plugin.rb +3 -1
- data/lib/infect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9954bd5a373cc6a42f6fb4c0ac0474feafe9d8e9
|
4
|
+
data.tar.gz: 2727006e4ad2ee6ff29a27cb395f03342d5f8790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c54e4f1692467ca425666f6de7bc6d7b9b5a2486e8f6abb2e513e3d83dc68767bfc6abfd83633524c8119ba6e3c623562c9719c712d245bf4ebe17fe85d248
|
7
|
+
data.tar.gz: 7039ce9fe5e4ad685a748d85470526c1ae92d6efd0356aa8fb5fe0a9b09e5fee4801a05b4faac29d7796a47af6a15259fda791cecc5181193af25204a84c8807
|
data/Gemfile.lock
CHANGED
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
|
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
|
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
|
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
|
|
data/lib/infect/cleanup.rb
CHANGED
@@ -9,7 +9,7 @@ module Infect
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def call
|
12
|
-
|
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) {
|
12
|
+
package = opts.fetch(:package) { DEFAULT_DIR }
|
11
13
|
|
12
14
|
@name = File.basename(arg)
|
13
15
|
@url = "git@github.com:#{arg}.git"
|
data/lib/infect/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2017-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|