lib/exercism/api.rb in exercism-0.0.3 vs lib/exercism/api.rb in exercism-0.0.4
- old
+ new
@@ -10,11 +10,10 @@
response = conn.get do |req|
req.url '/api/v1/user/assignments/current'
req.headers['User-Agent'] = "exercism-CLI v#{Exercism::VERSION}"
req.params['key'] = user.key
end
- assignment = Assignment.new(JSON.parse(response.body))
- assignment.save
+ Assignment.save(JSON.parse(response.body))
end
def self.submit(filename, options)
user = options[:for]
path = File.join(FileUtils.pwd, filename)