capistrano-grunt 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ef739ce73ab59812c0a640396859209601d47ea2
4
- data.tar.gz: f51cc166aa2f1a3c5fc218e063bc9bc9cdf23d62
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjczODM4OTAxMjIzMzNkMDBkMmIxMTMzMTA5ZDdjYzY1Y2Q3YzA5ZQ==
5
+ data.tar.gz: !binary |-
6
+ MWQ5OTJiOTE3NjBhMjhiYWE0OWJkN2QyMDMwMGYyMTRhMjUzZWY2MA==
5
7
  SHA512:
6
- metadata.gz: 219d53445913cec80502ec07e7fca52a8fef0f537cb8c7f6a9eda90013aefc651ca1084501f31a2cbc17eb610c10eb5a94f5fdbbe2815e49a7e0c8e460ccdf5b
7
- data.tar.gz: 984cf318145b03a1d593d1b58e38a15e9a7d7fefa4d4b697dfb2bad09aad585a731faccae9c6ebfd05b9f6606b0b3028d09e13bab793df03ff0c8ebc22cc156e
8
+ metadata.gz: !binary |-
9
+ OGY3NTgwMDExNDAwMmZkNDZkMTJjNDU2NWFjZGM0MjFkMjE3Yzc0ZTUxZDQx
10
+ NzUwODU3MGMxOWQ0NDk3MTc1NTY2OWRlODg5Y2UwOTM1NDhhYTE3M2E0MzNk
11
+ NDE1MzM1OTRjMjA0YzJlODYxOTE1MTY3NjM3N2QwYTUzN2EwNjg=
12
+ data.tar.gz: !binary |-
13
+ YmQ5NTMxY2RjNmM3MDBjOGZmMjRmODg1ZjBmNDI4NDg1NDQyOWQyMzYzMTQ0
14
+ ZWZlMDQwODIxYTJkNjE0NmFiY2E5MTc5OGUxZDM0NGNlYzg4YzQ3NWFmZDRh
15
+ NmRlNGJlNWJkNGMyYmJiZjVkNWY2ZTU2NDk4MWE1ZjA2MGU3MGQ=
data/README.md CHANGED
@@ -1,19 +1,20 @@
1
- # capistrano-grunt
1
+ # Capistrano::Grunt
2
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.
3
+ This gem will let you run [Grunt](http://gruntjs.com/) tasks with Capistrano 3.x.
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Install the Gem
7
+ Add this line to your application's Gemfile:
8
8
 
9
9
  ```bash
10
- gem install capistrano-grunt
10
+ gem 'capistrano', '~> 3.0'
11
+ gem 'capistrano-grunt', github: 'roots/capistrano-grunt'
11
12
  ```
12
13
 
13
- Or if you're using Bundler, add it to your `Gemfile`:
14
+ And then execute:
14
15
 
15
- ```ruby
16
- gem 'capistrano-grunt', github: 'swalkinshaw/grunt'
16
+ ```
17
+ $ bundle install
17
18
  ```
18
19
 
19
20
  2. Add to `Capfile` or `config/deploy.rb`:
@@ -30,42 +31,48 @@ Set what Grunt tasks you want run in your `deploy.rb` file:
30
31
  set :grunt_tasks, 'deploy:production'
31
32
  ```
32
33
 
33
- If you don't set `grunt_tasks`, Grunt will run its default task (equivalent to just running `grunt` from the command line).
34
+ If you don't set `:grunt_tasks`, Grunt will run without any task specified. (equivalent to just running `grunt` from the command line).
34
35
 
35
- To run multiple tasks, use an array in the order you want them run:
36
+ To run multiple tasks (can be string or array of strings):
36
37
 
37
38
  ```ruby
38
- set :grunt_tasks, ['deploy:production', 'cdn']
39
+ set :grunt_tasks, 'deploy:production cdn'
40
+ set :grunt_tasks, %w{deploy:production cdn}
39
41
  ```
40
42
 
41
43
  The above would be equivalent of running the following from the command line:
42
44
 
43
45
  ```bash
44
- grunt deploy:production
45
- grunt cdn
46
+ grunt deploy:production cdn
46
47
  ```
47
48
 
48
49
  Then add the task to your `deploy.rb`:
49
50
 
50
51
  ```ruby
51
- after 'deploy:finalize_update', 'grunt'
52
+ before :updated, 'grunt'
52
53
  ```
53
54
 
54
- To set `grunt` command line options like the `Gruntfile` path, use the `grunt_options` variable:
55
+ ## Configuration
55
56
 
56
- ```ruby
57
- set :grunt_options, '--gruntfile config/Gruntfile.js'
58
- ```
57
+ ### Gruntfile
59
58
 
60
- ### Tasks
59
+ To specify a `Gruntfile`, use the `:grunt_file` option:
61
60
 
62
- * `grunt`: Runs the Grunt task(s) specified in the `grunt_tasks` variable.
61
+ ```ruby
62
+ set :grunt_file, -> { release_path.join('config/Gruntfile.js') }
63
+ ```
63
64
 
64
- ### Dependencies
65
+ Other configurable options are shown here with the defaults:
65
66
 
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
+ ```ruby
68
+ set :grunt_flags, '--no-color'
69
+ set :grunt_roles, :all
70
+ ```
67
71
 
68
- ### Configuration
72
+ ## Contributing
69
73
 
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.
74
+ 1. Fork it
75
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
76
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
77
+ 4. Push to the branch (`git push origin my-new-feature`)
78
+ 5. Create new Pull Request
@@ -2,19 +2,23 @@
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
- require 'capistrano/grunt/version'
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-grunt'
7
+ spec.version = '0.0.2'
8
+ spec.authors = ['Scott Walkinshaw', 'Koen Punt']
9
+ spec.email = ['scott.walkinshaw@gmail.com', 'me@koen.pt']
10
+ spec.description = %q{Grunt support for Capistrano 3.x}
11
+ spec.summary = %q{Grunt support for Capistrano 3.x}
12
+ spec.homepage = 'https://github.com/roots/capistrano-grunt'
13
+ spec.license = 'MIT'
6
14
 
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
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
15
19
 
16
- s.files = `git ls-files`.split($/)
17
- s.require_paths = %w(lib)
20
+ spec.add_dependency 'capistrano', '>= 3.0.0.pre'
18
21
 
19
- s.add_dependency 'capistrano', '>= 2.5.5'
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
20
24
  end
File without changes
@@ -1,16 +1 @@
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
1
+ load File.expand_path('../tasks/grunt.cap', __FILE__)
@@ -0,0 +1,39 @@
1
+ desc <<-DESC
2
+ Run Grunt tasks. By default, it runs with no task specified, which \
3
+ means the default Grunt task will be run. The install command is \
4
+ executed with the --no-color flag.
5
+
6
+ You can override any of these defaults by setting the variables shown below.
7
+
8
+ set :grunt_file, nil
9
+ set :grunt_tasks, nil
10
+ set :grunt_flags, '--no-color'
11
+ set :grunt_roles, :all
12
+ DESC
13
+ task :grunt do
14
+ on roles fetch(:grunt_roles) do
15
+ within release_path do
16
+ options = [
17
+ fetch(:grunt_flags)
18
+ ]
19
+
20
+ options << "--gruntfile #{fetch(:grunt_file)}" if fetch(:grunt_file)
21
+ options << fetch(:grunt_tasks) if fetch(:grunt_tasks)
22
+
23
+ execute :grunt, options
24
+ end
25
+ end
26
+ end
27
+
28
+ namespace :grunt do
29
+ task default: :grunt
30
+ end
31
+
32
+ namespace :load do
33
+ task :defaults do
34
+ set :grunt_file, nil
35
+ set :grunt_tasks, nil
36
+ set :grunt_flags, '--no-color'
37
+ set :grunt_roles, :all
38
+ end
39
+ end
metadata CHANGED
@@ -1,32 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-grunt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Walkinshaw
8
+ - Koen Punt
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-11-07 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: capistrano
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - '>='
18
+ - - ! '>='
18
19
  - !ruby/object:Gem::Version
19
- version: 2.5.5
20
+ version: 3.0.0.pre
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - '>='
25
+ - - ! '>='
25
26
  - !ruby/object:Gem::Version
26
- version: 2.5.5
27
- description:
27
+ version: 3.0.0.pre
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '1.3'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '1.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ description: Grunt support for Capistrano 3.x
28
57
  email:
29
58
  - scott.walkinshaw@gmail.com
59
+ - me@koen.pt
30
60
  executables: []
31
61
  extensions: []
32
62
  extra_rdoc_files: []
@@ -36,9 +66,10 @@ files:
36
66
  - README.md
37
67
  - Rakefile
38
68
  - capistrano-grunt.gemspec
69
+ - lib/capistrano-grunt.rb
39
70
  - lib/capistrano/grunt.rb
40
- - lib/capistrano/grunt/version.rb
41
- homepage: https://github.com/swalkinshaw/capistrano-grunt
71
+ - lib/capistrano/tasks/grunt.cap
72
+ homepage: https://github.com/roots/capistrano-grunt
42
73
  licenses:
43
74
  - MIT
44
75
  metadata: {}
@@ -48,18 +79,18 @@ require_paths:
48
79
  - lib
49
80
  required_ruby_version: !ruby/object:Gem::Requirement
50
81
  requirements:
51
- - - '>='
82
+ - - ! '>='
52
83
  - !ruby/object:Gem::Version
53
84
  version: '0'
54
85
  required_rubygems_version: !ruby/object:Gem::Requirement
55
86
  requirements:
56
- - - '>='
87
+ - - ! '>='
57
88
  - !ruby/object:Gem::Version
58
89
  version: '0'
59
90
  requirements: []
60
91
  rubyforge_project:
61
- rubygems_version: 2.0.0
92
+ rubygems_version: 2.1.10
62
93
  signing_key:
63
94
  specification_version: 4
64
- summary: Capistrano extension that adds Grunt tasks
95
+ summary: Grunt support for Capistrano 3.x
65
96
  test_files: []
@@ -1,5 +0,0 @@
1
- module Capistrano
2
- module Grunt
3
- VERSION = '0.0.1'
4
- end
5
- end