Closed dpc closed 13 years ago
Anybody working on that one?
I'd really like to see this fixed soon... Arch has moved to ruby 1.9, which means that this app no longer works without installing 1.8 alongside, which is rather ugly.
I've made fixes in my fork which work for me. Whether or not they maintain complete 1.8.6 and 1.8.7 compatibility, I'm not sure.
Would those be the 5 commits from your 1.9.x branch? Probably for packaging purposes I'll format-patch those commits and apply them onto the main branch for now.
Yes. And I've confirmed the test-suite runs 100% on 1.8.7.
Awesome. I'll look into it.
Here's an update on Ruby 1.9 status with the github 0.4.0 gem: simply running the github
command fails with ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
.
% github
/usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github/extensions.rb:11: warning: undefining `object_id' may cause serious problem
/usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github.rb:151:in `module_eval': /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/commands/helpers.rb:5: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
when %r|^git://github\.com/([^/]+/[^/]+)$|: $1.split('/')
^
/usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/commands/helpers.rb:6: syntax error, unexpected keyword_when, expecting keyword_end
when %r|^(?:ssh://)?(?:git@)?gith...
^
/usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/commands/helpers.rb:6: syntax error, unexpected ':', expecting keyword_end
...@)?github\.com:([^/]+/[^/]+)$|: $1.split('/')
... ^
/usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/commands/helpers.rb:8: syntax error, unexpected keyword_end, expecting $end
from /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github.rb:151:in `load'
from /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github.rb:68:in `block in activate'
from /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github.rb:67:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/lib/github.rb:67:in `activate'
from /usr/lib/ruby/gems/1.9.1/gems/github-0.4.0/bin/github:8:in `<top (required)>'
from /usr/bin/github:19:in `load'
from /usr/bin/github:19:in `<main>'
This is a known issue which I've fixed in my branch. It's because ruby1.9 no longer supports the when cond: blah
syntax. You need to use newlines or when cond then blah
.
Thanks for the update. I will use your fork for now and I hope your changes are pulled into upstream soon. :-)
I'm using wfarr's fork as well, works fine on my Ruby 1.9.1p243 system. Seems safe to merge into mainline
Regarding wfarr's fork, line 45 in lib/commands/commands.rb changed the semantics from the original. It should be |(a,),(b,)| not |a,b|, I think.
Ok, I just went and commented the block on line 45 and replaced :
with newlines in github-0.4.2/lib/commands/helpers.rb
. Things seem to be working so far :)
I'd love to see the patch from wfarr's fork integrated into mainline as well, thanks!
I have a working 1.9 fork here: http://github.com/kristianmandrup/github-gem I've also added some other patches found in the network, such as a fix for $ gh network http://github.com/dominikh/github-gem/commit/3756a55c840ddbaef60d596250372e51faf07afc
http://github.com/snowblink/github-gem/commit/3726b5e0f1f1129e41550f753e1d2207a3f5063c
Also converted it into a jewel, for use with jeweler.
Dammit, forgot github had an issue tracker. Iidn't look here before spending my time porting it to 1.9.2.
Here's my tree: http://github.com/bronson/github-gem Tested and works great on 1.8.6 and 1.9.2rc2.
Could one of the maintainers PLEASE pull one of the 1.9.2 fix trees? The fixes are small and well understood. I'm bummed I duplicated other peoples' work.
Great! In my fork, I later noticed that the "create repository" command didn't work. Anyone experienced this or has a fix for it?
Hi Kristian. I don't experience that. In my fork create repository seems to work perfectly under 1.8.6 and 1.9.2. Tell me if you can find a way to break it.
Still its not pulled in to the master repo.!! Same error with me.
Hi bronson and millisami,
Here are my results after a few minutes investigation:
kristian-mandrups-macbook-pro:_clones kristianconsult$ github create blip /Users/kristianconsult/.rvm/gems/ruby-1.9.2-p0/gems/github-0.4.5/lib/github/command.rb:131:in `run': undefined method `any?' for "":String (NoMethodError)
So I added a String extension
class String def any? !empty? end end
Now I get another error :(
$ github create blip ERROR: kristianmandrup/blip doesn't exist yet. Did you enter it correctly? fatal: The remote end hung up unexpectedly
Why, WTF? Am I missing something here? I thought it would create the repo without expecting it to be present there already!?
I pushed my gem with the fix so you have the option to check it out or work on it if you like.
A year? Really?
I've got a pull request which fixes all the Ruby 1.9 problems:
I think these are all applied now.
Hurray! Thanks for following through on this long awaited request :)