Closed rougecardinal closed 13 years ago
Nice! Thanks!
How come you removed localfile = nil in the getbinaryfile method call? If that is omitted then the remote file will be written locally.
-Scott
Sorry Scott, I do not have errors anymore, rewriting the mkdir_p made the trick, but I did not update de push request comment. For the getbinaryfile I believe it needs to be improved again I was using ruby 1.8 and encoutered a bug, implementation differs between 1.8 and 1.9:
1.9 : http://www.ruby-doc.org/stdlib/libdoc/net/ftp/rdoc/index.html 1.8 : http://www.ruby-doc.org/stdlib-1.8.7/libdoc/net/ftp/rdoc/classes/Net/FTP.html#M001079
I will prepare a version compatible with both.
Oh, bummer. Those 1.8/1.9 differences get me every time!
Thanks!
-Scott
rougecardinal,
Were you able to come up with a version of Dandelion::Service::FTP#read that works for 1.8 and 1.9? At first glance it seems like we have to pass in a temp file ... getbinaryfile(file, localfile = temp) and then delete it when we're done, but that feels wrong. Any ideas?
-Scott
Apparently the head version of dandelion is ok for 1.8, 1.9, FTP and sftp.
At least it is working like a charm for me in both environments.
Tell me if you have found a bug. Otherwise you can package it as a new gem release.
Thomas
Envoyé de mon téléphone.
Rouge Cardinal - 01 83 64 02 13
Le 14 avr. 2011 à 03:54, scttnlsn reply@reply.github.com a écrit :
rougecardinal,
Were you able to come up with a version of Dandelion::Service::FTP#read that works for 1.8 and 1.9? At first glance it seems like we have to pass in a temp file ... getbinaryfile(file, localfile = temp) and then delete it when we're done, but that feels wrong. Any ideas?
-Scott
Reply to this email directly or view it on GitHub: https://github.com/scttnlsn/dandelion/pull/1#issuecomment-998841
Works well with 1.9, but 1.8 raises the following error:
/Users/scott/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/net/ftp.rb:500:in open': can't convert nil into String (TypeError) from /Users/scott/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/net/ftp.rb:500:in
getbinaryfile'
from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/service.rb:42:in read' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:105:in
read_remote_revision'
from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:52:in initialize' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:139:in
new'
from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:139:in deployment' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:121:in
execute'
from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:102:in execute' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/dandelion:7 from /Users/scott/.rvm/gems/ruby-1.8.7-p334/bin/dandelion:19:in
load'
from /Users/scott/.rvm/gems/ruby-1.8.7-p334/bin/dandelion:19
-Scott
Ok, I try to watch this one before tonight (I'm in France, it's 2:20pm here)
Thomas Darde rougecardinal.fr - 34 rue de Turin, 75008 Paris 01 83 64 02 13 - 06 63 38 45 68
On jeudi 14 avril 2011 at 14:09, scttnlsn wrote:
Works well with 1.9, but 1.8 raises the following error:
/Users/scott/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/net/ftp.rb:500:in
open': can't convert nil into String (TypeError) from /Users/scott/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/net/ftp.rb:500:in
getbinaryfile' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/service.rb:42:inread' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:105:in
read_remote_revision' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:52:ininitialize' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:139:in
new' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:139:indeployment' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:121:in
execute' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:102:inexecute' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/gems/dandelion-0.1.7/bin/dandelion:7 from /Users/scott/.rvm/gems/ruby-1.8.7-p334/bin/dandelion:19:in
load' from /Users/scott/.rvm/gems/ruby-1.8.7-p334/bin/dandelion:19-Scott
Reply to this email directly or view it on GitHub: https://github.com/scttnlsn/dandelion/pull/1#issuecomment-1000930
I committed a fix for the Service::FTP#read method that should be compatible with Ruby 1.8 and 1.9. Would you mind testing it out on your end as well? If all goes well I'll push a 0.2.0 Gem.
Thanks a lot!
-Scott
Hi Scott,
Sorry for the delay, I was looking for a new office for my company this week (and finally found them !). Seams to me it's working, I'm using 1.8.7 from rvm head.
So I say you can go for 0.2 !
Have a nice sunday,
Thomas Darde rougecardinal.fr - 34 rue de Turin, 75008 Paris 01 83 64 02 13 - 06 63 38 45 68
On dimanche 17 avril 2011 at 15:41, scttnlsn wrote:
I committed a fix for the Service::FTP#read method that should be compatible with Ruby 1.8 and 1.9. Would you mind testing it out on your end as well? If all goes well I'll push a 0.2.0 Gem.
Thanks a lot!
-Scott
Reply to this email directly or view it on GitHub: https://github.com/scttnlsn/dandelion/pull/1#issuecomment-1016730
Awesome...thanks so much for helping out with this.
Enjoy the new office!
-Scott
Hi Scott,
Great work, but it had some small bugs, I did try to correct them. I'm now able to upload first files to the repo, but still having errors with directories :
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:243:in
getresp': 553 Could not create file. (Net::FTPPermError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:264:in
sendcmd' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:262:in
sendcmd' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:321:intransfercmd' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:452:in
storbinary' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:450:in
storbinary' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/ftp.rb:562:inputbinaryfile' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/service.rb:60:in
write' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/service.rb:26:intemp' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/service.rb:59:in
write' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:119:indeploy' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:114:in
each' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/deployment.rb:114:indeploy' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:157:in
execute!' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/../lib/dandelion/cli.rb:71:inexecute' from /Library/Ruby/Gems/1.8/gems/dandelion-0.1.7/bin/dandelion:7 from /usr/bin/dandelion:19:in
load' from /usr/bin/dandelion:19