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
Api blob contents #1157
Api blob contents #1157
Conversation
Thanks. I'll give it a closer look after this weekend. Please rebase it against master. Why Gemfile is changed? |
I needed to make sure grape was using at least version 0.2.1 because of the introduction of the "content_type" function. Then I also ran into a problem with the newer version of rake, and per a suggestion from @dhh himself on twitter, I rolled it back to 0.8.7. I'll rebase it against master tonight. --Jeremy On Jul 27, 2012, at 5:30 PM, Nihad Abbasov reply@reply.github.com wrote:
|
I've pulled the changes from upstream and rebased this branch against master. |
@punkisdead Thank you for PR. @NARKOZ will review it but I have 2 problems with:
|
I had some error messages that led me to this post by Dave Chelimsky (http://blog.davidchelimsky.net/2011/05/28/rake-09-and-gem-version-constraints/). I know it's older, but it's what fixed my issue. The Grape API gem needs to be at least 0.2.1 as one of the functions I wrote requires the "content_type" function as I mentioned earlier, so I can change the mime-type of the response. |
I really have no time to read. Can you explain in few words? Cause I still dont understand how rake 09 can cause problems in your PR feature |
@@ -1,6 +1,7 @@ | |||
module Gitlab | |||
# Projects API | |||
class Projects < Grape::API | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
@CodeAdept what version of ruby are you using? What error message do you get without rake 0.8.7? I'm sure this issue isn't related to Gitlab. Run |
I'm not sure what happened, but Rake 0.9.2 is working for me now. I didn't update any other dependencies except for that and Grape, all of the rest of the updates to the Gemfile.lock are probably because I'm building this on a fresh install and there are newer versions of all of the gems since you've been developing this project. All I did was run bundle install after checking out the project and those were the versions it gave me. I've made the other changes as requested. |
# GET /projects/:id/repository/branches/:branch_id | ||
get ":id/repository/branches/:branch_id" do | ||
@project = current_user.projects.find_by_code(params[:id]) | ||
@branch = @project.repo.heads.find { |item| item.name == params[:branch_id] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@punkisdead you forgot to update these lines 😄
Please don't forget to update |
error!('404 Commit Not Found', 404) unless commit | ||
|
||
tree = Tree.new commit.tree, user_project, ref, params[:filepath] | ||
error!('404 File Not Found', 404) unless tree && tree.tree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless tree.try(:tree)
What do you mean by squash my commits? |
|
Ok, thanks for being patient guys. It's been a while since I've done any Rails development, and the first time "forking" and submitting a pull request on Github. |
@punkisdead hey congrats. Thank you for being patient also. Just tell us when you ready for final review :) |
Ok, commits should be squashed now and docs updated. |
Nice. Merged. |
I added a couple of methods to the projects API.
Let me know what you think.
Regards,
Jeremy Anderson