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

Rakefile should not try to install bundler #30

Closed
AliSoftware opened this issue May 14, 2014 · 13 comments
Closed

Rakefile should not try to install bundler #30

AliSoftware opened this issue May 14, 2014 · 13 comments

Comments

@AliSoftware
Copy link
Contributor

The bootstrap task should not install bundler (see this line). Instead, we should check if bundler is not installed and ask the user to install it manually.

See CocoaPods/Rainforest#13


Inspiration:

task :bootstrap do
  if system('which bundler')
    ...
  else
    puts red("\nPlease install bundler manually")
    puts "$ [sudo] gem install bundler"
  end
end
@AliSoftware AliSoftware changed the title CLAide Rakefile should not try to install bundler Rakefile should not try to install bundler May 14, 2014
@alloy
Copy link
Member

alloy commented May 14, 2014

By the way, I now realise that that check is wrong as well. The real binary is called bundle not bundler. The bundler binary was added recently for people that mistype it: rubygems/bundler@e73084e.

@AliSoftware
Copy link
Contributor Author

@alloy btw shouldn't we also use hash instead of which?

@AliSoftware
Copy link
Contributor Author

Template syntax to use for reference: https://gist.github.com/alloy/f0292ff380647028e9b1

@AliSoftware AliSoftware self-assigned this May 16, 2014
@alloy
Copy link
Member

alloy commented May 16, 2014

@alloy btw shouldn't we also use hash instead of which?

Why? Using which has been working fine for me the last ~10 years :)

@AliSoftware
Copy link
Contributor Author

I believe hash is faster (being a hash table and all whereas which has to go thru all the directories in $PATH)… but maybe it only exists in sh. And the speed benefit is probably not worth it.

Tbh, I quite never used hash myself, being used to use which like you do, but as i came across hash again lately, I was just wondering.

@AliSoftware
Copy link
Contributor Author

CheckList for applying this fix to all repositories in the Rainforest.

@AliSoftware
Copy link
Contributor Author

All done, but as it was repetitive tasks and I did this at 3-4 AM, code review on all those Rakefiles would be very welcome 😉

And there is the PR CocoaPods/cocoapods-docs#2 to accept too, as I don't have push access to this one (I wonder why).

@alloy
Copy link
Member

alloy commented May 17, 2014

@AliSoftware It all looks good to me! Have you tried to perform a clean bootstrap after applying all these changes?

@alloy
Copy link
Member

alloy commented May 17, 2014

@AliSoftware I’m also thinking that we could possible run this on Travis to ensure that bootstrapping in a clean env works. Any idea how long a bootstrap takes on average?

@AliSoftware
Copy link
Contributor Author

I did remove my Rainforest clone, then clone it again and bootstraped, and everything seemed to work fine for me.

I didn't watch how long it took however.

@alloy
Copy link
Member

alloy commented May 17, 2014

If it doesn't take too long it would be nice to ensure (possible) new collars are ensured to get a working env.

@AliSoftware
Copy link
Contributor Author

I propose that we close this issue, and open a new one for that "Travis should test bootstrap task" issue.

Question: where to open such ticket? In CocoaPods/shared maybe, as it is where the template .travis.yml to used for all templates should be stored? Or in CocoaPods/Rainforest, as it will be an issue similar to CocoaPods/Rainforest#12 and will need a task in Rainforest's Rakefile to update all other repos from shared?)

@fabiopelosin
Copy link
Member

I would test the bootstrap task in Rainforest as well.

Awesome work!

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

No branches or pull requests

3 participants