Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading of JSON artifact writes Ruby Hash to file #52

Open
robbiewareham opened this issue May 15, 2015 · 1 comment
Open

Downloading of JSON artifact writes Ruby Hash to file #52

robbiewareham opened this issue May 15, 2015 · 1 comment

Comments

@robbiewareham
Copy link

To replicate;

  • Ensure there is a JSON file in your Artifactory
  • Create Artifactory::Client instance
  • Get Artifactory::Resource::Artifact by searching for JSON artifact
  • Call 'download' method to save to File System

The saved file will contain the string representation of a Ruby Hash rather than the document held in Artifactory.

This can be explained by the following code in Artifactory:Client;

def success(response)
  if (response.content_type || '').include?('json')
    JSON.parse(response.body)
  else
    response.body
  end
end
@robbiewareham
Copy link
Author

I will try and submit a fix soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant