Method: Cnvrg::Datafiles#put_commit

Defined in:
lib/cnvrg/datafiles.rb

#put_commit(commit_sha1) ⇒ Object

This is for backwards compatibility only and should be removed in future versions:



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/cnvrg/datafiles.rb', line 138

def put_commit(commit_sha1)
  response = Cnvrg::API.request(
      "#{@base_resource}/commit/latest",
      'PUT',
      {
          commit_sha1: commit_sha1,
          ignore: true # tells the new server to ignore this api call since its coming from the new CLI
      }
  )
  if response.present?
    msg = response['result']
  else
    msg =  "Can't save changes in the dataset"
  end

  Cnvrg::Result.new(Cnvrg::CLI.is_response_success(response, false), msg)
end