diff options
author | Raffael Schmid <raf@nine.ch> | 2014-01-23 10:55:26 +0100 |
---|---|---|
committer | Raffael Schmid <raf@nine.ch> | 2014-01-23 10:55:26 +0100 |
commit | 7863319b97498a7621815cfe5691794ecb86b8c5 (patch) | |
tree | 5ae991fe7543bcb91e9257242e87849538b33214 /lib/api/files.rb | |
parent | 568d1c27c5a1b4d6749943240cdba2625eee2b6e (diff) | |
parent | 68590fddd860c5d840d8f04314ed11f0d02ddd44 (diff) | |
download | gitlab-ce-7863319b97498a7621815cfe5691794ecb86b8c5.tar.gz |
Merge branch 'master' into dont-depend-on-appid-and-appsecret
* master: (238 commits)
Version 6.5.1
Fix selectbox when submit MR from fork to origin
Fix HELP layout
No need for code tag here.
Spelling mistake and add links.
Warn against RVM.
Remove GitHub mention because we also have a GitLab issue tracker now.
Replace 6.0-to-6.4.md with 6.0-to-6.5.md
Add public assets to gitignore
Version 6.5.0
Use 6-5 branch in installation docs
Remove deprecated twitter handle.
Further explain userPrincipalName settings
Update from 6.4 to 6.5 guide
Explain how to use AD userPrincipalName for logins
More entries to CHANGELOG. Version to rc1
Rephrase LDAP check script output
add O'Reilly sponsorship in CHANGELOG
Fix select2 css for drop above style
Rename "Website url" labels to "Website"
...
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r-- | lib/api/files.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 6a5419a580f..213604915a6 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -18,10 +18,10 @@ module API # post ":id/repository/files" do required_attributes! [:file_path, :branch_name, :content, :commit_message] - attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message] + attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message, :encoding] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::CreateContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::CreateService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(201) @@ -48,10 +48,10 @@ module API # put ":id/repository/files" do required_attributes! [:file_path, :branch_name, :content, :commit_message] - attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message] + attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message, :encoding] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::UpdateContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::UpdateService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(200) @@ -81,7 +81,7 @@ module API attrs = attributes_for_keys [:file_path, :branch_name, :commit_message] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::DeleteContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::DeleteService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(200) |