Sha256: a1b5e758343d1f36a1bf9f490a6f2bc9b281c37baad00dc2390ea150c2c8bc6e

Contents?: true

Size: 485 Bytes

Versions: 12

Compression:

Stored size: 485 Bytes

Contents

require 'pushapp/tasks/base'

module Pushapp
  module Tasks
    class WheneverUpdate < Base

      def run
        system "bundle exec whenever --update-crontab #{whenever_app} --set #{variables}"
      end

      private

      def whenever_app
        options[:whenever_app] || app_name_from_path
      end

      def rails_env
        env['RAILS_ENV']
      end

      def variables
         "environment=#{rails_env}"
      end

      register_as :whenever_update
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pushapp-0.2.10 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.9 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.8 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.7 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.6 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.5 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.4 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.3 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.2 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.1 lib/pushapp/tasks/whenever_update.rb
pushapp-0.2.0 lib/pushapp/tasks/whenever_update.rb
pushapp-0.1.9 lib/pushapp/tasks/whenever_update.rb