kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Split client files #50

Closed nicolasblanco closed 12 years ago

nicolasblanco commented 12 years ago

Hi,

in my opinion, because now youtube_it can be used with many clients (authsub, oauth, oauth2), we should not load all the files and gems.

So I've just split the client in different classes (the client.rb was also becoming too big imho), and I've put them all put in different files in a subdirectory called "client". Each of them requires the gems they need (ie. the oauth client requires oauth and simple_oauth). I've also deleted references of oauth and simple_oauth in the gemspec. I've changed the README to indicate that the developer has to require the gems and client he wants to use.

What do you think ?

kylejginavan commented 12 years ago

I think this is a good idea and understand why you pushed this, however, I think having this tool more plug and play is better for most. In addition, I do not see a problem including all the clients as it doesn't hurt anything to have them there.

Just my $.02. If others disagree please +1 and I will reconsider. Thanks for your commitment and I hope you contribute again.

nicolasblanco commented 12 years ago

OK. I agree if you want to auto-require all the clients for the ease of use.

However I think that we should not require all the oauth and dependencies and only require them in their respective clients.

I'm using youtube_it on a big project and only using OAuth2 therefore I don't want to have dependencies on OAuth gems.

kylejginavan commented 12 years ago

Is having a dependency on OAuth breaking something? What is wrong with having that dependency? Please help me to understand your perspective more.