graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Ruby version requirement incorrect

Open keithlayne opened this issue 5 years ago • 8 comments

The only place I could find a ruby version requirement for this gem was in the gemspec:

https://github.com/github/graphql-client/blob/master/graphql-client.gemspec#L23

This implies the constraint is >= 2.1.0, which seems to be false. It looks like Travis is only testing 2.3+, which I think is a good actual lower bound. I'm stuck in one project on 2.2, which errors (at least) here:

https://github.com/github/graphql-client/blame/master/lib/graphql/client/schema/enum_type.rb#L52

Side note - this kinda stuff is pretty hard to discover quickly without a changelog, that would be pretty sweet to add going forward.

Thanks!

keithlayne avatar Aug 08 '19 21:08 keithlayne

However unlikely that somebody else is in the same boat, these constraints seem to work with ruby 2.2.10 so far:

gem 'graphql', '< 1.9.9'
gem 'graphql-client', '~> 0.12.2

keithlayne avatar Aug 08 '19 21:08 keithlayne

Nope. I just passed my pain threshold for getting this working. HTTP POST FTW.

keithlayne avatar Aug 08 '19 21:08 keithlayne

Welp, 2.3 and 2.4 support has just been dropped between 0.15 and 0.16 and there's no hint in release notes.

dotdoom avatar Oct 12 '19 02:10 dotdoom

Also, I'm running into an issue where I get the following error while running ruby 2.3.7:

'NoMethodError: undefined method `match?' for /\A[A-Z]/:Regexp'

Apparently 'match?' is only available in ruby 2.4 and above, so it seems like at a minimum this gem requires ruby 2.4, unless there is some way to get around this error?

flynn1982 avatar Nov 05 '19 21:11 flynn1982

Yes, that's the error I was referring to.

dotdoom avatar Nov 06 '19 05:11 dotdoom

+100 for this.

In Ruby 2.2.2 I get this error:

gems/graphql-client-0.15.0/lib/graphql/client/schema/enum_type.rb:52:in `block in initialize': undefined method `-@' for "array":String (NoMethodError)

I'm not advocating for changes to be made, only for the Ruby requirement to be fixed that way I don't have to hunt through the source and figure out what is and is not supported.

I think in this case all versions 0.14.0 and higher should be yanked and updated with the correct Ruby requirement set.

jondruse avatar Mar 26 '20 16:03 jondruse

+1 it would be nice to know what versions of ruby this gem supports.

ezmiller avatar Jun 18 '20 16:06 ezmiller

I'm trying to use it on an app on 2.2.5 and am also getting the error that @flynn1982 referenced.

ezmiller avatar Jun 18 '20 16:06 ezmiller