lib/exercism/api.rb in exercism-0.0.16 vs lib/exercism/api.rb in exercism-0.0.17

- old
+ new

@@ -32,11 +32,11 @@ contents = File.read path response = conn.post do |req| req.url endpoint('user/assignments') req.headers['Accept'] = 'application/json' req.headers['Content-Type'] = 'application/json' - req.body = {code: contents, key: user.key, path: path}.to_json + req.body = {:code => contents, :key => user.key, :path => path}.to_json end response end private @@ -54,10 +54,10 @@ end def endpoint(action = nil) "/api/v1/#{action}".chomp('/') end - + def save(body) Assignment.save(JSON.parse(body), project_dir) end end end