salesforce-marketingcloud / FuelSDK-Ruby

Fuel SDK for Ruby
BSD 3-Clause "New" or "Revised" License
52 stars 154 forks source link

[BUG] Gem doesn't work on servers which don't have git installed #105

Open willlahr opened 4 years ago

willlahr commented 4 years ago

Describe the bug This gem does not work when git is not installed - this can be a problem in production servers, even if git based deployment is used. It is because it does this in the gemspec:

 spec.files         = `git ls-files`.split($/)

I fixed it like this:

      spec.files         = `du -a`.split("\n").map{|line| line.split("\t")[1].sub('./','')} - ["spec", "samples", ".github/ISSUE_TEMPLATE", ".github", "lib/marketingcloudsdk", "lib", "."]

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.

Environment

The bug has the severity

Additional context Add any other context about the problem here.