Sha256: bb84f281088dddbc2c4986b747556ec71040e0ee9c1cc3089927e3028b191877
Contents?: true
Size: 668 Bytes
Versions: 3
Compression:
Stored size: 668 Bytes
Contents
class App < ApplicationRecord belongs_to :user after_commit :make_folder, on: [:create] def make_folder Rails.logger.debug "DB8 app.rb:def self.make_folder called" system(%Q[sudo -u git mkdir /home/git/#{self.name}.git]) system(%Q[sudo -u git sh -c "cd /home/git/#{self.name}.git; git --bare init"]) system(%Q[sudo -u git sh -c "echo '#!/bin/bash' >> /home/git/#{self.name}.git/hooks/post-receive"]) system(%Q[sudo -u git sh -c 'echo "echo abc123499999999999999999999999999999" >> /home/git/#{self.name}.git/hooks/post-receive']) system(%Q[sudo -u git sh -c 'sudo chmod +x /home/git/#{self.name}.git/hooks/post-receive']) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
meroku-2.0.7 | frontend/app/models/app.rb |
meroku-2.0.6 | frontend/app/models/app.rb |
meroku-2.0.5 | frontend/app/models/app.rb |