pushapp 0.1.7 → 0.1.8

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 126ddd949811e14ea43a3fa646c1afb80b4da614
4
- data.tar.gz: 04b4b24e5afd77e1d8c9f2daaf50e9d73d276677
3
+ metadata.gz: af7aee65478e5736df30affb3387f34fd105f3c4
4
+ data.tar.gz: b623e59ce1bc40096e9163494f5fb29862f26d44
5
5
  SHA512:
6
- metadata.gz: 629aa08840f737cb085da4446455822e594b3af4f0fd5ec2a59507738ade316a4011fc8d5cd4bb36525aef7b7ae294b0e7e39c70f47f961ef992eadb4c8085a5
7
- data.tar.gz: ce4e5631aa619324a73c8ee7b515ebf0cd8ab491b917cfb6b624ee50c24075852107b1439d9f3d173167ff9a260f34e0da80badee6177961a54e358bccfd16d3
6
+ metadata.gz: 4831eab76473051376cfd920f0ef83346b71b984f4e8761c9296b02a95b8b6752e2dad257834c68d916f779272b89451f39f7dab9578beb03e45e6f834823268
7
+ data.tar.gz: bf14384a6e5348cba8fe6010da113e4d90bf17718911e24852609366e04f2ea2a2c6952ae69ea7436f00fd117c67b000942ea19476b20aa9cf0db0d663e485b7
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Pushapp
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
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.7
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-14 00:00:00.000000000 Z
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