Class: NeetoCompliance::SyncNeetoCommons::SyncHusky

Inherits:
Object
  • Object
show all
Defined in:
lib/neeto_compliance/sync_neeto_commons/sync_husky.rb

Class Method Summary collapse

Class Method Details

.HUSKY_FILESObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/neeto_compliance/sync_neeto_commons/sync_husky.rb', line 9

def self.HUSKY_FILES
  [
    ".husky/pre-push",
    ".husky/pre-commit",
    ".husky/helpers/lint_staged.sh",
    ".husky/helpers/prevent_conflict_markers.sh",
    ".husky/helpers/prevent_pushing_to_main.sh",
    ".husky/helpers/verify_neeto_audit.sh"
  ]
end

.processObject



20
21
22
# File 'lib/neeto_compliance/sync_neeto_commons/sync_husky.rb', line 20

def self.process
  sync_with_husky_files_in_neeto_commons
end

.sync_with_husky_files_in_neeto_commonsObject



24
25
26
27
28
29
30
# File 'lib/neeto_compliance/sync_neeto_commons/sync_husky.rb', line 24

def self.sync_with_husky_files_in_neeto_commons
  self.HUSKY_FILES.each do |file|
    print "Downloading #{file}...\n"
    system(`cp #{NeetoCompliance::SyncNeetoCommons.neeto_commons_url}#{file} #{file}`)
    system("chmod +x #{file}")
  end
end