Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
noahfrederick committed Aug 22, 2015
0 parents commit a3af477
Show file tree
Hide file tree
Showing 14 changed files with 568 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bundle/config
@@ -0,0 +1,3 @@
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
5 changes: 5 additions & 0 deletions .travis.yml
@@ -0,0 +1,5 @@
language: ruby
bundler_args: --without development
rvm:
- 2.2.1
script: rake ci
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,34 @@
# Contributing

## Testing

Tests are written for [vspec][vspec], which can be installed via
[vim-flavor][vim-flavor]:

bundle install
bundle exec vim-flavor install

The test suite can then be run via the rake task:

bundle exec rake test

## Documentation

The documentation in `doc/` is generated from the plug-in source code via
[vimdoc][vimdoc]. Do not edit `doc/<plugin>.txt` directly. Refer to the
existing inline documentation as a guide for documenting new code.

The help doc can be rebuilt by running:

bundle exec rake doc

## Automation

If you wish, you may use the provided `Guardfile` to automatically run tests
and rebuild the documentation as you make changes:

bundle exec guard start

[vspec]: https://github.com/kana/vim-vspec
[vim-flavor]: https://github.com/kana/vim-flavor
[vimdoc]: https://github.com/google/vimdoc
10 changes: 10 additions & 0 deletions Gemfile
@@ -0,0 +1,10 @@
source 'https://rubygems.org'

group :development do
gem 'guard-rake'
end

group :test do
gem 'vim-flavor', '~> 2.1'
gem 'rake'
end
52 changes: 52 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,52 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (3.1.3)
coderay (1.1.0)
ffi (1.9.10)
formatador (0.2.5)
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-rake (1.0.0)
guard
rake
listen (3.0.3)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
nenv (0.2.0)
notiffany (0.0.7)
nenv (~> 0.1)
shellany (~> 0.0)
parslet (1.7.0)
blankslate (>= 2.0, <= 4.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
shellany (0.0.1)
slop (3.6.0)
thor (0.19.1)
vim-flavor (2.2.1)
parslet (~> 1.7)
thor (~> 0.19)

PLATFORMS
ruby

DEPENDENCIES
guard-rake
rake
vim-flavor (~> 2.1)
8 changes: 8 additions & 0 deletions Guardfile
@@ -0,0 +1,8 @@
guard 'rake', :task => 'test' do
watch(%r{^(autoload|plugin|t)/.*\.vim$})
end

guard 'rake', :task => 'doc' do
watch(%r{^(autoload|plugin)/.*\.vim$})
watch(%r{^addon-info\.json$})
end
43 changes: 43 additions & 0 deletions README.md
@@ -0,0 +1,43 @@
# vim-composer

Vim support for [Composer PHP][composer] projects.

[![Build Status][buildimg]](https://travis-ci.org/noahfrederick/vim-composer)

*Note: this is a prerelease version, which may change or break frequently.*

[composer]: https://getcomposer.org/
[buildimg]: https://img.shields.io/travis/noahfrederick/vim-composer/master.svg

## Features

Composer.vim provides conveniences for working with Composer PHP projects.
Some features include:

* `:Composer` command wrapper around `composer` with smart completion
* Jump to your `composer.json` with `:Composer` command with no arguments
* Projectionist and Dispatch support (`:Dispatch` runs `composer install`)

See `:help composer` for details.

## Installation

Composer.vim depends on [Projectionist.vim][projectionist] and has an optional
dependency on [Dispatch.vim][dispatch] for asynchronous execution of Composer
commands.

Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-projectionist'
Plug 'noahfrederick/vim-composer'

## Credits and License

Thanks to Tim Pope for [Bundler.vim][bundler], which Composer.vim is modeled
after.

Copyright © Noah Frederick. Distributed under the same terms as Vim itself.
See `:help license`.

[projectionist]: https://github.com/tpope/vim-projectionist
[dispatch]: https://github.com/tpope/vim-dispatch
[bundler]: https://github.com/tpope/vim-bundler
30 changes: 30 additions & 0 deletions Rakefile
@@ -0,0 +1,30 @@
#!/usr/bin/env rake

require 'rake/packagetask'
require 'json'

plugin = JSON.load(File.new('addon-info.json'))

desc 'Target for CI server'
task ci: [:dump, :test]

desc 'Dump Vim\'s version info'
task :dump do
sh 'vim --version'
end

desc 'Run tests with vspec'
task :test do
sh 'bundle exec vim-flavor test'
end

desc 'Rebuild the documentation with vimdoc'
task :doc do
sh 'vimdoc ./'
end

Rake::PackageTask.new(plugin['name']) do |p|
p.version = plugin['version']
p.need_zip = true
p.package_files.include(['plugin/*.vim', 'autoload/*.vim', 'doc/*.txt'])
end
1 change: 1 addition & 0 deletions VimFlavor
@@ -0,0 +1 @@
flavor 'kana/vim-vspec', '~> 1.6'
1 change: 1 addition & 0 deletions VimFlavor.lock
@@ -0,0 +1 @@
kana/vim-vspec (1.6.1)
7 changes: 7 additions & 0 deletions addon-info.json
@@ -0,0 +1,7 @@
{
"name": "composer",
"version": "0.0.0",
"author": "Noah Frederick",
"description": "Vim support for Composer PHP projects",
"homepage": "https://github.com/noahfrederick/vim-composer"
}

0 comments on commit a3af477

Please sign in to comment.