Sha256: 28ad0717bbc77a568734007b65e39fb43063275fe2195cbe563d5558185071dd

Contents?: true

Size: 896 Bytes

Versions: 4

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true

require "neeto_compliance/github_access"
require "neeto_compliance/sync_neeto_commons"

module NeetoCompliance
  class SyncNeetoCommons
    class SyncHusky
      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

      def self.process
        sync_with_husky_files_in_neeto_commons
      end

      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
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
neeto-compliance-1.0.58 lib/neeto_compliance/sync_neeto_commons/sync_husky.rb
neetob-0.1.2 neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_husky.rb
neetob-0.1.1 /Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_husky.rb
neetob-0.1.0 /Users/chiragshah/Workspace/bigbinary/neeto/neetob/neeto_compliance/lib/neeto_compliance/sync_neeto_commons/sync_husky.rb