pushapp 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pushapp/config.rb +1 -0
- data/lib/pushapp/tasks/whenever_update.rb +28 -0
- data/lib/pushapp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af7aee65478e5736df30affb3387f34fd105f3c4
|
4
|
+
data.tar.gz: b623e59ce1bc40096e9163494f5fb29862f26d44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4831eab76473051376cfd920f0ef83346b71b984f4e8761c9296b02a95b8b6752e2dad257834c68d916f779272b89451f39f7dab9578beb03e45e6f834823268
|
7
|
+
data.tar.gz: bf14384a6e5348cba8fe6010da113e4d90bf17718911e24852609366e04f2ea2a2c6952ae69ea7436f00fd117c67b000942ea19476b20aa9cf0db0d663e485b7
|
data/lib/pushapp/config.rb
CHANGED
@@ -15,6 +15,7 @@ class Pushapp::Config
|
|
15
15
|
require 'pushapp/tasks/nginx_export'
|
16
16
|
require 'pushapp/tasks/foreman_export'
|
17
17
|
require 'pushapp/tasks/unicorn_signal'
|
18
|
+
require 'pushapp/tasks/whenever_update'
|
18
19
|
|
19
20
|
config = self.new(configuration_file)
|
20
21
|
config.instance_eval(File.read(config.file))
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'pushapp/tasks/base'
|
2
|
+
|
3
|
+
module Pushapp
|
4
|
+
module Tasks
|
5
|
+
class WheneverUpdate < Base
|
6
|
+
|
7
|
+
def run
|
8
|
+
system "#{sudo} bundle exec whenever --update-crontab #{whenever_app} --set #{variables}"
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def whenever_app
|
14
|
+
options[:whenever_app] || app_name_from_path
|
15
|
+
end
|
16
|
+
|
17
|
+
def rails_env
|
18
|
+
env['RAILS_ENV']
|
19
|
+
end
|
20
|
+
|
21
|
+
def variables
|
22
|
+
"environment=#{rails_env}"
|
23
|
+
end
|
24
|
+
|
25
|
+
register_as :whenever_update
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/pushapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/pushapp/tasks/script.rb
|
113
113
|
- lib/pushapp/tasks/unicorn_signal.rb
|
114
114
|
- lib/pushapp/tasks/upstart.rb
|
115
|
+
- lib/pushapp/tasks/whenever_update.rb
|
115
116
|
- lib/pushapp/version.rb
|
116
117
|
- pushapp.gemspec
|
117
118
|
- templates/.env.erb
|