Skip to content
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

Install all command #32

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Install all command #32

wants to merge 5 commits into from

Conversation

jbodah
Copy link
Collaborator

@jbodah jbodah commented May 22, 2015

Still needs automated tests. Tested manually

  • Add a support for git_hooks install to install every hook
  • Convert hook.sample into an ERB template and generate the correct template based on the hook

@coveralls
Copy link

Coverage Status

Coverage increased (+0.17%) to 99.19% when pulling cbb9b75 on jbodah:install-all into 53247cf on stupied4ever:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) to 99.18% when pulling 174372f on jbodah:install-all into 53247cf on stupied4ever:master.

@stupied4ever
Copy link
Owner

Wow, that is nice!!

I have some little advices, I will do them in the commits.

@jbodah
Copy link
Collaborator Author

jbodah commented May 22, 2015

Cool, sounds good

@stupied4ever
Copy link
Owner

On the installer, the ruby_path is nil by default, but in the template we set a new default (ruby_path || some default path). This default path should go to installer default para, doesn't?

@@ -17,7 +17,6 @@
require_relative 'git_hooks/pre_commit'

module GitHooks
HOOK_SAMPLE_FILE = 'hook.sample'
HOOKS = [PRE_COMMIT = 'pre-commit']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will we do about it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was used? I might be incorrect

@jbodah
Copy link
Collaborator Author

jbodah commented May 22, 2015

I see, yeah that makes sense

.open(hook_path, 'w')
.write(hook_script)

FileUtils.chmod(0775, hook_path)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is to make the hook an executable? @rranelli may be able to speak to this better

@stupied4ever
Copy link
Owner

That sounds promissor! The a lot.

@jbodah
Copy link
Collaborator Author

jbodah commented May 22, 2015

@stupied4ever please let me know which changes you'd like still. I've commented on the lines you've mentioned.

I still would like to write tests for this


hook_script = ERB.new(hook_template).result(binding)

puts "Writing to file #{hook_path}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be fixed as you included logs on other PR

@stupied4ever
Copy link
Owner

Probably the only thing you need to fix is the puts (as you created the log feature).

@jbodah
Copy link
Collaborator Author

jbodah commented May 22, 2015

Gotcha, I'll merge upstream when I get home

@stupied4ever
Copy link
Owner

other point I was thinking is that we got a Install All command, but by the moment we have only PreCommit hooks. We created A multi hook type but we did not completed other hooks Type. The user will never be able to install all, only install PreCommit.

I need to find somre time to complete that PR that still in WIP

@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) to 99.18% when pulling e9f6b41 on jbodah:install-all into 85eb9c5 on stupied4ever:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) to 99.18% when pulling e9f6b41 on jbodah:install-all into 85eb9c5 on stupied4ever:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.15%) to 99.18% when pulling e9f6b41 on jbodah:install-all into 85eb9c5 on stupied4ever:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants