Skip to content

Fixing authentication with yml file #65

Merged
merged 3 commits into from Jun 7, 2011

2 participants

@robustdj
robustdj commented Jun 2, 2011

This patch fixes authenticating through a yml file. It can now be done like this:

authenticated :config => "github.yml" do
(...)
end

Before the .gitconfig contents were always overriding the yml file.

@radar
Collaborator
radar commented Jun 2, 2011

Hello, firstly: thank you very much for the patch. I have a couple of comments though, and I will add them now.

@radar
Collaborator

Commit claims to be "fixing authentication with yml file" but is actually making this change.

@radar
Collaborator

Not everyone is going to be using this with Rails, please just leave it as github.yml.

gotcha. I think i was just doing this as a way to document how to do it through rails. It's not clear that the yml file needs to be in the same directory but maybe that's just me

@radar
Collaborator

This line assigns the variable config twice (our problem, not yours, but I only just noticed it), and we could accomplish the same thing by using YAML.load_file(options[:config]) instead.

not sure i understand what you mean. how would you authenticate with the gitconfig file then? by passing the path to the gitconfig file through options[:config]?

oh nm i gotcha. about to make another commit

@radar
Collaborator

Does this file have a test against it?

you're right, i thought the tests were using it, but i just realized that there's a test/.gitconfig.. will remove

@robustdj
robustdj commented Jun 6, 2011

let me know if you think my pull request needs anything else

@radar
Collaborator
radar commented Jun 7, 2011

Nope, looks good. I'll merge now.

@radar radar merged commit 90b6152 into fcoury:master Jun 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.