negroku 2.5.2 → 2.5.3
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 +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +1 -0
- data/docs/TASKS.md +17 -0
- data/lib/negroku/capistrano/tasks/whenever.rake +7 -2
- data/lib/negroku/config.rb +1 -1
- data/lib/negroku/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21f845531d2623a69fc5ce306b30f6761c42269b
|
|
4
|
+
data.tar.gz: 190c9d3e47079723802d351a2039a643ebe1de6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aac81c82ea07f90413d7c100aefeea3720d0b8adc7011a39728623527010a412528ccb1cc8a9135f29543e7b065d9d3f28d890e8f4950d78267dc01a5527ee6a
|
|
7
|
+
data.tar.gz: f0b24510e6ac492c1ee8411256d7cbaef5ac9fc06a00dc5509b2a8a46f84c8c3c098c7321f66abc412182425f9b0b628a2289d899dfd21d73f1846c195313c89
|
data/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,18 @@ Reverse Chronological Order:
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
-
https://github.com/platanus/negroku/compare/v2.5.
|
|
7
|
+
https://github.com/platanus/negroku/compare/v2.5.3...HEAD
|
|
8
|
+
|
|
9
|
+
## `2.5.3`
|
|
10
|
+
|
|
11
|
+
https://github.com/platanus/negroku/compare/v2.5.2...v2.5.3
|
|
12
|
+
|
|
13
|
+
FEATURE:
|
|
14
|
+
- On whenever you now can change the log and template values.
|
|
15
|
+
|
|
16
|
+
FIX:
|
|
17
|
+
- Whenever was always being enabled because it's a negroku dependency, now we check for the `config/schedule.rb` file
|
|
18
|
+
- Whenever now honors the rails environment
|
|
8
19
|
|
|
9
20
|
## `2.5.2`
|
|
10
21
|
|
data/README.md
CHANGED
data/docs/TASKS.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
* [Rails](#rails)
|
|
4
4
|
* [Remote Console](#remote-console)
|
|
5
|
+
* [Whenever](#whenever)
|
|
6
|
+
* [Config](#config)
|
|
5
7
|
|
|
6
8
|
### Rails
|
|
7
9
|
|
|
@@ -15,3 +17,18 @@ cap <stage> rails:console sandbox=1
|
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
[1]: https://github.com/ydkn/capistrano-rails-console
|
|
20
|
+
|
|
21
|
+
### Whenever
|
|
22
|
+
|
|
23
|
+
**Note:** By default we are not adding any path to the cron execution PATH. It's up the you to add the needed path to the PATH variable in the cron file.
|
|
24
|
+
|
|
25
|
+
##### Config
|
|
26
|
+
You can change some defaults adding this variables to your `deploy.rb`
|
|
27
|
+
|
|
28
|
+
1. Template
|
|
29
|
+
default tempalte is `bash -lc ':job'`
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
set :whenever_template, "bash -lc ':job'" #default
|
|
33
|
+
set :whenever_template, "PATH=./bin:$PATH && bash -lc ':job'" #add location to the path
|
|
34
|
+
```
|
|
@@ -9,11 +9,16 @@ namespace :load do
|
|
|
9
9
|
# server roles matches the following list
|
|
10
10
|
set :whenever_roles, [:app]
|
|
11
11
|
|
|
12
|
+
set :whenever_log, -> { "#{shared_path}/log/whenever-out.log" }
|
|
13
|
+
|
|
14
|
+
set :whenever_template, -> { "bash -lc ':job'" }
|
|
15
|
+
|
|
12
16
|
# Set default jobs and log
|
|
13
17
|
set :whenever_variables, -> {
|
|
14
18
|
{
|
|
15
|
-
job_template:
|
|
16
|
-
output:
|
|
19
|
+
job_template: fetch(:whenever_template),
|
|
20
|
+
output: fetch(:whenever_log),
|
|
21
|
+
environment: fetch(:whenever_environment)
|
|
17
22
|
}
|
|
18
23
|
.map{|k,v| "#{k}=#{v}"}.join("&").prepend("\"") << "\""
|
|
19
24
|
}
|
data/lib/negroku/config.rb
CHANGED
data/lib/negroku/version.rb
CHANGED