capistrano-grunt 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +71 -0
- data/Rakefile +1 -0
- data/capistrano-grunt.gemspec +20 -0
- data/lib/capistrano/grunt.rb +16 -0
- data/lib/capistrano/grunt/version.rb +5 -0
- metadata +65 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ef739ce73ab59812c0a640396859209601d47ea2
|
4
|
+
data.tar.gz: f51cc166aa2f1a3c5fc218e063bc9bc9cdf23d62
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 219d53445913cec80502ec07e7fca52a8fef0f537cb8c7f6a9eda90013aefc651ca1084501f31a2cbc17eb610c10eb5a94f5fdbbe2815e49a7e0c8e460ccdf5b
|
7
|
+
data.tar.gz: 984cf318145b03a1d593d1b58e38a15e9a7d7fefa4d4b697dfb2bad09aad585a731faccae9c6ebfd05b9f6606b0b3028d09e13bab793df03ff0c8ebc22cc156e
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# capistrano-grunt
|
2
|
+
|
3
|
+
capistrano-grunt is a [Capistrano](https://github.com/capistrano/capistrano) extension that will let you run [Grunt](http://gruntjs.com/) tasks during your deploy process.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
1. Install the Gem
|
8
|
+
|
9
|
+
```bash
|
10
|
+
gem install capistrano-grunt
|
11
|
+
```
|
12
|
+
|
13
|
+
Or if you're using Bundler, add it to your `Gemfile`:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'capistrano-grunt', github: 'swalkinshaw/grunt'
|
17
|
+
```
|
18
|
+
|
19
|
+
2. Add to `Capfile` or `config/deploy.rb`:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'capistrano/grunt'
|
23
|
+
```
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Set what Grunt tasks you want run in your `deploy.rb` file:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
set :grunt_tasks, 'deploy:production'
|
31
|
+
```
|
32
|
+
|
33
|
+
If you don't set `grunt_tasks`, Grunt will run its default task (equivalent to just running `grunt` from the command line).
|
34
|
+
|
35
|
+
To run multiple tasks, use an array in the order you want them run:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
set :grunt_tasks, ['deploy:production', 'cdn']
|
39
|
+
```
|
40
|
+
|
41
|
+
The above would be equivalent of running the following from the command line:
|
42
|
+
|
43
|
+
```bash
|
44
|
+
grunt deploy:production
|
45
|
+
grunt cdn
|
46
|
+
```
|
47
|
+
|
48
|
+
Then add the task to your `deploy.rb`:
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
after 'deploy:finalize_update', 'grunt'
|
52
|
+
```
|
53
|
+
|
54
|
+
To set `grunt` command line options like the `Gruntfile` path, use the `grunt_options` variable:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
set :grunt_options, '--gruntfile config/Gruntfile.js'
|
58
|
+
```
|
59
|
+
|
60
|
+
### Tasks
|
61
|
+
|
62
|
+
* `grunt`: Runs the Grunt task(s) specified in the `grunt_tasks` variable.
|
63
|
+
|
64
|
+
### Dependencies
|
65
|
+
|
66
|
+
This extension also adds the `grunt` command as a Capistrano dependency. Meaning when you run cap deploy:check, it will make sure the `grunt` command exists.
|
67
|
+
|
68
|
+
### Configuration
|
69
|
+
|
70
|
+
* `grunt_tasks`: Grunt tasks to run. Use a string for a single task or an array for multiple ones. Defaults to `default`.
|
71
|
+
* `grunt_options`: Options for `grunt` command. Defaults to an empty string.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'capistrano/grunt/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'capistrano-grunt'
|
9
|
+
s.version = Capistrano::Grunt::VERSION
|
10
|
+
s.authors = ['Scott Walkinshaw']
|
11
|
+
s.email = ['scott.walkinshaw@gmail.com']
|
12
|
+
s.homepage = 'https://github.com/swalkinshaw/capistrano-grunt'
|
13
|
+
s.summary = %q{Capistrano extension that adds Grunt tasks}
|
14
|
+
s.license = 'MIT'
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split($/)
|
17
|
+
s.require_paths = %w(lib)
|
18
|
+
|
19
|
+
s.add_dependency 'capistrano', '>= 2.5.5'
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Capistrano::Configuration.instance(true).load do
|
2
|
+
set :grunt_tasks, 'default'
|
3
|
+
set :grunt_options, nil
|
4
|
+
|
5
|
+
depend :remote, :command, 'grunt'
|
6
|
+
|
7
|
+
namespace :grunt do
|
8
|
+
desc 'Runs the Grunt tasks or the default task if none are specified in grunt_tasks.'
|
9
|
+
task :default, :roles => :app, :except => { :no_release => true } do
|
10
|
+
tasks = Array(grunt_tasks)
|
11
|
+
tasks.each do |task|
|
12
|
+
try_sudo "cd #{latest_release} && grunt #{grunt_options} #{task}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-grunt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Scott Walkinshaw
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.5.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.5.5
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- scott.walkinshaw@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- .gitignore
|
35
|
+
- Gemfile
|
36
|
+
- README.md
|
37
|
+
- Rakefile
|
38
|
+
- capistrano-grunt.gemspec
|
39
|
+
- lib/capistrano/grunt.rb
|
40
|
+
- lib/capistrano/grunt/version.rb
|
41
|
+
homepage: https://github.com/swalkinshaw/capistrano-grunt
|
42
|
+
licenses:
|
43
|
+
- MIT
|
44
|
+
metadata: {}
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options: []
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - '>='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
requirements: []
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 2.0.0
|
62
|
+
signing_key:
|
63
|
+
specification_version: 4
|
64
|
+
summary: Capistrano extension that adds Grunt tasks
|
65
|
+
test_files: []
|