capistrano-rake 0.1.0 → 0.2.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: 8dc4f24017999dd35954b9ffe652ed7f32ff83d9
4
- data.tar.gz: 8dfe9c46321917856e7f29a140d8d39d4aba8c4a
3
+ metadata.gz: c74171623f5ccfff67a15a441dde26ec2cdd71c6
4
+ data.tar.gz: aa93c4acf0c2877580557b06a11a4520eb01231d
5
5
  SHA512:
6
- metadata.gz: 2b962bd268367528c36a4f2f67694079c7bca2f723c03235d6941ac94a6de248376bd3aa4cefa7151a25ddd8a4b9be35ef1afe4bdad99ae89326938935c4d175
7
- data.tar.gz: 8bea1485a11b115dc90cb111b385b97d4494ada865b2c58027279fe64f7dcfaa688b20aed8e1250d410d67ef2bce1c16faf7937c4a01ee176d7f7dc0541af4aa
6
+ metadata.gz: 30fa800b67faa79597f35c0d06e0f08888cf4daf936d5076d4d8607e7ee56d0c532347b0151adf52ee30890f246a5640243b1474fd73c60d5de04a99c80402a5
7
+ data.tar.gz: f3154c3abbc69840adbd92d391cb6ff4e0200307f73eb98ab55dc43f2c223871d158f345a32c14b33dfb361a698c8a28f9f678bcf21fc003065ef0fbb865749a
data/README.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  capistrano-rake
3
2
  ===============
4
3
 
@@ -7,6 +6,7 @@ Installing this gem adds a new capistrano task `invoke:rake` that will allow you
7
6
  execute rake tasks remotely. __Only supports Capistrano 3 and above__.
8
7
 
9
8
 
9
+
10
10
  ## Installation
11
11
 
12
12
  Add the gem to your `Gemfile` after setting up Capistrano, preferably in the `:development`
@@ -19,15 +19,7 @@ group :development do
19
19
  end
20
20
  ```
21
21
 
22
- And then execute:
23
-
24
- $ bundle
25
-
26
-
27
-
28
- ## Usage
29
-
30
- After installation, add it to your `Capfile`:
22
+ Then `bundle` and add it to your `Capfile`:
31
23
 
32
24
  ```ruby
33
25
  # Capfile
@@ -35,6 +27,10 @@ After installation, add it to your `Capfile`:
35
27
  require 'capistrano/rake'
36
28
  ```
37
29
 
30
+
31
+
32
+ ## Usage
33
+
38
34
  To execute a rake task on a remote server, you need to pass that task's name to the `invoke:rake`
39
35
  capistrano task like this:
40
36
 
@@ -48,6 +44,18 @@ $ cap production invoke:rake TASK=paperclip:refresh
48
44
  ```
49
45
 
50
46
 
47
+
48
+ ## Configuration
49
+
50
+ You can optionally specify the capistrano roles for the rake task (Defaults to `:app`):
51
+
52
+ ```ruby
53
+ # Defaults to [:app]
54
+ set :rake_roles, [:db, :app]
55
+ ```
56
+
57
+
58
+
51
59
  ## Contributing
52
60
 
53
61
  1. Fork it ( https://github.com/sheharyarn/capistrano-rake/fork )
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rake
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
@@ -1,9 +1,12 @@
1
1
  namespace :invoke do
2
2
 
3
- desc "Execute a rake task on a remote server"
3
+ # Defalut to :app roles
4
+ rake_roles = fetch(:rake_roles, :app)
5
+
6
+ desc "Execute a rake task on a remote server (cap invoke:rake TASK=db:migrate)"
4
7
  task :rake do
5
8
  if ENV['TASK']
6
- on roles(:app) do
9
+ on roles(rake_roles) do
7
10
  within current_path do
8
11
  with rails_env: fetch(:rails_env) do
9
12
  execute :rake, ENV['TASK']
@@ -18,4 +21,3 @@ namespace :invoke do
18
21
  end
19
22
 
20
23
  end
21
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheharyar Naseer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-31 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5.1
110
+ rubygems_version: 2.6.10
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Run any rake task on a remote server using Capistrano